Channel establishment method and device and first terminal
By introducing the interaction between plug-in SDK and backend services in the first terminal, the data channel is built, and the complexity and difficulty of data channel solutions in the existing technology are solved, and efficient data channel construction and compatibility are achieved.
Patent Information
- Application Number
- CN202411928926.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-02-11
AI Technical Summary
The existing terminal-centered data channel solution increases the complexity and difficulty of the data channel solution when real-time audio and video media content interaction between end-to-end terminals, and requires updating the browser kernel code and coupled communication capabilities.
Provide a channel establishment method, by introducing an external SDK into the first terminal, using the interaction between the channel construction method and the background service in the SDK, to build a data channel without updating the communication logic of the first application, and adapting differently through DCService Differences in chips.
It realizes efficient construction of data channels, reduces complexity and difficulty, avoids the need for updates to browser kernel code, and improves the compatibility and stability of data channels on different terminals.
Smart Images

Figure CN119421267A_ABST
Abstract
Description
Technical Field
[0001] The present embodiment relates to the field of communication technology, and in particular, to a channel establishment method, device, and first terminal. Background Art
[0002] In the new call interface of the fifth generation mobile communication technology (5G), real-time audio and video media content interaction between end-to-end terminals is achieved through data channels.
[0003] For example, GSMA PRD TS.66 is an important technical standard that provides a standard basis for building a global unified new call application ecosystem. Based on WebRTC technology, this standard proposes a browser-central data channel solution to achieve real-time audio and video media content interaction between end-to-end terminals.
[0004] However, the above-mentioned browser-central data channel solution involves modification of the communication logic applied in the terminal and modification of the terminal infrastructure, which increases the complexity and difficulty of implementing the data channel solution. Therefore, it is urgently needed to be improved. Summary of the invention
[0005] Based on this, it is necessary to provide a channel establishment method, device and first terminal that can improve the efficiency of channel construction in response to the above technical problems.
[0006] In a first aspect, a channel establishment method is applied to a software development tool SDK in a first terminal, wherein the first terminal is configured with a first application and a background service, and the method comprises:
[0007] When a channel establishment request initiated by the first application is obtained, a channel establishment method in the SDK is executed to obtain creation parameter information required for establishing a data channel;
[0008] The creation parameter information is sent to the background service to instruct the background service to interact with the IMS protocol stack in the first terminal according to the creation parameter information to build a data channel between the first terminal and the second application of the second terminal; the first application and the second application are the same application.
[0009] In one embodiment, obtaining a channel establishment request initiated by a first application includes:
[0010] A channel establishment request initiated by the first application is obtained through a bridge library between the first application and the SDK.
[0011] In one embodiment, sending creation parameter information to a background service includes:
[0012] The creation parameter information is sent to the background service through the cross-process communication interface between the background service and the SDK.
[0013] In one embodiment, the method further comprises:
[0014] Call the service binding method to bind to the background service;
[0015] When the binding is completed, obtain the cross-process communication object returned by the background service;
[0016] Based on the cross-process communication object, build a cross-process communication interface between the background service and the SDK.
[0017] In one embodiment, after sending the creation parameter information to the background service, the method further includes:
[0018] Through the first callback interface between the SDK and the background service, obtain the channel construction success event returned by the background service.
[0019] In one embodiment, after obtaining the channel construction success event returned by the background service, the method further includes:
[0020] According to the data channel object returned by the background service through the first callback interface between the SDK and the background service, registering the observer interface in the first callback interface; the data channel object is an instance of the data channel;
[0021] The object events corresponding to the data channel object are obtained through the observer interface; the object events include the events of successful construction of the data channel object and / or the events of data transmission of the data channel object.
[0022] In one embodiment, the method further comprises:
[0023] Sending the object event to the first application through the event callback interface between the first application and the SDK;
[0024] The event callback interface is constructed according to the registration information of the first application.
[0025] In one embodiment, after obtaining the channel construction success event returned by the background service, the method further includes:
[0026] When a data transmission request initiated by the first application is obtained, a data transmission method in the SDK is executed to obtain transmission parameter information required for transmitting data through the data channel;
[0027] The transmission parameter information is sent to the background service to instruct the background service to transmit the first terminal data in the data transmission request to the IMS protocol stack in the first terminal through the data channel according to the transmission parameter information, so as to instruct the IMS protocol stack to transmit the first terminal data to the second application.
[0028] In a second aspect, the present application further provides a data channel device, a software development tool SDK configured in a first terminal, the first terminal is configured with a first application and a background service, and the device includes:
[0029] A request processing module is established, which is used to execute the channel establishment method in the SDK to obtain the creation parameter information required to build the data channel when the channel establishment request initiated by the first application is obtained;
[0030] The channel construction module is used to send the creation parameter information to the background service to instruct the background service to interact with the IMS protocol stack in the first terminal according to the creation parameter information to build a data channel between the first terminal and the second application of the second terminal; the first application and the second application are the same application.
[0031] In a third aspect, the present application further provides a first terminal, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0032] When a channel establishment request initiated by the first application is obtained, a channel establishment method in the SDK is executed to obtain creation parameter information required for establishing a data channel;
[0033] The creation parameter information is sent to the background service to instruct the background service to interact with the IMS protocol stack in the first terminal according to the creation parameter information to build a data channel between the first terminal and the second application of the second terminal; the first application and the second application are the same application.
[0034] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0035] When a channel establishment request initiated by the first application is obtained, a channel establishment method in the SDK is executed to obtain creation parameter information required for establishing a data channel;
[0036] The creation parameter information is sent to the background service to instruct the background service to interact with the IMS protocol stack in the first terminal according to the creation parameter information to build a data channel between the first terminal and the second application of the second terminal; the first application and the second application are the same application.
[0037] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0038] When a channel establishment request initiated by the first application is obtained, a channel establishment method in the SDK is executed to obtain creation parameter information required for establishing a data channel;
[0039] The creation parameter information is sent to the background service to instruct the background service to interact with the IMS protocol stack in the first terminal according to the creation parameter information to build a data channel between the first terminal and the second application of the second terminal; the first application and the second application are the same application.
[0040] The above-mentioned channel establishment method, device and first terminal, the present application adopts a plug-in SDK approach, which does not require updating the communication logic code of the first application. The negotiation and data processing logic of the communication capability required by the first application are encapsulated in the SDK, and the first application only needs to use a simple interface call to achieve data channel establishment and data transmission, thereby achieving decoupling of communication capabilities; further, the background service in this embodiment can adapt to the chip models of various manufacturers, shield the differences between various chips, reduce the complexity of data channel construction, and improve the efficiency of data channel construction. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in this embodiment or related technologies, the drawings required for use in the description of this embodiment or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this embodiment. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 is a schematic diagram of a DCMTSI client in one embodiment;
[0043] Figure 2 is a schematic diagram of components in a "Browser-central" solution in one embodiment;
[0044] Figure 3 A schematic diagram of JavaScriptCore in one embodiment;
[0045] Figure 4 A diagram of an application environment of a channel establishment method in an embodiment;
[0046] Figure 5 A schematic diagram of a flow chart of a channel establishment method in an embodiment;
[0047] Figure 6is a schematic diagram of a bridge library between a first application and an SDK in one embodiment;
[0048] Figure 7 A schematic diagram of a process of calling a service binding method to bind with a background service in one embodiment;
[0049] Figure 8 A schematic diagram of a flow chart of the steps of registering an observer interface in a first callback interface in one embodiment;
[0050] Fig. 9 It is a schematic flow chart of a step of transmitting first terminal data in one embodiment;
[0051] Fig.10 is a schematic diagram of a signaling flow and a media flow in another embodiment;
[0052] Fig.11 This is a schematic diagram of interaction in which a first application calls a second terminal in another embodiment;
[0053] Fig.12 This is a schematic diagram of interaction in which a second application calls a first terminal in another embodiment;
[0054] Fig.13 It is a structural block diagram of a channel establishment device in one embodiment;
[0055] Fig.14 FIG. 4 is a diagram showing the internal structure of a first terminal in an embodiment. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of this embodiment more clear, the following is a further detailed description of this embodiment in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain this embodiment and are not used to limit this embodiment.
[0057] First, some nouns or terms that appear in the description of this embodiment are subject to the following explanations:
[0058] AIDL (Android Interface Definition Language): AIDL is an Android-specific language used to define the interface used for inter-process communication (IPC) between clients and services. It allows developers to declare an object interface that can be passed across application boundaries, allowing application components to communicate with each other even if they run in different processes.
[0059] dsBridge: dsBridge is a bridge library for communication between web pages and native applications. It allows JavaScript code to call native application functions, and also allows native applications to call JavaScript functions in web pages. This two-way communication capability allows web pages to interact with the underlying functions of the device (such as cameras, sensors, etc.).
[0060] DCMTSI (DC Multimedia Telephony Service for IMS): DCMTSI is a multimedia telephony service in the IMS data channel. It is a multimedia telephony service based on the IP Multimedia Subsystem (IMS) and supports the transmission of multimedia data such as audio and video in the IMS network.
[0061] IMS (IP Multimedia Subsystem): IMS is the abbreviation of IP Multimedia Subsystem, which is a standardized network architecture used to provide IP-based multimedia services. IMS supports multiple communication methods such as voice, video, text, and messaging, and allows users to access the network at any time and any place through any device.
[0062] JavaScriptCore: JavaScriptCore is a component in the WebKit framework, which is mainly used to provide a JavaScript execution environment. It is one of the core parts of the WebKit rendering engine, responsible for parsing and executing JavaScript code, so that web pages can have dynamic effects and interactive functions.
[0063] JavaScript: JavaScript is a high-level, interpreted programming language that is widely used in web page development. It allows developers to add dynamic content and interactive features to web pages, such as animation, form validation, user interaction, etc.
[0064] Runtime execution environment: The Runtime execution environment refers to the environment required when the program runs on the target machine. It includes software libraries, environment variables, etc., and provides services for processes running in the system. For Web applications, the Runtime environment usually includes the browser and the related JavaScript engine.
[0065] SDK (Software Development Kit): SDK is the abbreviation of software development kit. It is a collection of development tools used by software engineers to build application software for specific software packages, software frameworks, hardware platforms, operating systems, etc. SDK usually includes library files, header files, sample codes, documents, etc., to help developers quickly develop application software that meets the requirements.
[0066] SS (SDK+Service): SS is the abbreviation of SDK+Service. In this embodiment, SDK (Software Development Kit) realizes the function of cross-process communication through the combination of AIDL and Service (service component in Android system). This combination allows application components to interact in different processes, improving the flexibility and scalability of the application.
[0067] Service (Android system component): Service is one of the four major components in the Android system. It is a service program with a long life cycle, no visual interface, and runs in the background. It is used to perform long-running operations that do not require user interaction, such as playing music, uploading / downloading files, etc. Service can interact with other application components (such as Activity), but it does not provide a user interface itself.
[0068] WebKit: WebKit is an open source browser engine that is mainly used to render web content. It contains two core components: WebCore and JavaScriptCore. WebCore is responsible for HTML parsing, layout, and rendering, while JavaScriptCore is responsible for parsing and executing JavaScript code. WebKit is widely used in various browsers and web view components.
[0069] WebCore: WebCore is the core component of the WebKit framework, responsible for the rendering and layout of web page content. It parses HTML and CSS, converts them into visual page content, and handles user interactions. WebCore is one of the important components of the WebKit rendering engine.
[0070] WebRTC (Web Real-Time Communication): WebRTC is a real-time communication technology that allows web applications or sites to establish peer-to-peer connections between browsers without the help of an intermediary to transmit video streams, audio streams, or any other data. WebRTC technology enables web applications to directly conduct audio and video calls and data transmission without relying on third-party plug-ins or servers.
[0071] In the 5G new call interface, end-to-end browser real-time audio and video media content interaction is achieved through data channels. 3GPP TS 26.114 defines the concept of data channels. Figure 1 For DCMTSI clients, Figure 1 The Data Channel in it is a data channel, which is connected to the DCMTSI client through 3GPP.
[0072] Specifically, the description of each component in the DCMTSI client is as follows: Speaker: a device responsible for playing audio. Display: a device used to display video and images. User Interface: a graphical interface for users to interact with the system. Microphone: a device used to capture and input audio. Camera: a device used to capture and input video. Keyboard: a device used to input text and commands. AudioDecoder: converts encoded audio data into playable audio signals. Video Decoder: converts encoded video data into viewable video images. Text: refers to text information transmitted through the system. Data Channel: responsible for transmitting media data such as audio, video and text, and is a key component defined in the 3GPP TS 26.114 standard. Web Page: web page content displayed on the client, used for information display and user interaction. Script: program code that controls web page behavior or implements specific functions. Session Setup and Control: a module responsible for establishing and controlling system sessions. Audio Encoder: converts audio signals into digital encoded data. Video Encoder: Converts video signals into digital coded data. Packet-based network interface is a key component in network communications, which allows devices to communicate with other network devices by exchanging data packets. 3GPP L2: In 3GPP's communication standards, L2 (Layer 2, data link layer) synchronization technology is essential to ensure that devices in the network can exchange data accurately and efficiently.
[0073] Currently, GSMA PRD TS.66 proposes a "Browser-central" data channel solution based on WebRTC. This solution adopts the data channel function in 3GPP TS 26.114 and uses WebRTC technology to build data channels between browsers to achieve end-to-end real-time audio and video media content interaction. The "Browser-central" solution defines the components that make up the data channel. These components communicate through specific interfaces, such as Figure 2 As shown, the components in the "Browser-central" solution include:
[0074] JavaScript Application Interactive Logic: JavaScript application interactive logic refers to a series of rules and processes that define and implement the interactive behaviors between users and applications in JavaScript applications. These logics usually include processing user input, responding to events, validating data, updating the interface, and interacting with other systems or services.
[0075] WebRTC1.0 API: WebRTC is an open source technology jointly promoted and maintained by organizations such as W3C and IETF, which aims to achieve real-time communication and media streaming through Web browsers. WebRTC 1.0 API is a set of APIs defined based on WebRTC technology, allowing developers to build real-time audio and video communication, data transmission and collaboration applications in browsers.
[0076] JavaScriptCore: An important part of the browser kernel, responsible for parsing and executing JavaScript code. In the "Browser-central" solution, it is located in BrowserCore under the Browser-like Container of the Data Channel Run Time. For example, Figure 3As shown in the figure, taking the browser kernel WebKit as an example, JavaScriptCore is the physical location of the three interface components. WebKit Embedded Interface and WebKit2 Embedded Interface: These interfaces are used to embed WebKit into various applications. WebKit Binding and WebKit2 Binding: These binding layers simplify the use of WebKit by developers. WebCore: As the core of WebKit, it integrates key modules for web page rendering such as CSS, SVG, HTML, DOM, layout, rendering tree and Inspector. JavaScriptCore: This is the JavaScript engine in WebKit, which is responsible for parsing and executing JavaScript code. WebKit Ports: This part covers functional modules such as network stack, video processing, text rendering, hardware acceleration and image decoding. Operating system layer: Including 2D / 3D graphics library, network library and other infrastructure, providing underlying support for WebKit.
[0077] RTCPeerConnection / RTCPeerSignallingService: These two interfaces are used to send and receive signaling streams. Signaling streams are the key to establishing peer-to-peer connections between browsers.
[0078] RTCDataChannel: This interface is used to send and receive media streams, such as video streams, audio streams, or other arbitrary data.
[0079] DCMTSI-M / DCMTSI-S: These two interfaces are used by the data channel to communicate with the components in the chip. DCMTSI-M is used for the transmission of media streams, while DCMTSI-S is used for the transmission of signaling streams.
[0080] UNI interface: The chip receives media streams and signaling streams from the peer browser through the network through the UNI interface, and uploads these streams to the RTCDataChannel component and RTCPeerSignallingService component through the DCMTSI-M and DCMTSI-S interfaces respectively. At the same time, the chip also receives streams from these two components through these two interfaces, and sends the media streams and signaling streams of the local browser to the peer browser through the UNI interface.
[0081] Signaling stream: The first application uses the methods and events of the RTCPeerConnection / RTCPeerSignallingService interface to send and receive signaling streams. The signaling streams enter and exit the IMS network along a specific channel, and exchange signaling streams between the IMS network and the peer browser, thereby establishing a point-to-point connection between the browsers.
[0082] Media stream: The first application calls the methods and events of the RTCDataChannel interface to send and receive media streams. The media stream enters and exits the IMS network along another channel, exchanges media streams with the peer browser, and realizes the transmission of video streams, audio streams or other arbitrary data between browsers.
[0083] However, the above-mentioned "Browser-central" solution has the following disadvantages: (1) The need to couple communication capabilities: Each application needs to couple the Offer / Answer model and the peer browser to negotiate media parameters. (2) The need to update the browser kernel code: In order to implement the "Browser-central" solution to access IMS, the JavaScriptCore of each browser kernel needs to be updated. (3) Rough DCMTSI-M and DCMTSI-S interfaces: These two interfaces only list the international standard items that need to be implemented, and do not refine the methods and events of the interface. (4) Chip differences: The solution does not take into account the differences in the implementation of IMS protocol stacks and data channel services between different chips.
[0084] In order to solve the above problem, a channel establishment method is provided in this embodiment. Figure 4 Schematic diagram of the application environment of the channel establishment method, the first terminal UE is installed with a first application, a software development tool SDK and a DCService; specifically, the first application communicates with the software development tool SDK, the software development tool SDK communicates with the DCService, and the first application is Figure 4 JavaScript Application Interactive Logic.
[0085] It is understandable that SDK is a software package that integrates multiple functions to simplify the application development process. In this scenario, SDK includes methods and interfaces for building and managing data channels.
[0086] It is understandable that DCService (DCService) is one of the four major components in the Android system. Among them, Service has a long life cycle and no visual interface. It can run continuously in the background to process requests and instructions from the SDK. According to the adaptation logic of different chips, Service can identify and handle the differences between different chips, ensuring that the data channel can be successfully established and run normally on different terminals, improving the compatibility and stability of the system.
[0087] The channel establishment method in this embodiment is applied to the SDK in the first terminal, such as Figure 5 As shown, the channel establishment method in this embodiment includes:
[0088] S501, when a channel establishment request initiated by a first application is obtained, a channel establishment method in the SDK is executed to obtain establishment parameter information required for establishing a data channel.
[0089] Optionally, when a user initiates a communication request with another user (i.e., a second application of a second terminal, where the first application and the second application are the same application) through a first application (e.g., an audio and video call application based on WebRTC), the application triggers a channel establishment request. The purpose of this request is to establish a data channel to transmit audio and video streams or other arbitrary data between the two terminals.
[0090] After receiving the channel establishment request, the predefined channel construction method in the SDK (such as the createDataChannel method) will be called. The channel construction method will perform a series of operations, including but not limited to negotiating session parameters, determining network addresses and ports, etc., to obtain the creation parameter information required to build the data channel. These creation parameter information is used to guide the subsequent data channel construction process.
[0091] Exemplarily, the creation parameter information may include: channelType: specifies the type of data channel, such as video call (videoCall), audio call or data transmission. callerId and calleeId: are used to uniquely identify the terminal or user initiating the call and the terminal or user being called, respectively. mediaParameters: contains parameter information of the media stream, such as video coding format (videoCodec), audio coding format (audioCodec), video resolution (videoResolution) and bitrate (bitrate). signalingParameters: describes the transmission mode and protocol of the signaling stream. The signaling stream is used to transmit control information between the communicating parties, such as call establishment, hang up and other instructions. In this example, the signaling protocol is specified as WebSocket, and the IMS network URL is specified as wss: / / signaling.server.com. channelOptions: contains other channel options, such as whether to enable encryption (enableEncryption) and whether to enable echo cancellation (enableEchoCancellation).
[0092] S502: Send creation parameter information to the background service to instruct the background service to interact with the IMS protocol stack in the first terminal according to the creation parameter information to build a data channel between the first terminal and the second application of the second terminal.
[0093] The first application and the second application are the same application.
[0094] Optionally, DCService first receives creation parameter information from SDK through a cross-process communication interface (such as AIDL interface). This information contains all key parameters required to establish a data channel, such as channel type, media parameters, signaling parameters, etc. The received creation parameter information is parsed by DCService to extract the specific parameters and configuration required to establish the data channel.
[0095] The parsed parameters are then passed to the relevant components in the DCService, which interact with the IMS protocol stack in the first terminal. During the interaction, the DCService uses these parameters to configure the IMS protocol stack in the first terminal to initiate or respond to the request to establish a data channel. During the interaction with the IMS protocol stack, the DCService is responsible for negotiating and establishing the media stream and signaling stream channels of the data channel.
[0096] The media stream channel is used to transmit audio and video media content, while the signaling stream channel is used to transmit control information, such as call establishment, hang-up and other instructions.
[0097] Optionally, DCService is responsible for adapting to the differences between different chips to ensure that data channels can be successfully established and run normally on different terminals, which specifically involves adapting and adjusting the specific implementation of the IMS protocol stack in the chip of the first terminal to ensure compatibility with DCService.
[0098] Optionally, once the data channel is successfully established, DCService will return a data channel object to the SDK. The SDK can use this data channel object to manage the transmission status of the data channel, send and receive data, etc. Finally, the application layer interacts with the data channel through the SDK to achieve the transmission of real-time audio and video media content and the exchange of any other data.
[0099] Exemplarily, the transmission process of the signaling stream is as follows: when the first application needs to establish communication with the second terminal, it first initiates a request by calling the relevant interface in the SDK (such as the channel creation method, createDataChannel method). After receiving the request from the application layer, the SDK interacts with the DCService through a cross-process communication interface (such as an AIDL interface). The SDK passes the parameters in the request (such as the address and port of the IMS network, etc.) to the DCService. The DCService configures the IMS protocol stack in the first terminal according to the received parameters to prepare to initiate or respond to the transmission of the signaling stream. The IMS protocol stack in the first terminal is responsible for processing the underlying communication protocols, such as the Session Initiation Protocol (SIP), the Real-time Transport Protocol (RTP), etc., to ensure the correct transmission of the signaling stream. After the configuration is completed, the DCService transmits the signaling stream to the IMS network through a wireless bearer (such as a cellular network, Wi-Fi, etc.). As an intermediate medium, the IMS network (IMSNetwork) is responsible for forwarding the signaling stream to the DCService of the second terminal.
[0100] Optionally, the IMS Network includes IMS-AGM and MMTEL-AS; IMS-AGM: IP multimedia application server group manager, which is responsible for managing a group of application servers to ensure that these servers can work together to provide unified multimedia services. MMTEL-AS: Multimedia phone application server, which is responsible for processing application logic related to multimedia phone calls, supporting the establishment, management and termination of multimedia sessions, and providing users with high-quality multimedia communication services.
[0101] Furthermore, after receiving the signaling stream, the DCService of the second terminal parses and processes it. According to the information in the signaling stream, the DCService of the second terminal configures the IMS protocol stack in the second terminal to prepare to receive or initiate the transmission of the media stream. Once the signaling stream transmission is completed, a point-to-point connection is established between the first terminal and the second terminal, preparing for the subsequent transmission of the media stream.
[0102] Exemplarily, the transmission process of the media stream is as follows: after the signaling stream transmission is completed, the first application initiates the transmission of the media stream by calling the data transmission method in the SDK (such as the sendData method). After receiving the request from the application layer, the SDK also interacts with the DCService through the cross-process communication interface. The SDK passes the media stream data and related parameters (such as encoding format, bit rate, etc.) to the DCService. The DCService configures the IMS protocol stack in the first terminal according to the received media stream data and parameters to prepare for the transmission of the media stream. The IMS protocol stack in the first terminal encapsulates and encodes the media stream data to ensure that it can be correctly transmitted on the network. After the configuration is completed, the DCService transmits the media stream data to the second terminal via a wireless bearer. After receiving the media stream data, the DCService of the second terminal decodes and parses it, and then passes it to the application layer for playback or processing. The transmission of media stream data is continuous until the first application stops sending or the two parties are disconnected.
[0103] The above-mentioned channel establishment method, this application adopts the plug-in SDK method. This method does not need to update the communication logic code of the first application. The negotiation and data processing logic of the communication capability required by the first application are encapsulated in the SDK. The first application only needs to use simple interface calls to achieve data channel establishment and data transmission, thereby realizing the decoupling of communication capabilities; further, the DCService in this embodiment can adapt to the chip models of various manufacturers, shield the differences between each chip, reduce the complexity of data channel construction, and improve the efficiency of data channel construction.
[0104] In an exemplary embodiment, obtaining the channel establishment request initiated by the first application includes: obtaining the channel establishment request initiated by the first application through a bridge library between the first application and the SDK.
[0105] Among them, Figure 6 As shown in Figure 1, the bridging library dsBridge allows JavaScript code to call native application functions, and also allows native applications to call JavaScript functions in web pages. This mechanism enables two-way communication between web pages and native applications, allowing the two to seamlessly exchange data and functions.
[0106] In the web page, the JavaScript code initiates a call request to the native application through the API provided by dsBridge (such as dsBridge.call). After receiving this request, dsBridge forwards it to the corresponding processing logic in the native application. After the native application processes the request, it can pass the result back to the JavaScript code in the web page through dsBridge.
[0107] In this embodiment, the first application (i.e., the application in the web page) calls the sendData or createDataChannel method in the SDK through the dsBridge.call method of dsBridge. When calling, the dsBridge.call method needs to pass in a series of parameters, including the event name, the name of the function to be called (sendData or createDataChannel), and the parameters of the function. After receiving these call requests, the SDK will execute the corresponding logic according to the content of the request, such as creating a data channel, sending a media stream, etc. The execution result can be returned to the first application through the callback mechanism of dsBridge for further processing or display.
[0108] The dsBridge.call method of dsBridge is asynchronous, which means that the call request will return immediately, and the actual execution result will be passed to the web page later through the callback function. In the communication process between SDK and DCServiceDCservice, the inter-process communication (IPC) mechanism is also involved, such as communication implemented through the AIDL interface. However, this process is completed within the SDK and is transparent to the first application.
[0109] Exemplarily, the first application uses dsBridge.call to call the sendData method and createDataChannel method interfaces in the SDK:
[0110] dsBridge.call(
[0111] 'async',
[0112] {
[0113] event: 'Channel established',
[0114] function: 'createDataChannel / sendData',
[0115] params: {channel establishment}
[0116] },
[0117] function (v) {}
[0118] Channel establishment )
[0120] In this embodiment, through the dsBridge bridge library, the first application can easily call the methods in the SDK to achieve communication and data exchange with the native application. This mechanism makes it possible to seamlessly integrate the Web page with the native application, and provides technical support for developing a richer application experience.
[0121] In an exemplary embodiment, Figure 7 As shown, before creating the data channel, the method further includes:
[0122] S701, calling a service binding method to bind to a background service.
[0123] Optionally, the SDK calls the bindService() method and passes in a ServiceConnection instance and an Intent representing the service to be bound to request binding with the DCservice. If the binding is successful, the system will call back the onServiceConnected() method in the ServiceConnection, and the connection between the SDK and the DCservice is established.
[0124] S702: When the binding is completed, obtain the cross-process communication object returned by the background service.
[0125] Optionally, when the SDK successfully binds to DCservice, the onServiceConnected() method will be called, and this method will receive an IBinder object (IBinder object is a cross-process communication object) as a parameter. This IBinder object is returned by DCservice and represents an inter-process communication (IPC) interface of DCservice.
[0126] IBinder is a core interface for cross-process communication in Android, which allows objects in different processes to communicate. In this scenario, the IBinder object acts as a communication bridge between the SDK and DCservice, allowing the SDK to call methods defined in DCservice.
[0127] S703: Construct a cross-process communication interface between the background service and the SDK according to the cross-process communication object.
[0128] Optionally, after obtaining the IBinder object, the SDK can build a cross-process communication interface with the DCservice based on this object. This usually involves using AIDL (Android Interface Definition Language) to define the interface and generate the corresponding proxy class and stub class.
[0129] The components in the SDK use the AIDL interfaces defined in detail to implement the international standard items listed by the DCMTSI-M and DCMTSI-S interfaces, including the AIDL-M interface and the AIDL-S interface. The AIDL-M interface and the AIDL-S interface are pre-defined, and the components in the SDK already know how to use these interfaces to communicate with DCservice.
[0130] In this process, SDK may use IBinder object to call methods defined in DCservice, which may involve the creation of data channels, transmission of media streams and signaling streams, etc. At the same time, DCservice may also call back methods in SDK through IBinder object to notify SDK of certain events or data reception.
[0131] Accordingly, parameter information is created and sent to the background service, including: creating parameter information and sending it to the background service through a cross-process communication interface between the background service and the SDK.
[0132] It can be listed that, since SDK and DCService may run in different processes, they need to communicate through some mechanism. This mechanism is the cross-process communication interface. The cross-process communication interface allows data exchange and instruction transmission between different processes, thereby achieving collaborative work.
[0133] In the SDK, when a channel establishment request is received from the first application, corresponding creation parameter information is generated. This information includes various parameters and instructions required to establish a data channel, such as the target terminal's identifier, the type and format of data transmission, etc. This creation parameter information is encapsulated into a specific data structure or message format for transmission through the cross-process communication interface.
[0134] SDK sends the encapsulated creation parameter information to DCService by calling the predefined cross-process communication interface. The cross-process communication interface may be implemented in a variety of ways, such as AIDL (Android Interface Definition Language) in Android. These implementations ensure the integrity and security of data during transmission.
[0135] In this embodiment, by calling the bindService() method to bind the service DCservice, obtaining the IBinder object returned by DCservice, and building a cross-process communication interface based on this object, the SDK can communicate with DCServiceDCservice, thereby realizing functions such as creation of data channels and transmission of media streams and signaling streams.
[0136] In an exemplary embodiment, after sending the creation parameter information to the background service, the method further includes: obtaining a channel construction success message returned by the background service through a first callback interface between the SDK and the background service.
[0137] It is understandable that in the SDK code, a first callback interface needs to be defined first, which will contain the methods that DCservice needs to call when a specific event occurs. These methods usually have clear parameters and return types so that DCservice can correctly pass data and receive responses.
[0138] After defining the first callback interface, the SDK needs to provide a specific implementation of this interface. This implementation will contain the logic that the SDK needs to execute when receiving a callback from DCservice. For example, when DCservice notifies the SDK that the data channel has been successfully created, the SDK implementation may update the internal status, notify the application, etc.
[0139] When SDK establishes a connection with DCservice, SDK needs to register the first callback interface with DCservice. In this way, when DCservice needs to notify SDK of an event, it can do so by calling the first callback interface.
[0140] Specifically, SDK passes the instance or reference of the first callback interface to DCservice by calling the registration method provided by DCservice. This process is similar to "registering" or "recording" the first callback interface information of SDK in DCservice. Once the first callback interface is registered with DCservice, DCservice has the authority to call the method in the interface under specific events or conditions. This means that DCservice can communicate or exchange data with SDK through the first callback interface when necessary.
[0141] It is understandable that the registration and use of the first callback interface are usually associated with an asynchronous communication mechanism. When DCservice completes a task or detects an event, it does not return the result directly to the SDK, but notifies the SDK by calling the method in the first callback interface. This method allows DCservice and SDK to communicate without affecting the execution of each other's main threads. The methods defined in the first callback interface usually contain specific event processing logic. When DCservice calls these methods, the SDK responds to the events or requests of DCservice according to these logics. For example, if a method for processing the successful creation of a data channel is defined in the first callback interface, then when DCservice successfully creates the data channel, it will call this method and allow the SDK to execute the corresponding processing logic.
[0142] It is understandable that the callback of DCservice refers to the process in which when DCservice completes a task or detects a specific event, it actively calls the method in the first callback interface (such as the first callback interface) previously registered by the SDK to notify the SDK or pass data to the SDK. This mechanism allows asynchronous communication between DCservice and SDK, that is, DCservice can pass the task completion status or event information to the SDK through the first callback interface without blocking the execution of the SDK.
[0143] Specifically, during the operation of DCservice, when a specific event occurs (for example, the data channel is successfully created), DCservice will check whether there is a corresponding first callback interface that needs to be called. If DCservice finds that there is a first callback interface that needs to be called, it will call the corresponding method according to the interface definition and pass the necessary parameters. These parameters may include event type, related data, etc. When the SDK's first callback interface is called by DCservice, the SDK will process the callback according to the logic defined in the interface implementation. This may include updating internal status, notifying the application, etc. Ultimately, the SDK may pass the result of processing the callback to the application. The application can perform corresponding operations based on this result, such as starting to use the newly created data channel for data transmission.
[0144] In an exemplary embodiment, Figure 8 As shown, after obtaining the channel construction success message returned by the background service, the method further includes:
[0145] S801, registering an observer interface in the first callback interface according to the data channel object returned by the background service through the first callback interface between the SDK and the background service.
[0146] The data channel object is an instance of the data channel.
[0147] Optionally, in the first callback interface of the SDK, define an observer interface. This interface will contain a series of methods for notifying observers (which may be other components in the SDK or external applications) about data channel status changes or event occurrences.
[0148] After defining the observer interface, the SDK needs to provide a specific implementation of this interface (i.e., the observer). This implementation will contain the logic that the observer needs to execute when receiving a notification. For example, when the state of a data channel changes, the observer may update the UI, record logs, or execute other related business logic.
[0149] S802, obtaining the object event corresponding to the data channel object through the observer interface.
[0150] The object event includes an event of successful construction of a data channel object and / or an event of data channel object transmitting data.
[0151] Optionally, the use process of the observer interface mainly occurs in the interaction between the SDK and components related to the data channel (such as DCservice). The specific steps are as follows: In the SDK, when it is necessary to monitor the state changes or events of the data channel, the SDK will create an observer instance and register it with the component responsible for managing the data channel (i.e. DCService). This registration process is usually completed by calling the registration method provided by the component and passing the observer instance. When the state of the data channel changes (such as successful creation, disconnection, or data transmission, etc.) or a specific event occurs, the component responsible for managing the data channel will check whether there are registered observers who need to be notified. If there are observers who need to be notified, the component responsible for managing the data channel will call the method defined in the observer interface and pass the necessary event information or state data. In this way, the observer can execute the corresponding logic based on this information.
[0152] It is understandable that the above-mentioned observer interface and the first callback interface are both mechanisms for implementing asynchronous communication between the SDK and external components (such as DCservice). However, their functional focuses are slightly different. The first callback interface focuses more on the external component actively calling the method defined in the SDK when a specific event occurs; while the observer interface focuses more on the SDK actively monitoring the state changes of the data channel and notifying the registered observers when the changes occur. In some cases, the method in the first callback interface may trigger the call of the observer interface. For example, when DCservice notifies the SDK through the first callback interface that the data channel has been successfully created, the SDK may call the method in the observer interface to notify the registered observers about the changes in the data channel status.
[0153] Furthermore, the method includes: sending the object event to the first application through an event callback interface between the first application and the SDK.
[0154] Among them, the event callback interface is constructed according to the registration information of the first application. In the SDK, in addition to defining the observer interface for monitoring the status changes of the data channel, it is also necessary to define an event callback interface to notify the first application of these changes or events. The event callback interface is constructed according to the registration information of the first application. This means that when the first application integrates the SDK, it needs to provide the SDK with a series of callback functions or methods, which will be called by the SDK when a specific event occurs. The SDK constructs an event callback interface based on the registration information provided by the first application (such as callback function list, event type, etc.) to ensure that the methods of the first application can be called accurately.
[0155] Optionally, when the state of the data channel object changes or specific events occur (such as successful construction, data transmission, etc.), the observer interface in the SDK will first capture these events. After the observer interface captures the event, it will determine which event callback interfaces need to be called based on the event type and registration information. The SDK sends the captured object event to the first application through the event callback interface. This usually involves calling the callback function provided by the first application and passing relevant information of the event (such as event type, data content, etc.) to the function as parameters. After the first application receives the object event sent by the SDK through the event callback interface, it will perform corresponding logical processing based on the event type and related information. This may include updating the user interface, recording logs, sending notifications to users, triggering other business logic, etc.
[0156] Exemplarily, the interaction between the first application and the SDK is implemented through dsBridge, including the interface called by dsBridge.call and the event callback interface registered by dsBridge.register; in the first application, dsBridge.register is used to register the event callback interface: dsBridge.register('channel establishment', function (params) {channel establishment}), wherein: channel establishment includes the event name, parameter format and content, and the processing logic of the callback function.
[0157] In this embodiment, the SDK can flexibly notify the first application of the state change or event occurrence of the data channel object, and the first application can also perform corresponding response processing according to these event information. This mechanism ensures effective communication and collaboration between the SDK and the first application, and improves the flexibility and scalability of the application.
[0158] In one example, Fig. 9 As shown, after obtaining the channel construction success message returned by the background service, the method further includes:
[0159] S901, when a data transmission request initiated by a first application is obtained, a data transmission method in the SDK is executed to obtain transmission parameter information required for transmitting data through a data channel.
[0160] It is understandable that when the first application initiates a data transmission request, the data transmission method in the SDK is executed (for example, it may be an instance of the sendData method), and the transmission parameter information required for transmitting data through the data channel is obtained. These parameter information generally include the description, format, transmission priority, etc. of the first terminal data, which is used to guide DCService on how to effectively transmit data.
[0161] S902, sending the transmission parameter information to the background service to instruct the background service to transmit the first data in the data transmission request to the IMS protocol stack in the first terminal through the data channel according to the transmission parameter information, so as to instruct the IMS protocol stack to transmit the first data to the second application.
[0162] Optionally, the transmission parameter information obtained in step S901 is sent to DCService (such as DCservice). DCService is instructed to transmit the first terminal data to the IMS protocol stack in the first terminal through the established data channel according to the parameter information. After receiving the data, the IMS protocol stack will further process the data, including possible encoding, packaging and other operations, and finally transmit the data to the second application (located on the opposite terminal).
[0163] like Fig.10As shown, in the first terminal in this embodiment, the DCService in this embodiment includes an IMSDataChannel component and an IMSDataChannel Controller component. The IMSDataChannel component is responsible for establishing a data channel to ensure smooth data transmission; the IMSDataChannel Controller component is responsible for managing and controlling the channel, monitoring the status of the "IMSDataChannel", and performing necessary control operations to ensure the stability and efficiency of the data channel.
[0164] The first application calls the createDataChannel method and event in the SDK to send and receive signaling flows. The signaling flow follows Fig.10 The solid line path indicated by L3 in FIG. 1 enters and exits the IMS network through the IMSDataChannel Controller component, exchanges signaling flows with the IMS network and the peer component, and establishes a point-to-point connection between browsers.
[0165] The first application calls the sendData method and event to send and receive media streams. The media stream follows Fig.10 The dotted path indicated by L4 in FIG. 1 enters and exits the IMS network through the IMSDataChannel component, and exchanges media streams with the second terminal to realize the transmission of video streams, audio streams or other arbitrary data between browsers.
[0166] In the first terminal of this embodiment, it is no longer required that each first application couples the Offer / Answer model to negotiate media parameters with the second terminal. Instead, by adding an SDK to the Data Channel RunTime, the first application can abandon the WebRTC 1.0 API and instead call the dsBridge 3.1.4 API to interact with the SDK. In this way, the negotiation and data processing logic of communication capabilities are encapsulated in the SDK, and the first application can establish a data channel and transmit data through a simple interface call, thereby achieving the decoupling of communication capabilities.
[0167] In this embodiment, a plug-in SDK is used, and the SDK is integrated into the Data Channel Runtime in the form of a plug-in software package. This method can realize the transmission of two channels of media stream and signaling stream between the local terminal and the second terminal without updating any JavaScript Core code. Therefore, the disadvantage of the original solution that the browser kernel code needs to be updated is avoided.
[0168] Furthermore, the international standard items listed in the DCMTSI-M and DCMTSI-S interfaces are implemented through the detailed AIDL interface definition. These AIDL interfaces are used by the components in the SDK, and the methods and events of the interfaces are refined. In this way, developers can more clearly understand the functions and usage of the interfaces, thereby improving the efficiency and reliability of establishing data channels.
[0169] Furthermore, DCService can adapt to the chip models of various manufacturers and shield the differences between the chips. Through the southbound interface and the IMS protocol stack in the chip, the transmission of media streams and signaling streams is completed, ensuring the compatibility and stability of data channels on different chip platforms.
[0170] In an exemplary embodiment, Fig.11 As shown, this embodiment provides an interactive schematic diagram of a channel establishment method in a first application, specifically a process of the first application calling a second application in a second terminal:
[0171] S1101, the first application notifies the SDK to set an event callback interface.
[0172] S1102: The SDK in the first terminal calls the bindService() method to bind the DCservice in the first terminal.
[0173] S1103: The DCservice in the first terminal returns an IBinder object to the SDK in the first terminal.
[0174] S1104: The SDK in the first terminal uses the IBinder object to notify the DCservice in the first terminal to set a first callback interface.
[0175] During this process, wait for the first application to initiate a call.
[0176] S1105: The first application requests the SDK in the first terminal to create a data channel.
[0177] S1106: The SDK in the first terminal creates a data channel through the IBinder object.
[0178] S1107: The DCservice in the first terminal returns the data channel object to the first callback interface.
[0179] S1108: The SDK in the first terminal registers the observer interface in the first callback interface using the data channel object in the first callback interface.
[0180] S1109, the SDK in the first terminal returns the data channel creation status to the event callback interface.
[0181] It can be understood that this means that the first terminal can transmit the first terminal data to the second terminal.
[0182] S1110: The first application and the second application transmit audio streams, video streams, and any other data through a data channel.
[0183] In an exemplary embodiment, Fig.12 As shown, this embodiment provides an interactive schematic diagram of a channel establishment method in a second application, specifically a process of the second application calling a first application in a first terminal:
[0184] S1201: The second application notifies the SDK in the second terminal to set an event callback interface.
[0185] S1202: The SDK in the second terminal calls the bindService() method to bind the DCservice in the second terminal.
[0186] S1203: The DCservice in the second terminal returns an IBinder object to the SDK in the second terminal.
[0187] S1204: The SDK in the second terminal uses the IBinder object to notify the DCservice in the second terminal to set a second callback interface.
[0188] During this process, wait for the second application to initiate a call.
[0189] S1205: The Dcservice in the second terminal returns the data channel object to the second callback interface of the SDK in the second terminal, which means that the Dcservice has established a data channel with the second terminal.
[0190] S1206: The SDK in the second terminal registers the observer interface in the first callback interface using the data channel object in the second callback interface.
[0191] S1207: Dcservice in the second terminal returns the second terminal data to the observer interface.
[0192] S1208: The SDK in the second terminal returns the second terminal data to the event callback interface.
[0193] It can be understood that this means that the first terminal can transmit data to the second terminal.
[0194] S1209: The second application and the first application transmit audio streams, video streams, and any other data via the data channel.
[0195] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0196] Based on the same inventive concept, the embodiment of the present application also provides a channel establishment device for implementing the channel establishment method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more channel establishment device embodiments provided below can refer to the limitations on the channel establishment method above, and will not be repeated here.
[0197] In an exemplary embodiment, Fig.13 As shown, a channel establishment device is provided, which is configured in a software development tool SDK in a first terminal, and a first application and a background service are configured in the first terminal. The device includes:
[0198] Establishing a request processing module 11, which is used to execute the channel establishment method in the SDK to obtain the creation parameter information required for building the data channel when obtaining the channel establishment request initiated by the first application;
[0199] The channel construction module 12 is used to send the creation parameter information to the background service to instruct the background service to interact with the IMS protocol stack in the first terminal according to the creation parameter information to build a data channel between the first terminal and the second application of the second terminal; the first application and the second application are the same application.
[0200] Each module in the above-mentioned channel establishment device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of the processor in the first terminal in the form of hardware, or can be stored in the memory in the first terminal in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0201] In an exemplary embodiment, a first terminal is provided. The first terminal may be a first terminal, and its internal structure diagram may be as follows: Fig.14As shown. The first terminal includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the first terminal is used to provide computing and control capabilities. The memory of the first terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the first terminal is used to exchange information between the processor and an external device. The communication interface of the first terminal is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a channel establishment method is implemented. The display unit of the first terminal is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the first terminal can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the first terminal shell, or an external keyboard, touchpad or mouse.
[0202] Those skilled in the art will understand that Fig.14 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the first terminal to which the scheme of the present application is applied. The specific first terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0203] In an exemplary embodiment, a first terminal is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0204] When the channel establishment request initiated by the first application is obtained, the channel establishment method in the SDK is executed to obtain the creation parameter information required for building the data channel;
[0205] The creation parameter information is sent to the background service to instruct the background service to interact with the IMS protocol stack in the first terminal according to the creation parameter information to build a data channel between the first terminal and the second application of the second terminal; the first application and the second application are the same application.
[0206] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0207] When the channel establishment request initiated by the first application is obtained, the channel establishment method in the SDK is executed to obtain the creation parameter information required for building the data channel;
[0208] The creation parameter information is sent to the background service to instruct the background service to interact with the IMS protocol stack in the first terminal according to the creation parameter information to build a data channel between the first terminal and the second application of the second terminal; the first application and the second application are the same application.
[0209] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0210] When the channel establishment request initiated by the first application is obtained, the channel establishment method in the SDK is executed to obtain the creation parameter information required for building the data channel;
[0211] The creation parameter information is sent to the background service to instruct the background service to interact with the IMS protocol stack in the first terminal according to the creation parameter information to build a data channel between the first terminal and the second application of the second terminal; the first application and the second application are the same application.
[0212] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0213] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0214] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0215] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A channel establishment method, characterized in that: A software development tool SDK is applied to a first terminal, wherein the first terminal is configured with a first application and a background service, and the method includes: When the channel establishment request initiated by the first application is obtained, the channel establishment method in the SDK is executed to obtain the creation parameter information required for building the data channel; The creation parameter information is sent to the background service to instruct the background service to interact with the IMS protocol stack in the first terminal according to the creation parameter information to build a data channel between the first terminal and the second application of the second terminal; the first application and the second application are the same application.
2. The method according to claim 1, characterized in that The obtaining the channel establishment request initiated by the first application includes: A channel establishment request initiated by the first application is obtained through a bridge library between the first application and the SDK.
3. The method according to claim 1, characterized in that The sending the creation parameter information to the background service includes: The creation parameter information is sent to the background service through a cross-process communication interface between the background service and the SDK.
4. The method according to claim 3, characterized in that The method further comprises: Call the service binding method to bind to the background service; When the binding is completed, obtain the cross-process communication object returned by the background service; According to the cross-process communication object, a cross-process communication interface between the background service and the SDK is constructed.
5. The method according to claim 1, characterized in that After sending the creation parameter information to the background service, the method further includes: Through the first callback interface between the SDK and the background service, a channel construction success event returned by the background service is obtained.
6. The method according to claim 5, characterized in that After obtaining the channel building success event returned by the background service, the method further includes: According to the data channel object returned by the background service through the first callback interface between the SDK and the background service, registering an observer interface in the first callback interface; the data channel object is an instance of the data channel; The object event corresponding to the data channel object is obtained through the observer interface; the object event includes an event of successful construction of the data channel object and / or an event of data transmission of the data channel object.
7. The method according to claim 6, characterized in that The method further comprises: Sending the object event to the first application through an event callback interface between the first application and the SDK; The event callback interface is constructed according to the registration information of the first application.
8. The method according to claim 5, characterized in that After obtaining the channel building success event returned by the background service, the method further includes: When a data transmission request initiated by the first application is obtained, a data transmission method in the SDK is executed to obtain transmission parameter information required for transmitting data through the data channel; The transmission parameter information is sent to the background service to instruct the background service to transmit the first terminal data in the data transmission request to the IMS protocol stack in the first terminal through the data channel according to the transmission parameter information, so as to instruct the IMS protocol stack to transmit the first terminal data to the second application.
9. A data channel device, characterized in that: A software development tool SDK configured in a first terminal, wherein the first terminal is configured with a first application and a background service, and the device comprises: Establish a request processing module, which is used to execute the channel construction method in the SDK when obtaining the channel establishment request initiated by the first application, and obtain the creation parameter information required to build the data channel; A channel construction module is used to send the creation parameter information to the background service to instruct the background service to interact with the IMS protocol stack in the first terminal according to the creation parameter information to build a data channel between the first terminal and the second application of the second terminal; the first application and the second application are the same application.
10. A first terminal, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
5G new call adaptation method, system and device compatible with multi-chip platform and medium
CN120547541A
5g new call adaptation method, system, device and medium compatible with multi-chip platform
CN120547541B