Multiplexing communication method, device, first chip and second chip

By setting up the control channel of the virtual multiplexed channel in the smart watch, handshake communication and data flow control are realized, the problem of low communication efficiency of smart watches is solved and the communication function of multi-service concurrent is realized.

CN114356600BActive Publication Date: 2025-07-18SPREADTRUM COMM SHENZHEN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111660716.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-07-18
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The communication technology of existing smart watches is inefficient in design and single-function, and cannot meet the needs of multi-service concurrency.

Method used

By setting a virtual multiplexing channel between the first chip and the second chip, including a control channel, handshake communication, data flow control and remote function calls are realized to improve communication efficiency and support multi-service concurrency.

Benefits of technology

It improves communication efficiency, realizes the communication function of multi-service concurrent, and ensures the reliability of communication and the effective management of data traffic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114356600B_ABST
    Figure CN114356600B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a multiplexing communication method, apparatus, first chip, and second chip. A communication interface is provided between the first chip and the second chip, and the communication interface includes a virtual multiplexing channel, and the virtual multiplexing channel includes a control channel; the method includes: the first chip communicates with the second chip through the control channel, wherein the control channel is used to implement at least one of the following functions: the control channel is used to make the first chip and the second chip in a ready state through a handshake communication method; the control channel is used to perform data flow control during the communication between the first chip and the second chip; the control channel is used to control the second chip to implement the communication behavior corresponding to the function function by remotely calling the function function of the second chip; the control channel is used to count the communication data for the communication between the first chip and the second chip, thereby improving the communication efficiency and realizing the communication function of multi-service concurrency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of communication technologies, and in particular, to a multiplexed communication method, apparatus, first chip, and second chip.

Background Art

[0002] With the development of communication technologies, many traditional electronic devices have begun to add communication functions. For example, a watch that could only tell time in the past can provide more high-tech functions such as weather forecasting, health monitoring, and two-way calling after adding a communication module on the basis of its original function. Currently, smart watches have become common communication tools in daily life, making the connection between people closer and bringing more convenience to our lives. Therefore, it is necessary to improve the communication function of smart watches.

[0003] In the prior art, the design of the communication technology adopted in smart watches is very ordinary, and the communication is very inefficient with a single communication function.

Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a multiplexed communication method, apparatus, first chip, and second chip to improve the communication efficiency and achieve the communication function of multi-service concurrency.

[0005] In a first aspect, embodiments of the present invention provide a multiplexed communication method, which is applied to a first chip. A communication interface is provided between the first chip and a second chip, and the communication interface includes a virtual multiplexed channel, and the virtual multiplexed channel includes a control channel; the method includes:

[0006] Communicating with the second chip through the control channel, where the control channel is used to implement at least one of the following functions:

[0007] The control channel is used to make the first chip and the second chip in a ready state through a handshake communication method;

[0008] The control channel is used to perform data flow control during the communication between the first chip and the second chip;

[0009] The control channel is used to control the second chip to implement the communication behavior corresponding to the function function by remotely calling the function function of the second chip;

[0010] The control channel is used to count the communication data of the communication between the first chip and the second chip.

[0011] Optionally, the communicating with the second chip through the control channel includes:

[0012] Receive a second preparation data packet sent by the second chip through the control channel at a set time interval, where the second preparation data packet includes a second preparation identifier for indicating that the second chip is in a preparation state;

[0013] In response to the second preparation identifier, send a first preparation data packet to the second chip, where the first preparation data packet includes a first preparation identifier for indicating that the first chip is in a preparation state.

[0014] Optionally, communicating with the second chip through the control channel includes:

[0015] Send multiple service requests to the second chip through the control channel via a set first transmission buffer queue for the second chip to generate multiple service data in response to the multiple service requests;

[0016] Receive the multiple service data sent by the second chip through the control channel via a set second reception buffer queue.

[0017] Optionally, sending multiple service requests to the second chip through the control channel via the set first transmission buffer queue includes:

[0018] Apply for a first memory buffer area by calling a buffer function module and cache the multiple service requests in the first memory buffer area, where the service requests include identifiers corresponding to the service requests;

[0019] Cache the multiple service requests in the first memory buffer area into the tail of the first transmission buffer queue by calling a multiplexer write interface;

[0020] Send the multiple service requests in the first transmission buffer queue to the second chip through the control channel for the second chip to parse the identifiers corresponding to the multiple service requests to obtain multiple service types corresponding to the multiple service requests and acquire the multiple service requests corresponding to the multiple service types.

[0021] Optionally, sending multiple service requests to the second chip through the control channel via the set first transmission buffer queue includes:

[0022] Cache the multiple service requests into different first transmission buffer queues corresponding to the service types of the service requests;

[0023] Send the service requests in the multiple first transmission buffer queues to the second chip through the control channel according to the priority of the first transmission buffer queue.

[0024] Optionally, for the second receiving buffer queue set, receiving a plurality of service data sent by the second chip through the control channel includes:

[0025] During the process of receiving a plurality of service data through the second receiving buffer queue, detecting whether the current received storage value of the second receiving buffer queue is less than or equal to the received storage threshold;

[0026] When it is detected that the current received storage value is greater than the received storage threshold, performing the step of detecting whether the current received storage value of the second receiving buffer queue is less than or equal to the received storage threshold during the process of the first chip receiving a plurality of service data through the second receiving buffer queue;

[0027] When it is detected that the current received storage value is less than or equal to the received storage threshold, sending a stop sending instruction or a decelerated sending instruction to the second chip through the control channel, so that the second chip stops sending the service data in response to the stop sending instruction, or reduces the sending speed and sends the service data at the reduced sending speed in response to the decelerated sending instruction, and performing the step of detecting whether the current received storage value of the second receiving buffer queue is less than or equal to the received storage threshold during the process of receiving a plurality of service data through the second receiving buffer queue.

[0028] Optionally, after sending a plurality of service requests to the second chip through the control channel by the first sending buffer queue set, it includes: counting the number of sent service requests; receiving the number of received service requests counted and returned by the second chip; subtracting the number of received service requests from the number of sent service requests to obtain the number of lost service requests; and / or

[0029] After receiving the plurality of service data sent by the second chip through the control channel by the second receiving buffer queue set, it further includes: receiving the number of sent service data counted by the second chip and returned through the control channel; counting the number of received service data; subtracting the number of received service data from the number of sent service data to obtain the number of lost service data.

[0030] In a second aspect, an embodiment of the present invention provides a multiplexing communication method, which is applied to a second chip. A communication interface is provided between the second chip and the first chip, and the communication interface includes a virtual multiplexing channel, and the virtual multiplexing channel includes a control channel; the method includes:

[0031] Communicating with the first chip through the control channel, where the control channel is used to implement at least one of the following functions:

[0032] The control channel is used to make the first chip and the second chip in a ready state through handshake communication;

[0033] The control channel is used to control the data flow during the communication between the first chip and the second chip;

[0034] The control channel is used to control the second chip to implement the communication behavior corresponding to the function by remotely calling the function of the second chip;

[0035] The control channel is used to count the communication data of the communication between the first chip and the second chip.

[0036] Optionally, the communication with the first chip through the control channel includes:

[0037] Sending a second ready data packet to the first chip through the control channel at a set time interval, where the second ready data packet includes a second ready flag, and the second ready flag is used to indicate that the second chip is in a ready state;

[0038] Receiving a first ready data packet sent by the first chip in response to the second ready flag, where the first ready data packet includes a first ready flag, and the first ready flag is used to indicate that the first chip is in a ready state.

[0039] Optionally, the communication with the first chip through the control channel includes:

[0040] Receiving multiple service requests sent by the first chip through the control channel through a set first receive buffer queue;

[0041] Generating multiple service data in response to the multiple service requests;

[0042] Sending multiple service data to the first chip through the control channel through a set second send buffer queue.

[0043] Optionally, the sending multiple service data to the first chip through the control channel through the set second send buffer queue includes:

[0044] Applying for a second memory buffer through a buffer function module and caching the multiple service data into the second memory buffer, where the service data includes an identifier corresponding to the service data;

[0045] Caching the multiple service data in the second memory buffer into the tail of the second send buffer queue through a multiplexer write interface;

[0046] Send the multiple service data in the second transmission buffer queue to the first chip through the control channel, so that the first chip can parse the identifiers corresponding to the multiple service data, obtain multiple service types corresponding to the multiple service data, and acquire the multiple service data corresponding to the multiple service types.

[0047] Optionally, receiving, by the first receiving buffer queue provided, multiple service requests sent by the first chip through the control channel includes:

[0048] During the process of receiving multiple service requests through the first receiving buffer queue, detect whether the current received storage value of the first receiving buffer queue is less than or equal to the received storage threshold;

[0049] When it is detected that the current received storage value is greater than the received storage threshold, execute the step of detecting whether the current received storage value of the first receiving buffer queue is less than or equal to the received storage threshold during the process of the second chip receiving multiple service requests through the first receiving buffer queue;

[0050] When it is detected that the current received storage value is less than or equal to the received storage threshold, send a stop sending instruction or a deceleration sending instruction to the first chip through the control channel, so that the first chip stops sending the service requests in response to the stop sending instruction, or reduces the sending speed and sends the service requests at the reduced sending speed in response to the deceleration sending instruction, and execute the step of detecting whether the current received storage value of the first receiving buffer queue is less than or equal to the received storage threshold during the process of receiving multiple service requests through the first receiving buffer queue.

[0051] Optionally, generating multiple service data in response to the multiple service requests includes:

[0052] Cache the multiple service requests into the first receiving buffer queues corresponding to different service types according to the service types of the service requests;

[0053] Generate corresponding multiple service data according to the service requests in the multiple first receiving buffer queues;

[0054] Cache the multiple service data into the second transmission buffer queues corresponding to different service types according to the service types of the service data.

[0055] Optionally, sending multiple service data to the first chip through the control channel by the second transmission buffer queue provided includes:

[0056] According to the priorities of the second transmission buffer queues, service data in the multiple second transmission buffer queues is sent to the first chip through the control channel, so that the first chip caches the multiple service data into different second reception buffer queues corresponding to the service types according to the service types of the service data.

[0057] Optionally, it further includes:

[0058] Receiving a remote call instruction sent by the first chip through the control channel, where the remote call instruction includes a log instruction; in response to the log instruction, turning on or off the log of the second chip; and / or

[0059] Receiving a remote call instruction sent by the first chip through the control channel, where the remote call instruction includes a test instruction; in response to the test instruction, starting a test application program and testing itself through the test application program.

[0060] In a third aspect, an embodiment of the present invention provides a multiplexing communication device, which is applied to a first chip. A communication interface is provided between the first chip and the second chip, and the communication interface includes a virtual multiplexing channel, and the virtual multiplexing channel includes a control channel; the device includes:

[0061] A first transceiver module, configured to communicate with the second chip through the control channel, where the control channel is used to implement at least one of the following functions:

[0062] The control channel is used to make the first chip and the second chip in a ready state through a handshake communication method;

[0063] The control channel is used to perform data flow control during the communication between the first chip and the second chip;

[0064] The control channel is used to control the second chip to implement the communication behavior corresponding to the function by remotely calling the function of the second chip;

[0065] The control channel is used to count the communication data of the communication between the first chip and the second chip.

[0066] In a fourth aspect, an embodiment of the present invention provides a multiplexing communication device, which is applied to a second chip. A communication interface is provided between the second chip and the first chip, and the communication interface includes a virtual multiplexing channel, and the virtual multiplexing channel includes a control channel; the device includes:

[0067] A second transceiver module for communicating with the first chip through the control channel, where the control channel is used to implement at least one of the following functions:

[0068] The control channel is used to make the first chip and the second chip in a ready state through a handshake communication method;

[0069] The control channel is used to perform data flow control during the communication between the first chip and the second chip;

[0070] The control channel is used to control the second chip to implement the communication behavior corresponding to the function by remotely calling the function of the second chip;

[0071] The control channel is used to count the communication data of the communication between the first chip and the second chip.

[0072] In a fifth aspect, an embodiment of the present invention provides a first chip, including: one or more processors; a memory; and one or more computer programs, where the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the device, cause the device to execute the multiplexing communication method in the first aspect or any possible implementation manner of the first aspect.

[0073] In a sixth aspect, an embodiment of the present invention provides a second chip, including: one or more processors; a memory; and one or more computer programs, where the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the device, cause the device to execute the multiplexing communication method in the second aspect or any possible implementation manner of the second aspect.

[0074] In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, it controls the device where the computer-readable storage medium is located to execute the multiplexing communication method in the first aspect or any possible implementation manner of the first aspect.

[0075] In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, it controls the device where the computer-readable storage medium is located to execute the multiplexing communication method in the second aspect or any possible implementation manner of the second aspect.

[0076] In the technical solution provided by the embodiment of the present invention, a communication interface is provided between the first chip and the second chip. The communication interface includes a virtual multiplexing channel, and the virtual multiplexing channel includes a control channel. The first chip communicates with the second chip through the control channel. Among them, the control channel is used to implement at least one of the following functions: the control channel is used to make the first chip and the second chip in a ready state through a handshake communication method; the control channel is used to perform data flow control during the communication between the first chip and the second chip; the control channel is used to control the second chip to implement the communication behavior corresponding to the function function by remotely calling the function function of the second chip; the control channel is used to count the communication data of the communication between the first chip and the second chip. In the embodiment of the present invention, the first chip and the second chip communicate through the control channel in the virtual multiplexing channel, thereby improving the communication efficiency and realizing the communication function of multi-service concurrency.

Description of the Drawings

[0077] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings required to be used in the embodiment will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to these drawings.

[0078] Figure 1 It is a schematic structural diagram of a multiplexing communication system provided by the embodiment of the present invention;

[0079] Figure 2 It is a flowchart of a multiplexing communication method provided by the embodiment of the present invention;

[0080] Figure 3a It is a flowchart of a method for sending multiple service requests provided by the embodiment of the present invention;

[0081] Figure 3b It is a flowchart of another method for sending multiple service requests provided by the embodiment of the present invention;

[0082] Figure 4 It is a flowchart of a method for caching to a send cache queue provided by the embodiment of the present invention;

[0083] Figure 5 It is a flowchart of a method for receiving multiple service requests provided by the embodiment of the present invention;

[0084] Figure 6 It is a flowchart of a method for generating service data provided by the embodiment of the present invention;

[0085] Figure 7 It is a flowchart of a method for caching to a receive cache queue provided by the embodiment of the present invention;

[0086] Figure 8a Flowchart of a method for sending multiple service data provided by an embodiment of the present invention;

[0087] Figure 8b Flowchart of another method for sending multiple service data provided by an embodiment of the present invention;

[0088] Figure 9 Flowchart of a method for receiving multiple service data provided by an embodiment of the present invention;

[0089] Figure 10 Schematic structural diagram of a multiplexing communication device provided by an embodiment of the present invention;

[0090] Figure 11 Schematic structural diagram of another multiplexing communication device provided by an embodiment of the present invention;

[0091] Figure 12 Schematic structural diagram of a first chip provided by an embodiment of the present invention;

[0092] Figure 13 Schematic structural diagram of a second chip provided by an embodiment of the present invention.

Detailed implementation manners

[0093] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0094] It should be clear that the described embodiments are only some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0095] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the", and "said" used in the embodiments of the present invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0096] It should be understood that the term "and / or" used herein is merely a description of the relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Additionally, the character " / " in this text generally indicates that the associated objects before and after are in an "or" relationship.

[0097] Depending on the context, the word "if" as used herein can be interpreted as "when" or "while" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if determined" or "if detecting (stated condition or event)" can be interpreted as "when determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)".

[0098] Embodiments of the present invention provide a multiplex communication system. Figure 1 FIG. is a schematic structural diagram of a multiplex communication system provided by an embodiment of the present invention, as Figure 1 shown, the system includes: a first chip 11 and a second chip 12.

[0099] A communication interface is provided between the first chip 11 and the second chip 12. The communication interface includes a virtual multiplexing channel, and the virtual multiplexing channel includes a control channel. The system includes: the first chip 11 communicates with the second chip 12 through the control channel. Among them, the control channel is used to implement at least one of the following functions: the control channel is used to make the first chip 11 and the second chip 12 in a ready state through a handshake communication method; the control channel is used to perform data flow control during the communication between the first chip 11 and the second chip 12; the control channel is used to control the second chip 12 to implement the communication behavior corresponding to the function function by remotely calling the function function of the second chip 12; the control channel is used to count the communication data of the communication between the first chip 11 and the second chip 112.

[0100] In embodiments of the present invention, the virtual multiplexing channel may further include other types of logical channels, and the control channel has the highest priority in the virtual multiplexing channel. Among them, the control channel is used for the management and control inside the multiplexing (Cmux) for dual-core communication, so that the Cmux framework for dual-core communication can operate efficiently.

[0101] In embodiments of the present invention, a communication interface is provided between the first chip and the second chip. Among them, the communication interface includes, but is not limited to, a Universal Asynchronous Receiver / Transmitter (UART) interface or a Serial Peripheral Interface (SPI).

[0102] In the embodiments of the present invention, the first chip and the second chip can be applied to dual-chip communication or dual-device communication. When applied to dual-chip communication, the first chip and the second chip are integrated in the same electronic device. When the first chip is the main chip, the second chip is the secondary chip; when the first chip is the secondary chip, the second chip is the main chip. For example, the electronic device includes a smart watch, a point-of-sale (POS) machine. When applied to dual-device communication, the first chip is disposed in one electronic device, and the second chip is disposed in another electronic device. When the first chip in one electronic device is an application processor, the second chip in the other electronic device is a modem chip; when the second chip in one electronic device is an application processor, the first chip in the other electronic device is a modem chip. For example, one electronic device is a computer, and the other electronic device is a wireless network card.

[0103] In the embodiments of the present invention, the electronic device includes, but is not limited to, a wearable device, a tablet computer, a portable PC, a mobile phone, etc. Among them, the wearable device can be a smart watch or a smart bracelet.

[0104] In the embodiments of the present invention, the multiplexing communication system can implement a multiplexing communication framework. For other projects or other products that need to use the multiplexing function, only some simple adaptations are required to reuse this framework, which greatly reduces the development workload.

[0105] The multiplexing communication framework can be applied to communication channels corresponding to different communication interfaces or different operating systems (OS). Among them, the operating system includes, but is not limited to, the Windows operating system, the Threados operating system, or the Rtthread operating system. In the multiplexing communication framework, cmux.c is the most core code, and all algorithms and logics related to multiplexing are implemented through the cmux.c code. Among them, cmux.c includes a cmux data encoding protocol, a send-receive buffer queue, support for channel priority, and support for software flow control. In the multiplexing communication framework, cmux_api.h provides API interfaces externally, and different physical channels need to provide interfaces dev_open, dev_close, dev_write, dev_read, and dev_data_coming according to the requirements of the framework. In the multiplexing communication framework, cmux_os_adaptor.c defines memory related to the OS, creates threads, waits for events, sends events, or mutex functions. By calling the codes cmux.c, cmux.h, and cmux_api.h, the reuse of the framework is realized, and the development workload is reduced.

[0106] In the technical solution of the multiplexing communication system provided in the embodiments of the present invention, a communication interface is provided between the first chip and the second chip. The communication interface includes a virtual multiplexing channel, and the virtual multiplexing channel includes a control channel. The first chip communicates with the second chip through the control channel. Among them, the control channel is used to implement at least one of the following functions: the control channel is used to make the first chip and the second chip in a ready state through a handshake communication method; the control channel is used to perform data flow control during the communication between the first chip and the second chip; the control channel is used to control the second chip to implement the communication behavior corresponding to the function function by remotely calling the function function of the second chip; the control channel is used to count the communication data of the communication between the first chip and the second chip. In the embodiments of the present invention, the first chip and the second chip communicate through the control channel in the virtual multiplexing channel, thereby improving the communication efficiency and realizing the communication function of multi-service concurrency.

[0107] Embodiments of the present invention provide a multiplexing communication method, which can be based on Figure 1 the multiplexing communication system shown in Figure 2 is a flowchart of a multiplexing communication method provided by an embodiment of the present invention. As Figure 2 shown, the method includes:

[0108] Step 11: The first chip receives a second preparation data packet sent by the second chip through the control channel at a set time interval. The second preparation data packet includes a second preparation identifier, and the second preparation identifier is used to indicate that the second chip is in a ready state.

[0109] In the embodiments of the present invention, before the first chip receives the second preparation data packet, the multiplexed first chip starts and waits for the multiplexed second chip to start. After the second chip starts, step 11 is executed.

[0110] In the embodiments of the present invention, after the first chip receives the second preparation identifier, it learns that the second chip is in a ready state through the second preparation identifier.

[0111] Step 12: In response to the second preparation identifier, the first chip sends a first preparation data packet to the second chip. The first preparation data packet includes a first preparation identifier, and the first preparation identifier is used to indicate that the first chip is in a ready state.

[0112] In the embodiments of the present invention, after the second chip receives the first preparation identifier, it learns that the first chip is in a ready state through the first preparation identifier.

[0113] After the second chip receives the first preparation data packet, it will jump out of the handshake communication loop. At this time, both the first chip and the second chip are in a ready state, thereby ensuring the reliability of the communication between the first chip and the second chip.

[0114] In an embodiment of the present invention, after the first chip and the second chip are both in a ready state, the communication channel formed by connecting the first chip and the second chip through a communication interface enters the ready state.

[0115] In an embodiment of the present invention, the first preparation data packet and the second preparation data packet are data packets of the same type, and the first preparation identifier and the second preparation identifier are identifiers of the same type. Among them, the first preparation data packet and the second preparation data packet are data packets negotiated by the first chip and the second chip.

[0116] In the above solution, the control channel realizes the function of making the first chip and the second chip in a ready state through a handshake communication method.

[0117] Step 13: The second chip obtains a plurality of service requests from the first chip through the control channel.

[0118] The second chip obtains a plurality of service requests from the first transmission buffer queue of the first chip through the control channel.

[0119] In an embodiment of the present invention, step 13 may specifically include:

[0120] Step 131: The first chip sends a plurality of service requests to the second chip through the control channel through the set first transmission buffer queue.

[0121] Figure 3a It is a flowchart of a method for sending a plurality of service requests provided in an embodiment of the present invention. As Figure 3a shown, as an alternative solution, step 131 may specifically include:

[0122] Step 131a: The first chip applies for a first memory buffer area by calling a buffer function module, and caches a plurality of service requests in the first memory buffer area, where the service requests include identifiers corresponding to the service requests.

[0123] In an embodiment of the present invention, a section of space memory is reserved in the first memory buffer area. The buffer function module includes Cmux_Buffer_Alloc or Callback_Alloc.

[0124] Step 131b: The first chip caches the plurality of service requests in the first memory buffer area to the end of the first transmission buffer queue by calling a multiplexer write interface (Cmux Write API).

[0125] Step 131c: The first chip sends a plurality of service requests in the first transmission buffer queue to the second chip through the control channel, so that the second chip can parse the identifiers corresponding to the plurality of service requests to obtain a plurality of service types corresponding to the plurality of service requests, and obtain a plurality of service requests corresponding to the plurality of service types.

[0126] Multiplexing (Cmux) sends the service request sending signal received from the first chip. The first transmission buffer queue has corresponding priorities, and Cmux sends the service requests in the first transmission buffer queue according to the priorities. When Cmux sends the service requests in the first transmission buffer queue, it adds the identifier corresponding to the service request to the corresponding service request in the first memory buffer, and adds the identifier corresponding to the first transmission buffer queue to the head of the first memory buffer by calling Cmux_Add_Header. Cmux sends the multiple service requests with added identifiers to the second chip by calling the dev_write data interface through the control channel. Among them, the service request includes the identifier corresponding to the service request; the identifier of the first transmission buffer queue includes the length of the data and the number of the first transmission buffer queue.

[0127] In the embodiment of the present invention, after the first chip sends multiple service requests to the second chip, it releases the first memory buffer. When applying for the first memory buffer through Cmux_Buffer_Alloc, the first chip calls Cmux_Buffer_Free to release the first memory buffer; when applying for the first memory buffer through Callback_Alloc, the first chip calls Callback_Free to release the first memory buffer.

[0128] In the embodiment of the present invention, in the process of the first chip sending service requests to the second chip, the method of zero memory copy (Copy) is adopted to improve the communication efficiency. The multiplexing application (cmux app), multiplexing (cmux), and communication channel driver use the same memory buffer. When sending service requests, the upper layer of the first chip applies for the memory buffer, and the lower layer of the first chip releases the memory buffer; when receiving service requests, the lower layer of the second chip applies for the memory buffer, and the upper layer of the second chip releases the memory buffer. In order to achieve the purpose of zero memory copy, the function for obtaining memory can provide an API interface by cmux, or set function pointers for obtaining memory and releasing memory by the cmux app module. The address returned by the function for obtaining memory must be offset by the reserved size of sizeof(cmux_header_t). With the identifier (header), when the service request is sent to the second chip, the second chip can distinguish which service the request is for.

[0129] Figure 3b It is a flowchart of another method for sending multiple service requests provided in the embodiment of the present invention. As Figure 3b shown, as another alternative, step 131 may specifically include:

[0130] Step 131e: The first chip caches multiple service requests into different first transmission buffer queues corresponding to different service types according to the service types of the service requests.

[0131] Figure 4 It is a flowchart of a method for caching to a transmission buffer queue provided by an embodiment of the present invention. As Figure 4 shown, each service request among multiple service requests corresponds to a different service type, and at least one service request can correspond to the same service type. The first chip caches multiple service requests into different first transmission buffer queues according to different service types.

[0132] Step 131f: The first chip sends the service requests in multiple first transmission buffer queues to the second chip through the control channel according to the priorities of the first transmission buffer queues.

[0133] As Figure 4 shown, the first transmission buffer queue has a corresponding priority, and the first chip preferentially sends the service requests in the first transmission buffer queue with a higher priority to the second chip through the control channel.

[0134] In an embodiment of the present invention, as an alternative solution, after step 131, the first chip counts the number of sent service requests, and the second chip counts the number of received service requests and returns the counted number of received service requests to the first chip through the control channel. The first chip subtracts the number of sent service requests from the number of received service requests to obtain the number of lost service requests. In particular, if the number of lost service requests is 0, it indicates that the service requests are not lost. In the above solution, the function of counting the communication data for communicating between the first chip and the second chip is realized through the control channel. In this case, the communication data includes the number of service requests.

[0135] Step 132: The second chip receives multiple service requests sent by the first chip through the control channel by means of the set first reception buffer queue.

[0136] Each service request among multiple service requests corresponds to a different service type, and at least one service request can correspond to the same service type. The second chip caches multiple service requests into different first reception buffer queues through the control channel according to different service types.

[0137] Figure 5 It is a flowchart of a method for receiving multiple service requests provided by an embodiment of the present invention. As Figure 5 shown, step 132 may specifically include:

[0138] Step 1321: During the process that the second chip receives multiple service requests through the first receive buffer queue, it detects whether the current receive storage value of the first receive buffer queue is less than or equal to the receive storage threshold. If not, step 1321 is executed; if so, step 1322 is executed.

[0139] When the second chip detects that the current receive storage value of the first receive buffer queue is greater than the receive storage threshold (free_nodes), it indicates that the current first receive buffer queue is in a safe area and can receive service requests without causing loss of service requests. At this time, the first chip will send service requests at full speed; when the second chip detects that the current receive storage value of the first receive buffer queue is less than or equal to the receive storage threshold, it indicates that the current first receive buffer queue is not in a safe area and is not sufficient to receive service requests, and continued reception will cause loss of service requests. At this time, the first chip will stop or slow down sending service requests. For example: when the receive storage threshold is set to 4 and the current receive storage value of the first receive buffer queue is 7, the current receive storage value is greater than 4. At this time, the second chip is in a safe area and can continue to receive service requests without causing loss of service requests. At this time, the first chip will send service requests at full speed; when the current receive storage value of the first receive buffer queue is 2, the current receive storage value is less than 4. At this time, the second chip is not in a safe area and is not sufficient to receive service requests, and continued reception of service requests will cause loss. At this time, the first chip will stop or slow down sending service requests.

[0140] Step 1322: The second chip sends a stop sending instruction or a slow down sending instruction to the first chip through the control channel.

[0141] When the second chip detects that the current receive storage value of the first receive buffer queue is less than or equal to the receive storage threshold, the second chip sends a stop sending instruction or a slow down sending instruction to the first chip through the control channel. For example: when the receive storage threshold is set to 4 and the current receive storage value of the first receive buffer queue is 2, the current receive storage value is less than 4, then the second chip sends a stop sending instruction or a slow down sending instruction to the first chip through the control channel.

[0142] In the above solution, the control channel is used for software flow control. When the second chip detects that the current receive storage value of the first receive buffer queue is less than or equal to the receive storage threshold, the multiplexing application is too late to read the service requests in the first receive buffer queue, resulting in loss of service requests. The second chip sends a stop sending instruction or a slow down sending instruction to the first chip through the control channel, and the first chip will perform flow control and slow down until the current receive storage value of the first receive buffer queue is greater than the receive storage threshold.

[0143] Step 1323: The first chip stops sending service requests to the second chip in response to a stop sending instruction, or reduces the sending speed in response to a decelerated sending instruction and sends service requests at the reduced sending speed, and then executes Step 1321.

[0144] After receiving the stop sending instruction through the control channel, the first chip stops sending service requests to the second chip; or after receiving the decelerated sending instruction through the control channel, the first chip reduces the sending speed and sends service requests to the second chip at the reduced sending speed. At this time, the second chip continues to detect whether the current received storage value of the first receive buffer queue is less than or equal to the receive storage threshold. In the above solution, the function of data traffic control is realized through the control channel during the communication between the first chip and the second chip.

[0145] Step 14: The second chip generates multiple service data in response to multiple service requests.

[0146] Each service request among the multiple service requests corresponds to a different service type, and at least one service request can correspond to the same service type. The second chip generates corresponding service data of different service types according to the service requests of different service types.

[0147] Figure 6 It is a flowchart of a method for generating service data provided in an embodiment of the present invention. As Figure 6 shown, Step 14 may specifically include:

[0148] Step 141: The second chip caches multiple service requests into first receive buffer queues corresponding to different service types according to the service types of the service requests.

[0149] Figure 7 It is a flowchart of a method for caching into a receive buffer queue provided in an embodiment of the present invention. As Figure 7 shown, each service request among the multiple service requests corresponds to a different service type, and at least one service request can correspond to the same service type. The second chip caches multiple service requests into different first receive buffer queues according to different service types.

[0150] The second chip receives service requests from the control channel by calling the dev_read or data_coming data interface and receives the identifier corresponding to the first send buffer queue.

[0151] In the embodiment of the present invention, the data interfaces include dev_write, dev_read, and data_comint.

[0152] Step 142: The second chip generates corresponding multiple service data according to the service requests in the multiple first receive buffer queues.

[0153] As Figure 7 shown, the second chip generates multiple service data corresponding to different service types according to multiple service requests. If a callback function (Data_Callback) is set in the second chip, the service requests are preferentially processed by calling Data_Handle_Callback; if Data_Callback is not set in the second chip, the service requests are defaultly read from the first receive buffer queue through multiplexer reading (Cmux_Read).

[0154] Step 143: The second chip caches the multiple service data into second transmit buffer queues corresponding to different service types according to the service types of the service data.

[0155] As Figure 4 shown, each service data among the multiple service data corresponds to a different service type, and at least one service data can correspond to the same service type. The second chip caches the multiple service data into different second transmit buffer queues according to different service types.

[0156] Step 15: The first chip obtains multiple service data from the second chip through a control channel.

[0157] The first chip obtains multiple service data from the second transmit buffer queue of the second chip through a control channel.

[0158] In the embodiment of the present invention, step 15 may specifically include:[[]]

[0159] Step 151: The second chip sends multiple service data to the first chip through a control channel via the set second transmit buffer queue.

[0160] Figure 8a is a flowchart of a method for sending multiple service data provided in the embodiment of the present invention. As Figure 8a shown, as an optional solution, step 151 may specifically include:[[]]

[0161] Step 151a: The second chip applies for a second memory buffer area through a buffer function module and caches the multiple service data into the second memory buffer area, where the service data includes an identifier corresponding to the service data.

[0162] In the embodiment of the present invention, a section of space memory is reserved in the second memory buffer area. The buffer function module includes Cmux_Buffer_Alloc or Callback_Alloc.

[0163] Step 151b: The second chip caches multiple service data in the second memory buffer to the tail of the second transmission cache queue by calling the Cmux Write API.

[0164] Step 151c: The second chip sends multiple service data in the second transmission cache queue to the first chip through the control channel, so that the first chip can parse the identifiers corresponding to the multiple service data to obtain multiple service types corresponding to the multiple service data, and obtain multiple service data corresponding to the multiple service types.

[0165] Cmux receives the service data sending signal sent by the second chip. The second transmission cache queue has a corresponding priority. Cmux sends the service data in the second transmission cache queue according to the priority. When Cmux sends the service data, it adds the identifier corresponding to the service data to the corresponding service data in the second memory buffer, and adds the identifier corresponding to the second transmission cache queue to the head of the second memory buffer by calling Cmux_Add_Header. Cmux sends the multiple service data with added identifiers to the first chip by calling the dev_write data interface through the control channel. Among them, the identifier of the second transmission cache queue includes the length of the data and the number of the second transmission cache queue.

[0166] In the embodiment of the present invention, after the second chip sends multiple service data to the second chip, it releases the second memory buffer. When applying for the second memory buffer through Cmux_Buffer_Alloc, the second chip calls Cmux_Buffer_Free to release the second memory buffer; when applying for the second memory buffer through Callback_Alloc, the second chip calls Callback_Free to release the second memory buffer.

[0167] In the embodiment of the present invention, in the process of the second chip sending service data to the first chip, the method of zero-copy memory improves the communication efficiency. The multiplexing application (cmux app), multiplexing (cmux), and communication channel driver use the same memory buffer. When sending service data, the upper layer of the second chip applies for the memory buffer, and the lower layer of the second chip releases the memory buffer; when receiving service requests, the lower layer of the first chip applies for the memory buffer, and the upper layer of the first chip releases the memory buffer. In order to achieve the purpose of zero-copy memory, the function for obtaining memory can provide an API interface by cmux, or set function pointers for obtaining memory and releasing memory by the cmux app module. The address returned by the function for obtaining memory must be offset by the size reserved for sizeof(cmux_header_t). With the identifier (header), when the service data is sent to the first chip, the first chip can distinguish which service data it is.

[0168] Figure 8b This is a flowchart of another method for sending multiple service data provided in an embodiment of the present invention. As Figure 8b shown, as another alternative, step 151 may specifically include:

[0169] Step 151e: The second chip sends the service data in multiple second transmission buffer queues to the first chip through the control channel according to the priorities of the second transmission buffer queues.

[0170] As Figure 4 shown, the second transmission buffer queues have corresponding priorities, and the second chip preferentially sends the service data in the second transmission buffer queues with higher priorities to the first chip through the control channel.

[0171] Step 151f: The first chip caches the multiple service data into second reception buffer queues corresponding to different service types according to the service types of the service data.

[0172] As Figure 7 shown, each of the multiple service data corresponds to a different service type, and the same service type may correspond to at least one service data. The first chip caches the multiple service data into different second reception buffer queues according to different service types.

[0173] The first chip receives the service data from the control channel by calling the dev_read or data_coming data interface and receives the identifier corresponding to the second transmission buffer queue.

[0174] If Data_Callback is set in the first chip, the service data is preferentially processed by calling Data_Handle_Callback; if Data_Callback is not set in the first chip, the service data is defaultly read from the second reception buffer queue through Cmux_Read.

[0175] In an embodiment of the present invention, as an alternative, after step 151, the second chip counts the number of sent service data and returns the counted number of sent service data to the first chip through the control channel, and the first chip counts the number of received service data. The first chip subtracts the number of sent service data from the number of received service data to obtain the number of lost service data. In particular, if the number of lost service data is 0, it indicates that the service data is not lost. In the above solution, the function of counting the communication data for communicating between the first chip and the second chip is implemented through the control channel. In this case, the communication data includes the number of service data.

[0176] Step 152: The first chip receives multiple service data sent by the second chip through the set second receive buffer queue.

[0177] Each of the multiple service data corresponds to a different service type, and at least one service data can correspond to the same service type. The first chip caches the multiple service data into different second receive buffer queues according to different service types.

[0178] Figure 9 It is a flowchart of a method for receiving multiple service data provided in an embodiment of the present invention. As Figure 9 shown, step 152 may specifically include:

[0179] Step 1521: During the process of the first chip receiving multiple service data through the second receive buffer queue, it detects whether the current receive storage value of the second receive buffer queue is less than or equal to the receive storage threshold. If not, step 1521 is executed; if so, step 1522 is executed.

[0180] When the first chip detects that the current receive storage value of the second receive buffer queue is greater than the receive storage threshold, it indicates that the current second receive buffer queue is in a safe area and can receive service data without causing loss of service data. At this time, the second chip will send service data at full speed; when the first chip detects that the current receive storage value of the second receive buffer queue is less than or equal to the receive storage threshold, it indicates that the current second receive buffer queue is not in a safe area and is not sufficient to receive service data, and continued reception will cause loss of service data. At this time, the second chip will stop or slow down sending service data. For example: when the receive storage threshold is set to 4 and the current receive storage value of the second receive buffer queue is 7, the current receive storage value is greater than 4. At this time, the first chip is in a safe area and can continue to receive service data without causing loss of service data. At this time, the second chip will send service data at full speed; when the current receive storage value of the second receive buffer queue is 2, the current receive storage value is less than 4. At this time, the first chip is not in a safe area and is not sufficient to receive service data, and continued reception of service data will cause loss. At this time, the second chip will stop or slow down sending service data.

[0181] Step 1522: The first chip sends a stop sending instruction or a slow down sending instruction to the second chip through the control channel.

[0182] When the first chip detects that the current receiving storage value of the second receiving buffer queue is less than or equal to the receiving storage threshold, the first chip sends a stop sending instruction or a slowdown sending instruction to the second chip through the control channel. For example: when the receiving storage threshold is set to 4 and the current receiving storage value of the second receiving buffer queue is 2, the current receiving storage value is less than 4, and the first chip sends a stop sending instruction or a slowdown sending instruction to the second chip through the control channel.

[0183] In the above scheme, the control channel is used for software flow control. When the first chip detects that the current receive storage value of the second receive buffer queue is less than or equal to the receive storage threshold, the multiplexing application does not have time to read the service data in the second receive buffer queue, resulting in the loss of service data. The first chip sends a stop sending instruction or a slow down sending instruction to the second chip through the control channel, and the second chip will perform flow control and deceleration until the current receive storage value of the second receive buffer queue is greater than the receive storage threshold.

[0184] Step 1523 , the second chip stops sending service data to the first chip in response to the stop sending instruction, or reduces the sending speed in response to the slow down sending instruction and sends service data at the reduced sending speed, and executes step 1521 .

[0185] After receiving the stop sending instruction through the control channel, the second chip stops sending service data to the first chip; or after receiving the slowdown sending instruction through the control channel, the second chip reduces the sending speed and sends service data to the first chip at the reduced sending speed. At this time, the first chip continues to detect whether the current receiving storage value of the second receiving buffer queue is less than or equal to the receiving storage threshold. In the above scheme, the function of data flow control during the communication between the first chip and the second chip is realized through the control channel.

[0186] In an embodiment of the present invention, it also includes: the second chip receives a remote call instruction sent by the first chip through a control channel, wherein the remote call instruction includes a log instruction; the second chip responds to the log instruction and turns on or off the log of the second chip; and / or the second chip receives a remote call instruction sent by the first chip through a control channel, wherein the remote call instruction includes a test instruction; the second chip responds to the test instruction and starts a test application (Cmux Test App), and tests itself through the test application.

[0187] The first chip can check the records of multiplexed communication through the log of the second chip, wherein the records of multiplexed communication include but are not limited to the records of the sending and receiving of service requests and the sending and receiving of service data.

[0188] After the second chip starts the test application program, the first chip can test various functions in the second chip. In the embodiment of the present invention, the second chip starts the test application program only in response to a test instruction, avoiding the test application program being always in the on state and saving memory.

[0189] In the above solution, through the control channel, the function function of the second chip is remotely called to control the second chip to implement the communication behavior corresponding to the function function. Among them, the communication behavior includes opening or closing the log of the second chip, and / or starting the test application program.

[0190] In the embodiment of the present invention, the first transmission buffer queue, the second transmission buffer queue, the first reception buffer queue, and the second reception buffer queue adopt lock-free queues, and there is no need to lock the first transmission buffer queue, the second transmission buffer queue, the first reception buffer queue, and the second reception buffer queue. Therefore, the head and tail of the buffer queue can be quickly found. In the technical solution of the multiplexing communication method provided by the embodiment of the present invention, a communication interface is provided between the first chip and the second chip. The communication interface includes a virtual multiplexing channel. The virtual multiplexing channel includes a control channel. The first chip communicates with the second chip through the control channel. Among them, the control channel is used to implement at least one of the following functions: the control channel is used to make the first chip and the second chip in a ready state through a handshake communication method; the control channel is used to perform data flow control during the communication between the first chip and the second chip; the control channel is used to remotely call the function function of the second chip to control the second chip to implement the communication behavior corresponding to the function function; the control channel is used to count the communication data of the communication between the first chip and the second chip. In the embodiment of the present invention, the first chip and the second chip communicate through the control channel in the virtual multiplexing channel, thereby improving the communication efficiency and realizing the communication function of multi-service concurrency.

[0191] The embodiment of the present invention provides a multiplexing communication device, which is applied to the first chip. A communication interface is provided between the first chip and the second chip. The communication interface includes a virtual multiplexing channel. The virtual multiplexing channel includes a control channel; the first transceiver module of the device is used to communicate with the second chip through the control channel, where the control channel is used to implement at least one of the following functions: the control channel is used to make the first chip and the second chip in a ready state through a handshake communication method; the control channel is used to perform data flow control during the communication between the first chip and the second chip; the control channel is used to remotely call the function function of the second chip to control the second chip to implement the communication behavior corresponding to the function function; the control channel is used to count the communication data of the communication between the first chip and the second chip. Figure 10 is a schematic structural diagram of a multiplexing communication device provided by an embodiment of the present invention, as Figure 10As shown, the first transceiver module includes: a first transmission module 21 and a first reception module 22. The first transmission module 21 and the first reception module 22 are connected.

[0192] The first reception module 22 is configured to receive a second preparation data packet sent by the second chip through a control channel at a set time interval. The second preparation data packet includes a second preparation identifier, and the second preparation identifier is used to indicate that the second chip is in a preparation state; the first transmission module 21 is configured to, in response to the second preparation identifier, send a first preparation data packet to the second chip. The first preparation data packet includes a first preparation identifier, and the first preparation identifier is used to indicate that the first chip is in a preparation state.

[0193] In an embodiment of the present invention, the first transmission module 21 is specifically configured to send multiple service requests to the second chip through a control channel via a set first transmission buffer queue, so that the second chip generates multiple service data in response to the multiple service requests; the first reception module 22 is specifically configured to receive multiple service data sent by the second chip through a control channel via a set second reception buffer queue.

[0194] In an embodiment of the present invention, the first transmission module 21 is specifically configured to apply for a first memory buffer area by invoking a buffer function module, and cache multiple service requests in the first memory buffer area, where the service requests include identifiers corresponding to the service requests; cache multiple service requests in the first memory buffer area to the tail of the first transmission buffer queue by invoking a multiplexer write interface; send multiple service requests in the first transmission buffer queue to the second chip through a control channel, so that the second chip parses the identifiers corresponding to the multiple service requests to obtain multiple service types corresponding to the multiple service requests. The first reception module 22 is specifically configured to obtain multiple service requests corresponding to multiple service types.

[0195] In an embodiment of the present invention, the first transmission module 21 is specifically configured to cache multiple service requests to different first transmission buffer queues corresponding to different service types according to the service types of the service requests; send the service requests in multiple first transmission buffer queues to the second chip through a control channel according to the priority of the first transmission buffer queue.

[0196] In an embodiment of the present invention, the first receiving module 22 is specifically configured to detect whether the current received storage value of the second receiving buffer queue is less than or equal to the received storage threshold during the process of receiving multiple service data through the second receiving buffer queue; when it is detected that the current received storage value is greater than the received storage threshold, execute the step of detecting whether the current received storage value of the second receiving buffer queue is less than or equal to the received storage threshold during the process of the first chip receiving multiple service data through the second receiving buffer queue; the first sending module 21 is specifically configured to, when it is detected that the current received storage value is less than or equal to the received storage threshold, send a stop sending instruction or a deceleration sending instruction to the second chip through the control channel, so that the second chip stops sending service data in response to the stop sending instruction, or reduces the sending speed and sends the service data at the reduced sending speed in response to the deceleration sending instruction; the first receiving module 22 is specifically configured to execute the step of detecting whether the current received storage value of the second receiving buffer queue is less than or equal to the received storage threshold during the process of receiving multiple service data through the second receiving buffer queue.

[0197] In an embodiment of the present invention, the device further includes a statistics module 23.

[0198] As an alternative solution, the statistics module 23 is connected to the first sending module 21 and the first receiving module 22. The statistics module 23 is used to count the number of service requests sent by the first sending module 21. The statistics module 23 is used to receive the number of received service requests counted by the second chip and returned through the control channel. The statistics module 23 is used to subtract the number of received service requests from the number of sent service requests to obtain the number of lost service requests. In particular, if the number of lost service requests is 0, it indicates that the service requests are not lost.

[0199] As another alternative solution, the statistics module 23 is connected to the first receiving module 22. The statistics module 23 is used to count the number of received service data. The statistics module 23 is used to receive the number of sent service data counted by the second chip and returned through the control channel. The statistics module 23 is used to subtract the number of received service data from the number of sent service data to obtain the number of lost service data. In particular, if the number of lost service data is 0, it indicates that the service data is not lost.

[0200] In the technical solution of the multiplexing communication device provided by the embodiment of the present invention, the first chip receives the second preparation data packet sent by the second chip through the control channel at a set time interval. The second preparation data packet includes a second preparation identifier, and the second preparation identifier is used to indicate that the second chip is in a preparation state; in response to the second preparation identifier, the first chip sends a first preparation data packet to the second chip. The first preparation data packet includes a first preparation identifier, and the first preparation identifier is used to indicate that the first chip is in a preparation state; the second chip obtains a plurality of service requests from the first chip through the control channel, the second chip generates a plurality of service data in response to the plurality of service requests, and the first chip obtains a plurality of service data from the second chip through the control channel, thereby improving the communication efficiency and realizing the communication function of multi-service concurrency.

[0201] The embodiment of the present invention provides a multiplexing communication device, which is applied to the second chip. A communication interface is provided between the second chip and the first chip. The communication interface includes a virtual multiplexing channel, and the virtual multiplexing channel includes a control channel; a second transceiver module is used to communicate with the first chip through the control channel. The control channel is used to implement at least one of the following functions: the control channel is used to make the first chip and the second chip in a preparation state through a handshake communication method; the control channel is used to perform data flow control during the communication between the first chip and the second chip; the control channel is used to control the second chip to implement the communication behavior corresponding to the function function by remotely calling the function function of the second chip; the control channel is used to count the communication data of the communication between the first chip and the second chip. Figure 11 It is a schematic structural diagram of another multiplexing communication device provided by the embodiment of the present invention, as Figure 11 shown, the second transceiver module includes: a second receiving module 31, a generating module 32, and a second sending module 33.

[0202] The second receiving module 31 is connected to the generating module 32; the generating module 32 is connected to the second sending module 33.

[0203] The second sending module 33 is used to send a second preparation data packet to the first chip through the control channel at a set time interval. The second preparation data packet includes a second preparation identifier, and the second preparation identifier is used to indicate that the second chip is in a preparation state; the second receiving module 31 is used to receive the first preparation data packet sent by the first chip in response to the second preparation identifier. The first preparation data packet includes a first preparation identifier, and the first preparation identifier is used to indicate that the first chip is in a preparation state.

[0204] In an embodiment of the present invention, the second receiving module 31 is specifically configured to receive a plurality of service requests sent by the first chip through a control channel via a first receiving buffer queue provided; the generating module 32 is configured to generate a plurality of service data in response to the plurality of service requests; and the second sending module 33 is specifically configured to send the plurality of service data to the first chip through a control channel via a second sending buffer queue provided.

[0205] In an embodiment of the present invention, the second sending module 33 is specifically configured to apply for a second memory buffer area by invoking a buffer function module, and cache the plurality of service data into the second memory buffer area, where the service data includes an identifier corresponding to the service data; cache the plurality of service data in the second memory buffer area to the tail of the second sending buffer queue by invoking the Cmux Write API; and send the plurality of service data in the second sending buffer queue to the first chip through a control channel, so that the first chip can parse the identifiers corresponding to the plurality of service data to obtain a plurality of service types corresponding to the plurality of service data. The second receiving module 31 is specifically configured to obtain the plurality of service data corresponding to the plurality of service types.

[0206] In an embodiment of the present invention, the second receiving module 31 is specifically configured to detect whether the current receiving storage value of the first receiving buffer queue is less than or equal to a receiving storage threshold during the process of receiving the plurality of service requests through the first receiving buffer queue; when it is detected that the current receiving storage value is greater than the receiving storage threshold, execute the step of detecting whether the current receiving storage value of the first receiving buffer queue is less than or equal to the receiving storage threshold during the process of the second chip receiving the plurality of service requests through the first receiving buffer queue; the second sending module 33 is specifically configured to, when it is detected that the current receiving storage value is less than or equal to the receiving storage threshold, send a stop sending instruction or a decelerate sending instruction to the first chip through a control channel, so that the first chip stops sending service requests in response to the stop sending instruction, or reduces the sending speed and sends service requests at the reduced sending speed in response to the decelerate sending instruction; and the second receiving module 31 is specifically configured to execute the step of detecting whether the current receiving storage value of the first receiving buffer queue is less than or equal to the receiving storage threshold during the process of receiving the plurality of service requests through the first receiving buffer queue.

[0207] In an embodiment of the present invention, the generating module 32 is specifically configured to cache the plurality of service requests into different first receiving buffer queues corresponding to the service types of the service requests; generate corresponding plurality of service data according to the service requests in the plurality of first receiving buffer queues; and cache the plurality of service data into different second sending buffer queues corresponding to the service types of the service data.

[0208] In an embodiment of the present invention, the second sending module 33 is specifically configured to send service data in multiple second sending buffer queues to the first chip through a control channel according to the priorities of the second sending buffer queues, so that the first chip caches the multiple service data into second receiving buffer queues corresponding to different service types according to the service types of the service data.

[0209] In an embodiment of the present invention, the second receiving module 31 is specifically configured to receive a remote call instruction sent by the first chip through a control channel, where the remote call instruction includes a log instruction; in response to the log instruction, turn on or off the log of the second chip; and / or, receive a remote call instruction sent by the first chip through a control channel, where the remote call instruction includes a test instruction; in response to the test instruction, start a test application program and perform a test on itself through the test application program.

[0210] In the technical solution of the multiplexing communication device provided by the embodiment of the present invention, the first chip and the second chip communicate through a control channel, where the control channel is used to implement at least one of the following functions: the control channel is used to make the first chip and the second chip in a ready state through a handshake communication method; the control channel is used to perform data flow control during the communication between the first chip and the second chip; the control channel is used to control the second chip to implement the communication behavior corresponding to the function by remotely calling the function of the second chip; the control channel is used to count the communication data of the communication between the first chip and the second chip. In the embodiment of the present invention, the first chip and the second chip communicate through the control channel in the virtual multiplexing channel, thereby improving the communication efficiency and realizing the communication function of multi-service concurrency.

[0211] The embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, it controls the device where the computer-readable storage medium is located to execute the embodiment of the above multiplexing communication method.

[0212] Figure 12 FIG. is a schematic structural diagram of a first chip provided by an embodiment of the present invention, including: The first chip 4 in this embodiment includes: a processor 41, a memory 42, and a computer program 43 stored in the memory 42 and executable on the processor 41. When the computer program 43 is executed by the processor 41, it implements the seamless call method in the embodiment. To avoid repetition, it will not be described in detail here.

[0213] The first chip 4 includes, but is not limited to, a processor 41 and a memory 42. Those skilled in the art can understand that Figure 12This is only an example of the first chip 4 and does not constitute a limitation on the first chip 4. It may include more or fewer components than those shown in the figure, or combine certain components, or different components. For example, the network device may also include input / output devices, network access devices, buses, etc.

[0214] The so-called processor 41 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0215] The memory 42 may be an internal storage unit of the first chip 4, such as the hard disk or memory of the first chip 4. The memory 42 may also be an external storage device of the first chip 4, such as a plug-in hard disk equipped on the first chip 4, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 42 may also include both the internal storage unit of the first chip 4 and the external storage device. The memory 42 is used to store computer programs and other programs and data required by the network device. The memory 42 may also be used to temporarily store data that has been output or will be output.

[0216] Figure 13 This is a schematic structural diagram of a second chip provided by an embodiment of the present invention, including: The second chip 5 of this embodiment includes: a processor 51, a memory 52, and a computer program 53 stored in the memory 52 and executable on the processor 51. When the computer program 53 is executed by the processor 51, the seamless call method in the embodiment is implemented. To avoid repetition, it will not be elaborated here one by one.

[0217] The second chip 5 includes, but is not limited to, a processor 51 and a memory 52. Those skilled in the art can understand that Figure 13 This is only an example of the second chip 5 and does not constitute a limitation on the second chip 5. It may include more or fewer components than those shown in the figure, or combine certain components, or different components. For example, the network device may also include input / output devices, network access devices, buses, etc.

[0218] The so-called processor 51 may be a CPU, or may also be other general-purpose processors, DSPs, ASICs, FPGAs, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0219] The memory 52 may be an internal storage unit of the second chip 5, such as the hard disk or memory of the second chip 5. The memory 52 may also be an external storage device of the second chip 5, such as a plug-in hard disk, SMC, SD card, Flash Card, etc. equipped on the second chip 5. Further, the memory 52 may also include both the internal storage unit of the second chip 5 and the external storage device. The memory 52 is used to store computer programs and other programs and data required by the network device. The memory 52 may also be used to temporarily store data that has been output or is to be output.

[0220] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments and will not be described herein again.

[0221] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A multiplexing communication method, characterized in that, The method is applied to a first chip, and a communication interface is provided between the first chip and a second chip. The communication interface includes a virtual multiplexing channel, and the virtual multiplexing channel includes a control channel. The method includes: Communicating with the second chip through the control channel, where the control channel is used to implement at least one of the following functions: The control channel is used to make the first chip and the second chip in a ready state through a handshake communication method; The control channel is used to perform data flow control during the communication between the first chip and the second chip; The control channel is used to control the second chip to implement the communication behavior corresponding to the function by remotely calling the function of the second chip; The control channel is used to count the communication data of the communication between the first chip and the second chip.

2. The method according to claim 1, wherein The communicating with the second chip through the control channel includes: Receiving a second ready data packet sent by the second chip through the control channel at a set time interval. The second ready data packet includes a second ready identifier, and the second ready identifier is used to indicate that the second chip is in a ready state; In response to the second ready identifier, sending a first ready data packet to the second chip. The first ready data packet includes a first ready identifier, and the first ready identifier is used to indicate that the first chip is in a ready state.

3. The method according to claim 1, wherein The communicating with the second chip through the control channel includes: Sending a plurality of service requests to the second chip through the control channel via a set first transmission buffer queue for the second chip to generate a plurality of service data in response to the plurality of service requests; Receiving the plurality of service data sent by the second chip through the control channel via a set second reception buffer queue.

4. The method according to claim 3, characterized in that, The sending a plurality of service requests to the second chip through the control channel via the set first transmission buffer queue includes: Applying for a first memory buffer area by calling a buffer function module and caching the plurality of service requests in the first memory buffer area, where the service requests include identifiers corresponding to the service requests; Caching the plurality of service requests in the first memory buffer area into the tail of the first transmission buffer queue by calling a multiplexer write interface; Sending the plurality of service requests in the first transmission buffer queue to the second chip through the control channel for the second chip to parse the identifiers corresponding to the plurality of service requests to obtain a plurality of service types corresponding to the plurality of service requests and acquire the plurality of service requests corresponding to the plurality of service types.

5. The method according to claim 3, wherein The sending a plurality of service requests to the second chip through the control channel via the set first transmission buffer queue includes: Caching the plurality of service requests into different first transmission buffer queues corresponding to the service types of the service requests; Sending the service requests in the plurality of first transmission buffer queues to the second chip through the control channel according to the priority of the first transmission buffer queue.

6. The method according to claim 3, wherein The second receiving buffer queue is set up to receive multiple service data sent by the second chip through the control channel, including: During the process of receiving multiple service data through the second receiving buffer queue, detecting whether the current received storage value of the second receiving buffer queue is less than or equal to the received storage threshold; When it is detected that the current received storage value is greater than the received storage threshold, performing the step of detecting whether the current received storage value of the second receiving buffer queue is less than or equal to the received storage threshold during the process of the first chip receiving multiple service data through the second receiving buffer queue; When it is detected that the current received storage value is less than or equal to the received storage threshold, sending a stop sending instruction or a decelerated sending instruction to the second chip through the control channel, so that the second chip stops sending the service data in response to the stop sending instruction, or reduces the sending speed and sends the service data at the reduced sending speed in response to the decelerated sending instruction, and performing the step of detecting whether the current received storage value of the second receiving buffer queue is less than or equal to the received storage threshold during the process of receiving multiple service data through the second receiving buffer queue.

7. The method according to claim 3, characterized in that, After sending multiple service requests to the second chip through the control channel by setting up the first sending buffer queue, including: counting the number of sent service requests; receiving the number of received service requests counted and returned by the second chip; subtracting the number of received service requests from the number of sent service requests to obtain the number of lost service requests; and / or After receiving the multiple service data sent by the second chip through the control channel by setting up the second receiving buffer queue, further including: receiving the number of sent service data counted by the second chip and returned through the control channel; counting the number of received service data; subtracting the number of received service data from the number of sent service data to obtain the number of lost service data.

8. A multiplexing communication method, characterized in that, The method is applied to the second chip, and a communication interface is set between the second chip and the first chip. The communication interface includes a virtual multiplexing channel, and the virtual multiplexing channel includes a control channel. The method includes: Communicating with the first chip through the control channel, where the control channel is used to implement at least one of the following functions: The control channel is used to make the first chip and the second chip in a ready state through a handshake communication method; The control channel is used to perform data flow control during the communication between the first chip and the second chip; The control channel is used to control the second chip to implement the communication behavior corresponding to the function function by remotely calling the function function of the second chip; The control channel is used to count the communication data of the communication between the first chip and the second chip.

9. The method according to claim 8, wherein The communicating with the first chip through the control channel includes: Send a second preparation data packet to the first chip through the control channel at a set time interval. The second preparation data packet includes a second preparation identifier, and the second preparation identifier is used to indicate that the second chip is in a preparation state; Receive a first preparation data packet sent by the first chip in response to the second preparation identifier. The first preparation data packet includes a first preparation identifier, and the first preparation identifier is used to indicate that the first chip is in a preparation state.

10. The method according to claim 8, wherein The communication with the first chip through the control channel includes: Receive multiple service requests sent by the first chip through the control channel via a set first receive buffer queue; Generate multiple service data in response to the multiple service requests; Send multiple service data to the first chip through the control channel via a set second send buffer queue.

11. The method according to claim 10, wherein The step of sending multiple service data to the first chip through the control channel via the set second send buffer queue includes: Apply for a second memory buffer area by calling a buffer function module, and cache the multiple service data into the second memory buffer area, where the service data includes an identifier corresponding to the service data; Cache the multiple service data in the second memory buffer area into the tail of the second send buffer queue by calling a multiplexer write interface; Send the multiple service data in the second send buffer queue to the first chip through the control channel, so that the first chip can parse the identifiers corresponding to the multiple service data to obtain multiple service types corresponding to the multiple service data, and acquire the multiple service data corresponding to the multiple service types.

12. The method according to claim 10, wherein The step of receiving multiple service requests sent by the first chip through the control channel via the set first receive buffer queue includes: Detect whether the current receive storage value of the first receive buffer queue is less than or equal to the receive storage threshold during the process of receiving multiple service requests through the first receive buffer queue; When it is detected that the current receive storage value is greater than the receive storage threshold, execute the step of detecting whether the current receive storage value of the first receive buffer queue is less than or equal to the receive storage threshold during the process of the second chip receiving multiple service requests through the first receive buffer queue; When it is detected that the current receive storage value is less than or equal to the receive storage threshold, send a stop sending instruction or a decelerate sending instruction to the first chip through the control channel, so that the first chip stops sending the service requests in response to the stop sending instruction, or reduces the sending speed and sends the service requests at the reduced sending speed in response to the decelerate sending instruction, and execute the step of detecting whether the current receive storage value of the first receive buffer queue is less than or equal to the receive storage threshold during the process of receiving multiple service requests through the first receive buffer queue.

13. The method according to claim 10, characterized in that, The generation of multiple service data in response to the multiple service requests includes: Cache the multiple service requests into different first receive buffer queues corresponding to the service types according to the service types of the service requests; Generate corresponding multiple service data according to service requests in multiple said first receiving buffer queues; Cache the multiple said service data into different second sending buffer queues corresponding to the service types of the service data.

14. The method according to claim 10, wherein Sending multiple service data to the first chip through the control channel by means of the second sending buffer queues provided, includes: Send the service data in multiple said second sending buffer queues to the first chip through the control channel according to the priorities of the second sending buffer queues, so that the first chip caches the multiple said service data into different second receiving buffer queues corresponding to the service types of the service data.

15. The method according to claim 8, wherein Further includes: Receive a remote call instruction sent by the first chip through the control channel, where the remote call instruction includes a log instruction; in response to the log instruction, turn on or off the log of the second chip; and / or, Receive a remote call instruction sent by the first chip through the control channel, where the remote call instruction includes a test instruction; in response to the test instruction, start a test application program and perform self-testing through the test application program.

16. A multiplex communication device, characterized in that, The device is applied to a first chip, a communication interface is provided between the first chip and the second chip, the communication interface includes a virtual multiplexing channel, and the virtual multiplexing channel includes a control channel; the device includes: A first transceiver module for communicating with the second chip through the control channel, where the control channel is used to implement at least one of the following functions: The control channel is used to make the first chip and the second chip in a ready state through a handshake communication method; The control channel is used to perform data flow control during the communication between the first chip and the second chip; The control channel is used to control the second chip to implement the communication behavior corresponding to the function by remotely calling the function of the second chip; The control channel is used to count the communication data of the communication between the first chip and the second chip.

17. A multiplex communication device, characterized in that, The device is applied to a second chip, a communication interface is provided between the second chip and the first chip, the communication interface includes a virtual multiplexing channel, and the virtual multiplexing channel includes a control channel; the device includes: A second transceiver module for communicating with the first chip through the control channel, where the control channel is used to implement at least one of the following functions: The control channel is used to make the first chip and the second chip in a ready state through a handshake communication method; The control channel is used to perform data flow control during the communication between the first chip and the second chip; The control channel is used to control the second chip to implement the communication behavior corresponding to the function by remotely calling the function of the second chip; The control channel is used to count the communication data of the communication between the first chip and the second chip.

18. A first chip, characterized in that, Includes: One or more processors; A memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the device, cause the device to perform the method according to any one of claims 1 to 7.

19. A second chip, characterized in that, Comprising: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the device, cause the device to perform the method according to any one of claims 8 to 15.

20. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program runs, it controls the device where the computer-readable storage medium is located to perform the method according to any one of claims 1 to 7 or claims 8 to 15.

Citation Information

Patent Citations

  • Chip state monitoring method, device and chip

    CN102369517A

  • Double-CPU communication method and system and system-on-chip chip

    CN104657326A