CN113765935A - Communication method and device, readable storage medium, application processor and terminal - Google Patents

Communication method and device, readable storage medium, application processor and terminal Download PDF

Info

Publication number
CN113765935A
CN113765935A CN202111094684.2A CN202111094684A CN113765935A CN 113765935 A CN113765935 A CN 113765935A CN 202111094684 A CN202111094684 A CN 202111094684A CN 113765935 A CN113765935 A CN 113765935A
Authority
CN
China
Prior art keywords
coprocessor
function
channel identifier
driving
processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111094684.2A
Other languages
Chinese (zh)
Other versions
CN113765935B (en
Inventor
周卫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Shenzhen Co ltd
Original Assignee
Spreadtrum Communications Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Communications Shenzhen Co ltd filed Critical Spreadtrum Communications Shenzhen Co ltd
Priority to CN202111094684.2A priority Critical patent/CN113765935B/en
Publication of CN113765935A publication Critical patent/CN113765935A/en
Application granted granted Critical
Publication of CN113765935B publication Critical patent/CN113765935B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Advance Control (AREA)

Abstract

A communication method and device, a readable storage medium, an application processor and a terminal are provided, and the method comprises the following steps: determining the driving types of a plurality of coprocessors, and then determining the driving function of each coprocessor based on the driving types; establishing a channel identifier of each coprocessor, and establishing a mapping relation between each channel identifier and a drive function of the coprocessor; when data needs to be transmitted and received with any coprocessor, a channel identifier of the coprocessor is determined, and then a driving function of the coprocessor is called to transmit and receive data based on a mapping relation between the channel identifier and the driving function of the coprocessor. The invention can call the drive function to transmit and receive data when transmitting and receiving data, and improve the success rate of data transmission and reception between the application processor and the coprocessors with various drive types.

Description

Communication method and device, readable storage medium, application processor and terminal
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a communication method and apparatus, a readable storage medium, an application processor, and a terminal.
Background
In smart terminal products, such as wearable smart watches, Remote Procedure Control (RPC) needs to be called across chips, for example, an Application Processor (AP) can call a Coprocessor (CP) to complete a service requested from an external.
In an integrated chip or Micro Controller Unit (MCU) chip, a single application processor and a plurality of coprocessors may be integrated, and the application processor and the plurality of coprocessors need to be respectively connected in communication to achieve mutual data transmission. Wherein, the plurality of coprocessors have respective drive types, and the drive types of different coprocessors are the same or different.
However, in the prior art, when the application processor communicates with the coprocessor, the problem of communication failure is easy to occur.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a communication method and device, a readable storage medium, an application processor and a terminal, which can call a driving function to receive and transmit data when receiving and transmitting data, and improve the success rate of data receiving and transmitting between the application processor and coprocessors of various driving types.
To solve the foregoing technical problem, an embodiment of the present invention provides a communication method applied to an application processor, including: determining the driving types of a plurality of coprocessors, and then determining the driving function of each coprocessor based on the driving types; establishing a channel identifier of each coprocessor, and establishing a mapping relation between each channel identifier and a drive function of the coprocessor; when data needs to be transmitted and received with any coprocessor, a channel identifier of the coprocessor is determined, and then a driving function of the coprocessor is called to transmit and receive data based on a mapping relation between the channel identifier and the driving function of the coprocessor.
Optionally, the establishing a mapping relationship between each channel identifier and the driving function of the coprocessor includes: establishing a mapping relation between each channel identifier and the identifier of the drive function of the coprocessor; the identification of the drive function of the coprocessor is a handle or an address pointer of the drive function of the coprocessor.
Optionally, invoking a driving function of the coprocessor to perform data transceiving includes: receiving a service request from the outside, and determining a coprocessor for executing the service request and a channel identifier thereof; and calling a driving function of the coprocessor and sending the service request to the coprocessor.
Optionally, invoking a driving function of the coprocessor to perform data transceiving further includes: calling a driving function of the coprocessor, and receiving a service processing result from the coprocessor; and the service processing result is obtained by processing the service request by the coprocessor.
Optionally, before invoking a driver function of the coprocessor to perform data transceiving, the method further includes: respectively initiating connection to each coprocessor; receiving an acknowledgement instruction from at least a portion of the coprocessor; and establishing connection with the coprocessor which sends back the confirmation instruction.
Optionally, after the driver function of the coprocessor is called for data transceiving, the method further includes: calling a driving function of the coprocessor based on the mapping relation between the channel identification and the driving function of the coprocessor, and sending logout indication information to the coprocessor; and the logout indication information is used for indicating the coprocessor to return an unacknowledged UACK instruction and logout a channel between the coprocessor and the application processor.
Optionally, the method further includes: disconnecting the connection with the coprocessor.
Optionally, before initiating connection to each coprocessor respectively, the method further includes: storing channel identification, driving type and function pointer of operation instruction of each coprocessor; after disconnecting from the coprocessor, the method further comprises: and releasing the channel identification, the driving type and the function pointer of the operation instruction of the disconnected coprocessor.
Optionally, the driving types of the plurality of coprocessors are selected from: USB, SPI, shared memory.
To solve the above technical problem, an embodiment of the present invention provides a communication apparatus, including: the function determining module is used for determining the driving types of the coprocessors and then determining the driving function of each coprocessor based on the driving types; the coprocessor comprises a channel identifier establishing module, a channel identifier establishing module and a coprocessor driving function establishing module, wherein the channel identifier establishing module is used for establishing a channel identifier of each coprocessor and establishing a mapping relation between each channel identifier and the driving function of the coprocessor; and the data receiving and transmitting module is used for determining the channel identifier of the coprocessor when data is required to be received and transmitted with any coprocessor, and then calling the driving function of the coprocessor to receive and transmit data based on the mapping relation between the channel identifier and the driving function of the coprocessor.
To solve the technical problem, an embodiment of the present invention provides a readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to perform the steps of the communication method.
In order to solve the above technical problem, an embodiment of the present invention provides an application processor, including a memory and a processor, where the memory stores a computer program capable of running on the processor, and the processor executes the steps of the above communication method when running the computer program.
To solve the foregoing technical problem, an embodiment of the present invention provides a terminal, where the terminal includes the foregoing application processor and multiple coprocessors.
Compared with the prior art, the technical scheme of the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the application processor firstly determines the drive types of a plurality of coprocessors, then determines the drive function of each coprocessor based on the drive types, and establishes the mapping relation between the channel identifier and the drive function, so that the drive function can be called to transmit and receive data when the data is transmitted and received, and the success rate of data transmission and reception between the application processor and the coprocessors with various drive types is improved.
Further, the application processor receives a service request from the outside, and determines a coprocessor for executing the service request and a channel identifier thereof; and the application processor calls a driving function of the coprocessor and sends the service request to the coprocessor. Therefore, when the application processor sends a service request to the coprocessor, the sending success rate can be improved by calling the driving function.
Further, the application processor calls a driving function of the coprocessor and receives a service processing result from the coprocessor. Therefore, when the coprocessor sends a service processing result to the application processor, the application processor can improve the receiving success rate by calling the driving function.
Further, the application processor calls the drive function of the coprocessor based on the mapping relation between the channel identifier and the drive function of the coprocessor, and sends logout indication information to the coprocessor. Therefore, when data is not required to be transmitted and received, the application processor can inform the coprocessor to logout a channel between the coprocessor and the application processor, the storage space is effectively saved, and the power consumption is reduced.
Furthermore, after the application processor is disconnected from the coprocessor, the channel identifier, the driving type and the function pointer of the operation instruction of the disconnected coprocessor are released, so that the storage space can be further saved.
Drawings
FIG. 1 is a flow chart of a method of communication in an embodiment of the invention;
FIG. 2 is a schematic diagram of an application processor communicating with a plurality of coprocessors according to an embodiment of the present invention;
FIG. 3 is a flow chart of another method of communication in an embodiment of the present invention;
FIG. 4 is a flow chart of yet another method of communication in an embodiment of the present invention;
FIG. 5 is a schematic diagram of communication between an application processor and a single coprocessor in an embodiment of the present invention;
FIG. 6 is a schematic diagram of an operating scenario of initialization and non-initialization of a coprocessor according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a communication device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another communication device in the embodiment of the present invention.
Detailed Description
However, in the prior art, when the application processor is required to communicate with the multiple coprocessors, multiple sets of different codes are used, centralized management cannot be performed, large code space occupation, high resource consumption, difficult code maintenance, long software development period, and communication failure and the like can occur if a driver is configured and used incorrectly.
Specifically, in the prior art, there are various coprocessors, such as a modem (modem), a camera (camera), a Digital Signal Processing (DSP), etc., which may provide a professional Application Processor Interface (API) therein to implement various functions, such as implementing functions of a telecommunication service, such as telephone, short message, internet access, etc., and implementing functions of a multimedia service, such as taking a picture, recording a video, etc.
In the communication mode of making API call between application processor and coprocessor, the application processor is limited by bandwidth or other factors, and some specific functions can only be implemented in coprocessor, such as modem, and API capable of providing telecommunication and data service. In order to implement telecommunication applications, such as telephone, short message, internet function, etc., the application processor needs to use an API at the coprocessor, and this implementation technology is also called Remote Procedure Control (RPC).
The inventor of the present invention has found through research that, in the conventional RPC technology, the application processor is in remote communication with a single coprocessor, so the application processor can predetermine the drive function of the coprocessor, and further, data transceiving failure caused by the use error of the drive function is not easy to occur during communication. In a terminal integrating a single application processor and a plurality of coprocessors, because the application processor does not determine the driving function of each coprocessor, when the application processor communicates with the coprocessors, the problem of communication failure is easy to occur.
In an existing embodiment, the most adopted driver type is selected as the default driver type, so that the success rate is high when the application processor communicates with the coprocessor of the default driver type. However, when the application processor communicates with the co-processor of other driver type, the problem of communication failure still easily occurs.
In an embodiment of the present invention, a communication method applied to an application processor is provided, including: determining the driving types of a plurality of coprocessors, and then determining the driving function of each coprocessor based on the driving types; establishing a channel identifier of each coprocessor, and establishing a mapping relation between each channel identifier and a drive function of the coprocessor; when data needs to be transmitted and received with any coprocessor, a channel identifier of the coprocessor is determined, and then a driving function of the coprocessor is called to transmit and receive data based on a mapping relation between the channel identifier and the driving function of the coprocessor. By adopting the scheme, the application processor firstly determines the drive types of the coprocessors, then determines the drive functions of the coprocessors based on the drive types, and establishes the mapping relation between the channel identifiers and the drive functions, so that the drive functions can be called to transmit and receive data when the data is transmitted and received, and the success rate of data transmission and reception between the application processor and the coprocessors with various drive types is improved.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Referring to fig. 1, fig. 1 is a flowchart of a communication method according to an embodiment of the present invention. The communication method may include steps S11 to S13:
step S11: determining the driving types of a plurality of coprocessors, and then determining the driving function of each coprocessor based on the driving types;
step S12: establishing a channel identifier of each coprocessor, and establishing a mapping relation between each channel identifier and a drive function of the coprocessor;
step S13: when data needs to be transmitted and received with any coprocessor, a channel identifier of the coprocessor is determined, and then a driving function of the coprocessor is called to transmit and receive data based on a mapping relation between the channel identifier and the driving function of the coprocessor.
It will be appreciated that in a specific implementation, the method may be implemented in the form of a software program running on a processor integrated within a chip or chip module.
In the specific implementation of step S11, the application processor needs to communicate with multiple coprocessors.
Referring to fig. 2, fig. 2 is a schematic diagram of a communication between an application processor and a plurality of coprocessors according to an embodiment of the present invention.
As shown in fig. 2, in an integrated chip or MCU chip of the terminal, a single application processor 21 and a plurality of coprocessors 22 may be integrated, wherein the plurality of coprocessors 22 respectively communicate with the application processor 21.
It should be noted that, in the embodiment of the present invention, there is no limitation on whether the communication is performed between the coprocessors 22.
With continued reference to fig. 1, in an implementation of step S11, the application processor first determines the driver types of the multiple coprocessors, and then determines the driver functions of the respective coprocessors based on the driver types.
Further, the driving types of the plurality of coprocessors may be selected from: universal Serial Bus (USB), Serial Peripheral Interface (SPI), and shared memory.
The Driver function may be a Device Driver (Device Driver), which is a special program that enables the computer and the Device to communicate with each other, and is equivalent to a hardware interface, and the operating system can only control the operation of the hardware Device through the interface, and if the Driver of a Device is not installed correctly, the Device cannot operate normally.
Further, the drive types of the respective coprocessors are different, and the drive functions are different. For the determined driving type, a conventional driving function may be adopted, or a driving function meeting the requirement may be written according to a specific situation, and the embodiment of the present invention does not limit the programming manner.
In particular implementations, the driver function may be determined based on the driver type and invoked in a subsequent step.
In step S12, the application processor may establish a channel identifier of each coprocessor, and establish a mapping relationship between each channel identifier and a driving function of the coprocessor.
The channel identifier may be used to indicate a channel between the application processor and the coprocessor, and for example, a sequence number or an index (index) of the coprocessor may be used as the channel identifier, or other identification information capable of uniquely determining the coprocessor may be used.
In specific implementation, by establishing a mapping relationship between each channel identifier and the driver function of the coprocessor, after the channel identifier is determined, a correct driver function can be called based on the mapping relationship.
Further, the step of establishing a mapping relationship between each channel identifier and a driving function of the coprocessor may include: establishing a mapping relation between each channel identifier and the identifier of the drive function of the coprocessor; the identification of the drive function of the coprocessor is a handle or an address pointer of the drive function of the coprocessor.
In one embodiment, the handle may be dynamic, and the value of the handle is set to 0 before the application processor is connected to the coprocessor; after the application processor is connected to the coprocessor, the value of the handle is set to be not 0 (such as 1) so as to work normally.
In a specific implementation of step S13, when data needs to be transceived with any coprocessor, determining a channel identifier of the coprocessor, and then calling a driver function of the coprocessor to transceive data based on a mapping relationship between the channel identifier and the driver function of the coprocessor.
In the embodiment of the invention, the application processor firstly determines the drive types of a plurality of coprocessors, then determines the drive function of each coprocessor based on the drive types, and establishes the mapping relation between the channel identifier and the drive function, so that the drive function can be called to transmit and receive data when the data is transmitted and received, and the success rate of data transmission and reception between the application processor and the coprocessors with various drive types is improved.
Further, the step of calling the driver function of the coprocessor to perform data transceiving may include: receiving a service request from the outside, and determining a coprocessor for executing the service request and a channel identifier thereof; and calling a driving function of the coprocessor and sending the service request to the coprocessor.
In the embodiment of the invention, the application processor calls the drive function of the coprocessor and sends the service request to the coprocessor, so that the sending success rate can be improved by calling the drive function when the application processor sends the service request to the coprocessor.
Specifically, the service request may be a request input by a user, such as accessing a network, making a call, viewing weather, viewing date, and the like.
It can be understood that, in a terminal integrating a plurality of coprocessors, the service requests are usually respectively completed by the respective coprocessors.
Further, the step of calling the driver function of the coprocessor to perform data transceiving may further include: calling a driving function of the coprocessor, and receiving a service processing result from the coprocessor; and the service processing result is obtained by processing the service request by the coprocessor.
It should be noted that, in the embodiment of the present invention, the coprocessor may process the service request in a conventional processing manner, and the embodiment of the present invention does not limit a specific service request processing manner.
In the embodiment of the invention, the application processor calls the drive function of the coprocessor and receives the service processing result from the coprocessor. Therefore, when the coprocessor sends a service processing result to the application processor, the application processor can improve the receiving success rate by calling the driving function.
In a specific implementation, each channel may be assigned a separate management data structure, including the size (size) of the channel, channel preparation status, handle for operating the underlying driver to read and write, and established thread IDs and synchronization objects. The channel preparation condition can be used to indicate whether the channel is ready to perform data transmission.
Referring to fig. 3, fig. 3 is a flow chart of another communication method in the embodiment of the present invention. The other communication method may include steps S11 to S13 in fig. 1, may further include steps S31 to S33, and may further include steps S34 and S35, and the following describes different steps between fig. 3 and fig. 2.
It should be noted that the sequence numbers of the steps in this embodiment do not represent a limitation on the execution sequence of the steps. For example, steps S31 through S33 may also be performed before step S21, or before step S22.
In step S31, a connection may be initiated to each coprocessor, respectively.
In step S32, an Acknowledgement (ACK) instruction may be received from at least a portion of the coprocessor.
In step S33, a connection may be established with the coprocessor that sent the confirmation instruction back.
It will be appreciated that after the connection is established, the application processor may retrieve the name and version number of the co-processor.
In step S34, after the driver function of the coprocessor is called for data transceiving, the driver function of the coprocessor is called based on the mapping relationship between the channel identifier and the driver function of the coprocessor, and logout instruction information is sent to the coprocessor; wherein the logout indication information is used for indicating the coprocessor to return a non-acknowledgement (UACK) instruction and logout a channel between the coprocessor and the application processor.
In the embodiment of the present invention, the application processor invokes the driver function of the coprocessor based on the mapping relationship between the channel identifier and the driver function of the coprocessor, and sends logout instruction information to the coprocessor. Therefore, when data is not required to be transmitted and received, the application processor can inform the coprocessor to logout a channel between the coprocessor and the application processor, the storage space is effectively saved, and the power consumption is reduced.
In step S35, the connection with the coprocessor is broken.
In the embodiment of the invention, the application processor is disconnected from the coprocessor, so that the storage space can be further released, and the power consumption is reduced.
Referring to fig. 4, fig. 4 is a flowchart of another communication method according to an embodiment of the present invention. The still another communication method may include steps S21 to S23, and steps S31 to S35 in fig. 3, and the different steps between fig. 4 and fig. 3 will be explained below.
It should be noted that the sequence numbers of the steps in this embodiment do not represent a limitation on the execution sequence of the steps.
In step S41, before initiating a connection to each coprocessor, a function pointer of a channel identifier, a driver type, and an operation instruction of each coprocessor may be stored.
In step S42, after the connection with the coprocessor is disconnected, the function pointer of the channel identifier, the driving type, and the operation instruction of the disconnected coprocessor may be released.
The function pointer of the operation instruction may be used to indicate action information to be operated by the coprocessor, and may be selected from: open (open), read (read), write (write), release (release).
In the embodiment of the invention, after the application processor is disconnected from the coprocessor, the channel identifier, the driving type and the function pointer of the operation instruction of the disconnected coprocessor are released, so that the storage space can be further saved.
As previously described, in implementations, a separate management data structure may be assigned to each channel. In a specific implementation manner of the embodiment of the present invention, the channel identifier, the driver type, and the function pointer of the operation instruction of each coprocessor may be stored in respective management data structures.
Furthermore, a data link table can be established for the channel identifier, the drive type and the function pointer of the operation instruction of each coprocessor, so that the calling efficiency is improved.
Referring to fig. 5, fig. 5 is a schematic diagram of communication between an application processor and a single coprocessor in an embodiment of the present invention.
Specifically, the dashed lines shown in fig. 5 may refer to logical paths and the solid lines may refer to physical paths.
In the physical path, the application processor and the single coprocessor can be realized by calling stub code (stub) function. Specifically, at an Application Processor (AP) side, an API is formed based on a service request, an AP stub code function (AP stub encap) is formed, a Remote Procedure Control (RPC) core (core) is input, and then, an Inter-Processor Communication (IPC) Driver (DRV) communicates with an IPC driver at a Coprocessor (CP) side, and further, the API is sent to the CP side via the RPC core and the CP stub code function at the coprocessor side.
Referring to fig. 6, fig. 6 is a schematic diagram of an operation scenario of coprocessor initialization and non-initialization in the embodiment of the present invention.
As shown in fig. 6, Coprocessor (CP) initialization is performed first, CP communication initialization (init) is performed, and IPC registration (Register) is performed.
In particular, CP initialization may be turned on by system initialization of an Application Processor (AP), such as setting up AP auto system initialization at power-on. And then the AP starts the CP by calling a function, and the internal program can be initialized by itself after the CP is started.
Further, when CP is to be initialized (unit), CP initialization may be performed first, followed by CP communication initialization (Uninit IPC), and then IPC deregistration (Unregister) may be performed.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a communication device according to an embodiment of the present invention. The communication device may include:
a function determining module 71, configured to determine driving types of the multiple coprocessors, and then determine a driving function of each coprocessor based on the driving types;
a channel identifier establishing module 72, configured to establish a channel identifier of each coprocessor, and establish a mapping relationship between each channel identifier and a driving function of the coprocessor;
the data transceiving module 73 is configured to determine a channel identifier of the coprocessor when data is required to be transceived with any one coprocessor, and then call a driving function of the coprocessor to transceive data based on a mapping relationship between the channel identifier and the driving function of the coprocessor.
In a specific implementation, the apparatus may correspond to a chip having a communication function in a user equipment; or to a chip module including a chip having a communication function in the user equipment, or to the user equipment.
For the principle, specific implementation and beneficial effects of the communication apparatus, reference is made to the related description of the communication method described above, and details are not repeated here.
Embodiments of the present invention also provide a readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the above method. The readable storage medium may be a computer readable storage medium, and may include, for example, a non-volatile (non-volatile) or non-transitory (non-transitory) memory, and may further include an optical disc, a mechanical hard disk, a solid state hard disk, and the like.
The embodiment of the present invention further provides an application processor, which includes a memory and a processor, where the memory stores a computer program capable of running on the processor, and the processor executes the steps of the method when running the computer program.
The embodiment of the invention also provides a terminal, which can comprise the application processor and a plurality of coprocessors.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an application processor according to an embodiment of the present invention.
The application processor 800 comprises at least one processor 801 and at least one memory 802 for storing computer programs and/or data. A memory 802 is coupled to the processor 801. The processor 801 is configured to execute the computer programs and/or data stored in the memory 802 to implement the communication methods described above and shown in fig. 1. The coupling in the embodiments of the present application is a spaced coupling or communication connection between devices, units or modules, and may be in an electrical, mechanical or other form, and is used for information interaction between the devices, units or modules. As another implementation, memory 802 may also be located outside of applications processor 800. The processor 801 may operate in conjunction with the memory 802. The processor 801 may execute computer programs stored in the memory 802. At least one of the at least one memory may be included in the processor.
In some embodiments, applications processor 800 may also include a communications interface 803, communications interface 803 being used to communicate with other devices over a transmission medium, such that modules used in apparatus 800 may communicate with other devices. Illustratively, the communication interface 803 may be a transceiver, circuit, bus, module, or other type of communication interface.
The connection medium between the communication interface 803, the processor 801, and the memory 802 is not limited in the embodiment of the present application. For example, in fig. 8, the memory 802 and the communication interface 803 are connected to the processor 801 in the embodiment of the present application. Of course, in the embodiment of the present application, the memory 802, the communication interface 803, and the processor 801 may be connected by a bus, and the bus may be divided into an address bus, a data bus, a control bus, and the like.
In the embodiments of the present application, the processor may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.
In the embodiment of the present application, the memory may be a nonvolatile memory, such as a Hard Disk Drive (HDD) or a solid-state drive (SSD), and may also be a volatile memory, for example, a random-access memory (RAM). The memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function for storing a computer program and/or data.
The method provided by the embodiment of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present invention are wholly or partially generated when the computer program is loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a computer network, a network appliance, a user device, or other programmable apparatus. The computer program may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a Digital Video Disk (DVD)), or a semiconductor medium (e.g., an SSD), among others.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Each module/unit included in each apparatus and product described in the above embodiments may be a software module/unit, or may also be a hardware module/unit, or may also be a part of a software module/unit and a part of a hardware module/unit. For example, for each device or product applied to or integrated into a chip, each module/unit included in the device or product may be implemented by hardware such as a circuit, or at least a part of the module/unit may be implemented by a software program running on a processor integrated within the chip, and the rest (if any) part of the module/unit may be implemented by hardware such as a circuit; for each device or product applied to or integrated with the chip module, each module/unit included in the device or product may be implemented by using hardware such as a circuit, and different modules/units may be located in the same component (e.g., a chip, a circuit module, etc.) or different components of the chip module, or at least some of the modules/units may be implemented by using a software program running on a processor integrated within the chip module, and the rest (if any) of the modules/units may be implemented by using hardware such as a circuit; for each device and product applied to or integrated in the terminal, each module/unit included in the device and product may be implemented by using hardware such as a circuit, and different modules/units may be located in the same component (e.g., a chip, a circuit module, etc.) or different components in the terminal, or at least part of the modules/units may be implemented by using a software program running on a processor integrated in the terminal, and the rest (if any) part of the modules/units may be implemented by using hardware such as a circuit.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (13)

1. A communication method applied to an application processor, comprising:
determining the driving types of a plurality of coprocessors, and then determining the driving function of each coprocessor based on the driving types;
establishing a channel identifier of each coprocessor, and establishing a mapping relation between each channel identifier and a drive function of the coprocessor;
when data needs to be transmitted and received with any coprocessor, a channel identifier of the coprocessor is determined, and then a driving function of the coprocessor is called to transmit and receive data based on a mapping relation between the channel identifier and the driving function of the coprocessor.
2. The communication method according to claim 1, wherein establishing a mapping relationship between each channel identifier and a driver function of the coprocessor comprises:
establishing a mapping relation between each channel identifier and the identifier of the drive function of the coprocessor;
the identification of the drive function of the coprocessor is a handle or an address pointer of the drive function of the coprocessor.
3. The communication method according to claim 1, wherein calling a driver function of the co-processor to perform data transceiving comprises:
receiving a service request from the outside, and determining a coprocessor for executing the service request and a channel identifier thereof;
and calling a driving function of the coprocessor and sending the service request to the coprocessor.
4. The communication method according to claim 3, wherein calling a driver function of the co-processor for data transceiving further comprises:
calling a driving function of the coprocessor, and receiving a service processing result from the coprocessor;
and the service processing result is obtained by processing the service request by the coprocessor.
5. The communication method according to claim 1, wherein before calling a driver function of the co-processor for data transceiving, the method further comprises:
respectively initiating connection to each coprocessor;
receiving an acknowledgement instruction from at least a portion of the coprocessor;
and establishing connection with the coprocessor which sends back the confirmation instruction.
6. The communication method according to claim 5, wherein after calling a driver function of the co-processor for data transceiving, the method further comprises:
calling a driving function of the coprocessor based on the mapping relation between the channel identification and the driving function of the coprocessor, and sending logout indication information to the coprocessor;
and the logout indication information is used for indicating the coprocessor to return an unacknowledged UACK instruction and logout a channel between the coprocessor and the application processor.
7. The communication method according to claim 5 or 6, characterized in that the method further comprises:
disconnecting the connection with the coprocessor.
8. The communication method according to claim 7,
before initiating connections to the respective coprocessors, the method further comprises: storing channel identification, driving type and function pointer of operation instruction of each coprocessor;
after disconnecting from the coprocessor, the method further comprises: and releasing the channel identification, the driving type and the function pointer of the operation instruction of the disconnected coprocessor.
9. The communication method according to claim 1,
the drive types of the plurality of coprocessors are selected from: USB, SPI, shared memory.
10. A communications apparatus, comprising:
the function determining module is used for determining the driving types of the coprocessors and then determining the driving function of each coprocessor based on the driving types;
the coprocessor comprises a channel identifier establishing module, a channel identifier establishing module and a coprocessor driving function establishing module, wherein the channel identifier establishing module is used for establishing a channel identifier of each coprocessor and establishing a mapping relation between each channel identifier and the driving function of the coprocessor;
and the data receiving and transmitting module is used for determining the channel identifier of the coprocessor when data is required to be received and transmitted with any coprocessor, and then calling the driving function of the coprocessor to receive and transmit data based on the mapping relation between the channel identifier and the driving function of the coprocessor.
11. A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the communication method according to any one of claims 1 to 9.
12. An application processor comprising a memory and a processor, the memory having stored thereon a computer program operable on the processor, wherein the processor, when executing the computer program, performs the steps of the communication method of any of claims 1 to 9.
13. A terminal, characterized in that the terminal comprises an application processor according to claim 12 and a plurality of co-processors.
CN202111094684.2A 2021-09-17 2021-09-17 Communication method and device, readable storage medium, application processor and terminal Active CN113765935B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111094684.2A CN113765935B (en) 2021-09-17 2021-09-17 Communication method and device, readable storage medium, application processor and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111094684.2A CN113765935B (en) 2021-09-17 2021-09-17 Communication method and device, readable storage medium, application processor and terminal

Publications (2)

Publication Number Publication Date
CN113765935A true CN113765935A (en) 2021-12-07
CN113765935B CN113765935B (en) 2023-09-12

Family

ID=78796364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111094684.2A Active CN113765935B (en) 2021-09-17 2021-09-17 Communication method and device, readable storage medium, application processor and terminal

Country Status (1)

Country Link
CN (1) CN113765935B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050020295A1 (en) * 2003-07-25 2005-01-27 Attar Rashid Ahmed Method and apparatus for a control channel power allocation in a communication system
CN101980149A (en) * 2010-10-15 2011-02-23 无锡中星微电子有限公司 Main processor and coprocessor communication system and communication method
CN102045771A (en) * 2010-10-26 2011-05-04 华为终端有限公司 Method for realizing data service dialing and related equipment
CN102185860A (en) * 2011-05-10 2011-09-14 清华大学 Standardized bottom layer control driving system for integrated circuit manufacturing equipment
WO2018000765A1 (en) * 2016-06-27 2018-01-04 深圳市中兴微电子技术有限公司 Co-processor, data reading method, processor system and storage medium
CN108965312A (en) * 2018-07-30 2018-12-07 深圳高新兴物联科技有限公司 Remote invocation method, device, system and storage medium
CN111382107A (en) * 2018-12-29 2020-07-07 阿里巴巴集团控股有限公司 Application processor, coprocessor and data processing equipment
WO2021115257A1 (en) * 2019-12-12 2021-06-17 Oppo广东移动通信有限公司 Application switching method and apparatus, storage medium and electronic device
CN113253978A (en) * 2020-12-31 2021-08-13 深圳怡化电脑股份有限公司 Embedded software development method, model, electronic device, and medium
CN113282341A (en) * 2020-02-20 2021-08-20 浙江宇视科技有限公司 Service control method, device, equipment and medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050020295A1 (en) * 2003-07-25 2005-01-27 Attar Rashid Ahmed Method and apparatus for a control channel power allocation in a communication system
CN101980149A (en) * 2010-10-15 2011-02-23 无锡中星微电子有限公司 Main processor and coprocessor communication system and communication method
CN102045771A (en) * 2010-10-26 2011-05-04 华为终端有限公司 Method for realizing data service dialing and related equipment
CN102185860A (en) * 2011-05-10 2011-09-14 清华大学 Standardized bottom layer control driving system for integrated circuit manufacturing equipment
WO2018000765A1 (en) * 2016-06-27 2018-01-04 深圳市中兴微电子技术有限公司 Co-processor, data reading method, processor system and storage medium
CN108965312A (en) * 2018-07-30 2018-12-07 深圳高新兴物联科技有限公司 Remote invocation method, device, system and storage medium
CN111382107A (en) * 2018-12-29 2020-07-07 阿里巴巴集团控股有限公司 Application processor, coprocessor and data processing equipment
WO2021115257A1 (en) * 2019-12-12 2021-06-17 Oppo广东移动通信有限公司 Application switching method and apparatus, storage medium and electronic device
CN112988338A (en) * 2019-12-12 2021-06-18 Oppo广东移动通信有限公司 Application switching method and device, storage medium and electronic equipment
CN113282341A (en) * 2020-02-20 2021-08-20 浙江宇视科技有限公司 Service control method, device, equipment and medium
CN113253978A (en) * 2020-12-31 2021-08-13 深圳怡化电脑股份有限公司 Embedded software development method, model, electronic device, and medium

Also Published As

Publication number Publication date
CN113765935B (en) 2023-09-12

Similar Documents

Publication Publication Date Title
US8579202B2 (en) Smart card-based browsing system and smart card-based browsing method and smart card for the same
US20120158839A1 (en) Wireless network interface with infrastructure and direct modes
US20220214932A1 (en) Methods, devices and computer storage media for inter-mini program platform communication
CN103597805A (en) Techniques for facilitating interoperation between an accessory and multiple devices
WO2018157732A1 (en) Data transmission method and apparatus
US20220245005A1 (en) Methods, devices and computer storage media for inter-mini program platform discovery
EP3772211A1 (en) Access method, internet of things platform, application device, and service device
CN112689012A (en) Cross-network proxy communication method and device
WO2020258782A1 (en) Data transmission method applicable to bluetooth card reader, and electronic apparatus
CN116243853A (en) Data transmission method and device, electronic equipment and nonvolatile storage medium
CN112422485B (en) Communication method and device of transmission control protocol
US10009425B1 (en) Synchronization of transactions utilizing multiple distributed cloud-based services
KR20220150346A (en) Methods and related devices for logging into in-vehicle systems
TWI418178B (en) Technique for controlling external communication of embedded device using proxy server
CN108847959B (en) Server monitoring method and server
CN112818336A (en) Data access method, data access device and computer readable storage medium
CN113765935B (en) Communication method and device, readable storage medium, application processor and terminal
US20160110235A1 (en) Electronic device for Internet Protocol Communications
CN102185881A (en) Household digital equipment wireless multi-protocol space sharing storage manager and method
EP3694151A1 (en) Terminal network sharing method, apparatus, air conditioning adjustment device, and storage medium
CN109189705A (en) A kind of usb expansion method, apparatus, equipment, storage medium and system
JP2019536173A (en) Reduce application resource usage
CN108848182B (en) Updating method of BMC firmware, related equipment and system
CN113259404A (en) Industrial communication middleware based on TCP/IP protocol and use method thereof
WO2022116015A1 (en) Data processing method and apparatus, electronic device, and storage medium

Legal Events

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