System and method for constructing communication of application, device and storage medium

CN119201497BActive Publication Date: 2026-10-23CHENGDU CELIS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411341901.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2026-10-23
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

[0003]若每次更新DMS提供的binder接口,则与之对应的交互应用也需要更新jar包,一般都是通过手动更新,导致出错率较高,同时显得整个通信构建过程十分繁琐

Benefits of technology

[0015]根据本申请一个方面,还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述的通信构建方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201497B_ABST
    Figure CN119201497B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of communication, and discloses a communication construction method and device of a system and an interactive application, equipment and a storage medium. The method is applied to a warehouse manager and comprises the following steps: in response to a scheduling signal of the interactive application, a target preset method library corresponding to a version number specified by the scheduling signal is determined; a specified connection interface in the target preset method library is issued to the interactive application through a dependent data link, so that the interactive application establishes a communication link with the system according to the specified connection interface, and cross-process communication between the system and the interactive application is realized; wherein the specified connection interface is an interface encapsulated based on binder connection code between the system and the interactive application, and the dependent data link is constructed based on dependent code in a specified configuration file. The application can automatically complete the construction of the communication link without manual intervention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, specifically to a method, apparatus, device, and storage medium for constructing communication systems and interactive applications. Background Technology

[0002] Currently, the signal transmission method of the system relies on the interface. In particular, the DMS (Driver Monitoring System) is usually packaged into a JAR file as a binder. Then, the DMS and the DMS interactive application are integrated into the JAR file, and interactive interfaces are built at both ends to enable communication.

[0003] If the binder interface provided by DMS is updated every time, the corresponding interactive application also needs to update its JAR file. This is usually done manually, which leads to a high error rate and makes the entire communication setup process very cumbersome. Summary of the Invention

[0004] In view of the above problems, this application provides a method, apparatus, device and storage medium for constructing communication between a system and an interactive application, for quickly constructing a communication link between the DMS system and its interactive application.

[0005] According to one aspect of this application, a method for constructing communication between a system and an interactive application is provided, applied to a repository manager. The communication construction method includes: responding to a scheduling signal from the interactive application, determining a target preset method library corresponding to a version number specified by the scheduling signal; and sending a specified connection interface in the target preset method library to the interactive application via a dependency data link, so that the interactive application establishes a communication link with the system based on the specified connection interface, thereby realizing cross-process communication between the system and the interactive application; wherein the specified connection interface is an interface encapsulated based on the binder connection code between the system and the interactive application, and the dependency data link is constructed based on the dependency code in a specified configuration file, the specified configuration file including the version number corresponding to the target preset method library.

[0006] In one optional embodiment, the dependency data link includes a first dependency data link and a second dependency data link. The first dependency data link is the link between the repository manager and the system, and the second dependency data link is the link between the repository manager and the interactive application. The communication construction method further includes: constructing dependency data links with the interactive application and the system according to the dependency code set in the specified configuration file, so that the system calls the target preset method library through the first dependency data link, and the interactive application obtains the specified connection interface through the second dependency data link; wherein, the version number corresponding to the target preset method library is the same as the version number in the specified configuration file.

[0007] In an alternative approach, the communication construction method further includes: encapsulating the connection code between the binder-client and the binder-server into a connection interface; defining an AIDL interaction interface for a specified signal, and exposing the AIDL interaction interface of the binder-client and the AIDL interaction interface of the binder-server.

[0008] In an alternative approach, the communication construction method further includes: in response to an implementation signal from the system, sending the AIDL interaction interface of the binder-server to the system, so that the system acts as the server for binder communication, and so that the system implements the Stub object corresponding to the AIDL interaction interface.

[0009] In an alternative approach, the communication construction method further includes: in response to an access signal from the interactive application, sending the AIDL interaction interface of the binder-client to the interactive application, so that the interactive application acts as a client for binder communication, and so that the interactive application obtains the specified signal.

[0010] In an optional embodiment, the communication construction method further includes: establishing a relationship with a preset method library and storing each preset method library as a library file; wherein each preset method library includes the connection interface, the AIDL interaction interface of the binder-client, and the AIDL interaction interface of the binder-server; establishing a dependency relationship with the corresponding library file based on the dependency code in the configuration file, so as to call the corresponding library file based on the dependency code.

[0011] In one optional approach, determining the target preset method library corresponding to the version number specified by the scheduling signal further includes: matching the version number specified by the scheduling signal with a preset version number; wherein the specified version number is a parameter derived from the current configuration file; if the match is successful, the preset method library corresponding to the successfully matched preset version number is taken as the target preset method library.

[0012] According to another aspect of this application, a communication construction device for a system and an interactive application is provided, applied to a repository manager. The communication construction device includes: a scheduling response module, used to respond to a scheduling signal from an interactive application and determine a target preset method library corresponding to a version number specified by the scheduling signal; and a communication construction module, used to send a specified connection interface in the target preset method library to the interactive application through a dependency data link, so that the interactive application establishes a communication link with the system according to the specified connection interface, thereby realizing cross-process communication between the system and the interactive application; wherein, the specified connection interface is an interface encapsulated based on the binder connection code between the system and the interactive application, and the dependency data link is constructed based on the dependency code in a specified configuration file, the specified configuration file including the version number corresponding to the target preset method library.

[0013] According to one aspect of this application, an electronic device is provided, comprising: a controller; and a memory for storing one or more programs, which, when executed by the controller, perform the communication construction method described above.

[0014] According to one aspect of this application, a computer-readable storage medium is also provided, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform the above-described communication construction method.

[0015] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned communication construction method.

[0016] This application's repository manager distributes a specified connection interface corresponding to a specified version number to the interactive application, enabling the interactive application to quickly establish a communication link with the system based on the specified connection interface, thereby achieving cross-process communication between the two. The entire process can be automated without manual intervention. Furthermore, this application can accurately determine the target preset method library based on the version number, and can quickly determine the corresponding target preset method library even if the version number is updated.

[0017] The above description is merely an overview of the technical solutions of the embodiments of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0019] Figure 1 This is a flowchart illustrating a communication construction method between a system and an interactive application, as shown in an exemplary embodiment of this application.

[0020] Figure 2 Based on Figure 1 The exemplary embodiment shown illustrates a flowchart of another method for constructing communication between a system and an interactive application.

[0021] Figure 3 This is a dependent data link entity diagram illustrated in an exemplary embodiment of this application.

[0022] Figure 4 Based on Figure 1 The exemplary embodiment shown illustrates a flowchart of another method for constructing communication between a system and an interactive application.

[0023] Figure 5 This is a schematic diagram of the structure of a communication construction device for a system and an interactive application, as illustrated in an exemplary embodiment of this application.

[0024] Figure 6 This is a schematic diagram of the structure of a computer system for an electronic device, as illustrated in an exemplary embodiment of this application. Detailed Implementation

[0025] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0026] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0027] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0028] In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0029] Existing DMS (Driver Monitoring System) typically uses a JAR file to encapsulate the binder, then integrates the DMS and its interactive applications into the JAR file, and finally builds interactive interfaces on both ends for communication.

[0030] If the binder interface provided by DMS is updated every time, the corresponding interactive application also needs to update its JAR file, which is usually done manually, resulting in a high error rate. At the same time, the interactive application requires corresponding interactive code, which necessitates manual adjustments, making the entire communication setup process extremely cumbersome.

[0031] Therefore, one aspect of this application provides a method for constructing communication between a system and an interactive application. Please refer to [link / reference] for details. Figure 1 , Figure 1 This is a flowchart illustrating a communication construction method between a system and an interactive application, as shown in an exemplary embodiment of this application. The communication construction method includes at least steps S110 to S120 and is applied to a repository manager, as detailed below:

[0032] S110: In response to the scheduling signal of the interactive application, determine the target preset method library corresponding to the version number specified by the scheduling signal.

[0033] The system in this embodiment is the DMS system, and the interactive application is the DMS interactive application, which is an application that can communicate across processes with the DMS system.

[0034] When responding to a scheduling signal, the repository manager determines the version number specified by the scheduling signal and uses this version number to identify the target preset method library. For example, the version number specified by the scheduling signal is matched with a preset version number; the specified version number is a parameter from the current configuration file. If a match is found, the preset method library corresponding to the matched preset version number is taken as the target preset method library.

[0035] Different preset version numbers correspond to different preset method libraries. In this embodiment, the target preset method library corresponding to the DMS interactive application can be quickly determined by the version number, so that the DMS interactive application can call the methods, interfaces and other parameters in the target preset method library.

[0036] S120: The specified connection interface in the target preset method library is sent to the interactive application through the dependency data link, so that the interactive application can establish a communication link with the system according to the specified connection interface, so as to realize cross-process communication between the system and the interactive application; wherein, the specified connection interface is an interface encapsulated based on the binder connection code between the system and the interactive application, and the dependency data link is constructed based on the dependency code in the specified configuration file, which includes the version number corresponding to the target preset method library.

[0037] From a code perspective, binder is a class; from an IPC (Inter-Process Communication) perspective, binder is a method of inter-process communication in Android; from an application perspective, binder is the medium between the client and the server.

[0038] The designated connection interface is the key interface for building the communication link between the DMS system and the DMS interactive application. Based on this designated connection interface, a binder communication mechanism between the DMS system and the DMS interactive application can be built.

[0039] This embodiment uses a designated encapsulated connection interface to build a binder communication mechanism between the DMS system and the DMS interactive application. This eliminates the need for manual coding in the DMS interactive application, allowing for the rapid construction of the binder communication mechanism and accelerating the process of establishing a communication link between the two.

[0040] The dependent data link is a pre-configured link. In S120, the dependent data link specifically refers to the data link between the warehouse manager and the DMS interactive application. The DMS interactive application obtains the specified connection interface through this dependent data link to build a communication link between itself and the DMS system, thereby realizing cross-process communication between them.

[0041] In this embodiment, the repository manager sends a specified connection interface corresponding to a specified version number to the interactive application, enabling the interactive application to quickly establish a communication link with the system based on the specified connection interface, thereby achieving cross-process communication between the two. The entire process can be automated without manual intervention. Furthermore, this application can accurately determine the target preset method library based on the version number, and can quickly determine the corresponding target preset method library even if the version number is updated.

[0042] In another exemplary embodiment of this application, how to construct a dependent data link is described in detail; please refer to [link to relevant documentation]. Figure 2 , Figure 2 Based on Figure 1 The exemplary embodiment shown illustrates a flowchart of another method for establishing communication between a system and an interactive application. This communication establishment method, as in... Figure 1 Based on S110 to S120 shown, S210 is also included; wherein, the dependent data link includes a first dependent data link and a second dependent data link. The first dependent data link is the link between the repository manager and the system, and the second dependent data link is the link between the repository manager and the interactive application, which are described in detail below:

[0043] S210: Based on the dependency code set in the specified configuration file, construct the dependency data links with the interactive application and the system, so that the system calls the target preset method library through the first dependency data link and the interactive application obtains the specified connection interface through the second dependency data link; wherein, the version number of the target preset method library is the same as the version number in the specified configuration file.

[0044] For example, in this embodiment, the repository manager is the Nexus repository manager. In order to make DMS and DMS interactive applications depend on the Nexus repository manager, you only need to add a line of code that depends on the method library in the build.gradle file of the code, which optimizes the tedious operation of manually copying JARs.

[0045] The Build.gradle file is a configuration file required by all Android applications. This file contains information about which libraries the application needs to reference during compilation and also configures some necessary parameters for compiling the code.

[0046] Code that depends on the default method library: Adding `api"com.seres.common-SNAPSHOT:dmsapi:1.0.3.16"` to the `Build.gradle` file will successfully obtain the default DMS method library from the Nexus server (i.e., the default method library for this application).

[0047] In some embodiments, the DMS system and the DMS interactive application have different dependency data links from the repository manager; please refer to [link to relevant documentation]. Figure 3 , Figure 3 This is an exemplary embodiment of the dependency data link entity diagram shown in this application. The first dependency data link is between the DMS system and the repository manager. The DMS system calls the target preset method library through the first dependency data link to implement the Stub object corresponding to the corresponding interaction interface (AIDL interaction interface). The second dependency data link is between the DMS interactive application and the repository manager, enabling the DMS interactive application to quickly obtain the specified connection interface.

[0048] In another exemplary embodiment of this application, how to construct a dependent data link is described in detail; please refer to [link to relevant documentation]. Figure 4 , Figure 4 Based on Figure 1 The exemplary embodiment shown illustrates a flowchart of another method for establishing communication between a system and an interactive application. This communication establishment method, as in... Figure 1 Based on S110 to S120 shown, S410 to S420 are also included, which are described in detail below:

[0049] S410: Encapsulates the connection code between the binder client and binder server into a connection interface.

[0050] This embodiment encapsulates the binder connection. For example, the binder connection code between the client (i.e., the DMS interactive application acting as the client) and the server (i.e., the DMS system acting as the server) is encapsulated into the connect() interface. The client can easily call the connect interface to achieve the connection between the client and the server without having to write a set of cumbersome binder connection code, thus reducing the access cost of the interactive application.

[0051] S420: Defines the AIDL interaction interface for the specified signal and exposes the AIDL interaction interface for the binder client and the AIDL interaction interface for the binder server.

[0052] The pre-defined method library contains AIDL interaction interfaces between the DMS system and DMS interactive applications, enabling message communication between them. It exposes the Binder-server AIDL interaction interface, allowing the DMS system to implement the corresponding AIDL Stub object when referencing the pre-defined method library; it also exposes the binder-client AIDL interaction interface, allowing DMS interactive applications to directly call the AIDL interfaces after integrating the method library to obtain relevant information.

[0053] In some embodiments, in Figure 4 The communication construction method shown includes at least S430 to clarify the construction process of the system-side binder communication mechanism, which is detailed below:

[0054] S430: In response to the system's implementation signal, the AIDL interaction interface of the binder-server is sent to the system so that the system can act as the server for binder communication and implement the stub object corresponding to the AIDL interaction interface.

[0055] In this embodiment, the warehouse manager can also respond to the implementation requirements of the DMS system by sending the AIDL interaction interface of the binder-server to the DMS system. This enables the DMS system to implement the binder-service code and transmit specified signals via callbacks. In other words, the DMS system acts as the server for binder communication, enabling it to implement the stub object corresponding to the AIDL interaction interface. These specified signals include, but are not limited to, signals related to fatigue, distraction, and dangerous driving.

[0056] In some embodiments, in Figure 4 The communication construction method shown includes at least S440 to clarify the construction process of the binder communication mechanism on the interactive application side, which is described in detail below:

[0057] S440: In response to the access signal of the interactive application, the AIDL interaction interface of the binder-client is sent to the interactive application so that the interactive application can act as a client of binder communication and obtain the specified signal.

[0058] The access signal indicates that the DMS interactive application accesses the warehouse manager. In this embodiment, the warehouse manager responds to the access signal of the interactive application and sends the AIDL interactive interface of the binder-client. The DMS interactive application, as the client of the binder communication, can quickly obtain the specified signal through the AIDL interface, such as fatigue, distraction, dangerous driving, etc.

[0059] In some embodiments, in Figure 4 The communication construction method shown also includes at least S450 to S460 to clarify the origin of the default method in the repository server, which is described in detail below:

[0060] S450: Establish a relationship with the preset method library and store each preset method library as a library file; wherein each preset method library includes a connection interface, a binder-client AIDL interaction interface, and a binder-server AIDL interaction interface.

[0061] This embodiment aims to simplify the communication process between the DMS system and DMS interactive applications, and reduce the access cost of the interactive applications. It constructs a system as follows: Figure 3 The preset method library shown contains preset methods, and each preset method library is deployed as a library file to the repository manager, and each library file is managed by version number.

[0062] S460: Establishes dependency relationships with corresponding library files based on the dependency code in the configuration file, and calls the corresponding library files based on the dependency code.

[0063] For example, the configuration file is the Build.gradle file, which is a configuration file required by all Android programs. This configuration file contains which libraries the program needs to reference when compiling, and also configures some necessary parameters when compiling the code.

[0064] Adding a line of code to the `build.gradle` file to depend on library dependencies optimizes the tedious manual copying of JAR files. By modifying the library version number in the `build.gradle` file, the correct updated library is found, avoiding incorrect JAR replacements. The original approach of replacing JAR files also aims to find the correct library.

[0065] Example code that depends on a pre-defined library: Adding `api"com.seres.common-SNAPSHOT:dmsapi:1.0.3.16"` to the Build.gradle file will successfully retrieve the corresponding library file from the repository manager, i.e., the corresponding pre-defined library.

[0066] Another aspect of this application provides a communication construction device for a system and interactive applications, such as... Figure 5 As shown, Figure 5 This is a schematic diagram of a communication construction device for a system and an interactive application, as illustrated in an exemplary embodiment of this application. The communication construction device 500 is applied to a repository manager and includes: a scheduling response module 510, used to determine the target preset method library corresponding to the version number specified by the scheduling signal in response to a scheduling signal from the interactive application; and a communication construction 530, used to send a specified connection interface from the target preset method library to the interactive application via a dependency data link, so that the interactive application establishes a communication link with the system based on the specified connection interface, thereby realizing cross-process communication between the system and the interactive application; wherein, the specified connection interface is an interface encapsulated based on the binder connection code between the system and the interactive application, and the dependency data link is constructed based on the dependency code in a specified configuration file, the specified configuration file including the version number corresponding to the target preset method library.

[0067] In another exemplary embodiment, the dependency data link includes a first dependency data link and a second dependency data link. The first dependency data link is the link between the repository manager and the system, and the second dependency data link is the link between the repository manager and the interactive application. The communication building device 500 further includes a dependency data link building module, which is used to build dependency data links with the interactive application and the system according to the dependency code set in the specified configuration file, so that the system calls the target preset method library through the first dependency data link and the interactive application obtains the specified connection interface through the second dependency data link. The version number of the target preset method library is the same as the version number in the specified configuration file.

[0068] In another exemplary embodiment, the communication construction apparatus 500 further includes: an encapsulation module for encapsulating the connection code between the binder-client and the binder-server into a connection interface; and a definition and exposure module for defining the AIDL interaction interface of a specified signal and exposing the AIDL interaction interface of the binder-client and the AIDL interaction interface of the binder-server.

[0069] In another exemplary embodiment, the communication construction apparatus 500 further includes: an implementation response module, configured to, in response to an implementation signal from the system, send the AIDL interaction interface of the binder-server to the system, so that the system acts as the server for binder communication, and so that the system implements the stub object corresponding to the AIDL interaction interface.

[0070] In another exemplary embodiment, the communication construction apparatus 500 further includes an access response module, configured to send the AIDL interaction interface of the binder-client to the interactive application in response to the access signal of the interactive application, so that the interactive application acts as a client of binder communication and the interactive application obtains the specified signal.

[0071] In another exemplary embodiment, the communication construction apparatus 500 further includes: a relationship construction module, used to establish relationships with preset method libraries and store each preset method library as a library file; wherein each preset method library includes a connection interface, a binder-client AIDL interaction interface, and a binder-server AIDL interaction interface; and a dependency relationship establishment module, used to establish dependency relationships with corresponding library files based on dependency code in the configuration file, so as to call the corresponding library files based on the dependency code.

[0072] In another exemplary embodiment, the scheduling response module 510 further includes: a matching module, configured to match the version number specified by the scheduling signal with a preset version number; wherein the specified version number is a parameter derived from the current configuration file; and a matching success module, configured to, if the matching is successful, use the preset method library corresponding to the successfully matched preset version number as the target preset method library.

[0073] This application's repository manager distributes a specified connection interface corresponding to a specified version number to the interactive application, enabling the interactive application to quickly establish a communication link with the system based on the specified connection interface, thereby achieving cross-process communication between the two. The entire process can be automated without manual intervention. Furthermore, this application can accurately determine the target preset method library based on the version number, and can quickly determine the corresponding target preset method library even if the version number is updated.

[0074] It should be noted that the communication construction device provided in the above embodiments and the communication construction method provided in the foregoing embodiments belong to the same concept. The specific way in which each module and unit performs operations has been described in detail in the method embodiments, and will not be repeated here.

[0075] Another aspect of this application provides an electronic device, including: a controller; and a memory for storing one or more programs, which, when executed by the controller, perform the communication construction method described above.

[0076] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer system for an electronic device, illustrating an exemplary embodiment of this application. It shows a schematic diagram of the structure of a computer system suitable for implementing the embodiments of this application.

[0077] It should be noted that, Figure 6 The computer system 600 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0078] like Figure 6As shown, the computer system 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 602 or programs loaded from storage portion 608 into Random Access Memory (RAM) 603. The RAM 603 also stores various programs and data required for system operation. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An Input / Output (I / O) interface 605 is also connected to the bus 604.

[0079] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.

[0080] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs various functions defined in the system of this application.

[0081] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0082] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0083] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0084] Another aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned communication construction method. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.

[0085] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the communication construction methods provided in the various embodiments described above.

[0086] According to one aspect of the embodiments of this application, a computer system is also provided, including a Central Processing Unit (CPU), which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) or a program loaded from storage into random access memory (RAM), such as performing the methods described above. Various programs and data required for system operation are also stored in the RAM. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0087] The following components are connected to the I / O interface: input components including keyboards, mice, etc.; output components including cathode ray tubes (CRTs), liquid crystal displays (LCDs), and speakers; storage components including hard drives; and communication components including network interface cards such as LAN (Local Area Network) cards and modems. The communication components perform communication processing via networks such as the Internet. Drives are also connected to the I / O interface as needed. Removable media, such as disks, optical discs, magneto-optical discs, semiconductor memories, etc., are installed on the drive as needed so that computer programs read from them can be installed into the storage components as required.

[0088] The above description is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.

Claims

1. A method for constructing communication between a system and an interactive application, characterized in that, This is applied to a warehouse manager, the system is a driver monitoring system, the interactive application is an application capable of cross-process communication with the driver monitoring system, the warehouse manager is the Nexus warehouse manager, and the communication construction method includes: In response to the scheduling signal of the interactive application, the target preset method library corresponding to the version number specified by the scheduling signal is determined; The specified connection interface in the target preset method library is distributed to the interactive application via a dependent data link, so that the interactive application establishes a communication link with the system based on the specified connection interface, thereby realizing cross-process communication between the system and the interactive application; wherein, the specified connection interface is an interface encapsulated based on the binder connection code between the system and the interactive application, and the dependent data link is constructed based on the dependent code in a specified configuration file, the specified configuration file including the version number corresponding to the target preset method library; the binder is one of the following: code class, Android cross-process communication method, and client-server medium.

2. The communication construction method according to claim 1, characterized in that, The dependent data link includes a first dependent data link and a second dependent data link. The first dependent data link is the link between the repository manager and the system, and the second dependent data link is the link between the repository manager and the interactive application. The communication construction method further includes: Based on the dependency code set in the specified configuration file, a dependency data link is constructed between the interactive application and the system, so that the system calls the target preset method library through the first dependency data link, and the interactive application obtains the specified connection interface through the second dependency data link; wherein, the version number corresponding to the target preset method library is the same as the version number in the specified configuration file.

3. The communication construction method according to claim 1, characterized in that, The communication construction method further includes: Encapsulate the connection code between the binder client and binder server into a connection interface; Define the AIDL interaction interface for the specified signal, and expose the AIDL interaction interface of the binder-client and the AIDL interaction interface of the binder-server.

4. The communication construction method according to claim 3, characterized in that, The communication construction method further includes: In response to the implementation signal of the system, the AIDL interaction interface of the binder-server is sent to the system so that the system acts as the server for binder communication and implements the Stub object corresponding to the AIDL interaction interface.

5. The communication construction method according to claim 3, characterized in that, The communication construction method further includes: In response to the access signal of the interactive application, the AIDL interaction interface of the binder-client is sent to the interactive application, so that the interactive application acts as a client for binder communication and can obtain the specified signal.

6. The communication construction method according to claim 3, characterized in that, The communication construction method further includes: Establish a relationship with the preset method library and store each preset method library as a library file; wherein, each preset method library includes the connection interface, the AIDL interaction interface of the binder-client, and the AIDL interaction interface of the binder-server; The system establishes dependencies between the dependency code in the configuration file and the corresponding library file, and calls the corresponding library file based on the dependency code.

7. The communication construction method according to any one of claims 1 to 6, characterized in that, The step of determining the target preset method library corresponding to the version number specified by the scheduling signal further includes: The version number specified by the scheduling signal is matched with a preset version number; wherein the specified version number is derived from a parameter in the current configuration file; If a match is successful, the preset method library corresponding to the successfully matched preset version number will be used as the target preset method library.

8. A communication construction device for a system and interactive applications, characterized in that, The system is a driver monitoring system, and the interactive application is an application capable of cross-process communication with the driver monitoring system. The warehouse manager is the Nexus warehouse manager, and the communication construction device includes: The scheduling response module is used to respond to the scheduling signal of the interactive application and determine the target preset method library corresponding to the version number specified by the scheduling signal. A communication construction module is used to distribute a specified connection interface from the target preset method library to the interactive application via a dependency data link, so that the interactive application can establish a communication link with the system based on the specified connection interface to realize cross-process communication between the system and the interactive application; wherein, the specified connection interface is an interface encapsulated based on the binder connection code between the system and the interactive application, the dependency data link is constructed based on the dependency code in a specified configuration file, and the specified configuration file includes the version number corresponding to the target preset method library; the binder is one of the following: code class, Android cross-process communication method, and client-server medium.

9. An electronic device, characterized in that, include: Controller; A memory for storing one or more programs, which, when executed by a controller, cause the controller to implement the communication construction method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by the computer's processor, cause the computer to perform the communication construction method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Cross-process communication interface routing method, device and system

    CN110377438A

  • Integration and tracing system and method for intelligent driving software

    CN111831266A