CN113055250B - Networking communication method, device, terminal equipment and storage medium - Google Patents

Networking communication method, device, terminal equipment and storage medium Download PDF

Info

Publication number
CN113055250B
CN113055250B CN202110334693.8A CN202110334693A CN113055250B CN 113055250 B CN113055250 B CN 113055250B CN 202110334693 A CN202110334693 A CN 202110334693A CN 113055250 B CN113055250 B CN 113055250B
Authority
CN
China
Prior art keywords
program
communication
interface
protocol module
calling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110334693.8A
Other languages
Chinese (zh)
Other versions
CN113055250A (en
Inventor
刘均
周辉濂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202110334693.8A priority Critical patent/CN113055250B/en
Publication of CN113055250A publication Critical patent/CN113055250A/en
Application granted granted Critical
Publication of CN113055250B publication Critical patent/CN113055250B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The application provides a networking communication method, which comprises the following steps: if a first communication connection instruction about the first program is acquired, controlling the first program to load a communication interface file, wherein the communication interface file comprises a first interface function and other interface functions; calling the first interface function, and connecting the first program with a first protocol module; based on the first protocol module, calling other interface functions of the communication interface file, creating a first communication link of the first program, and realizing networking communication of the first program; if detecting the calling instruction of the first program aiming at the target dynamic link library, calling other interface functions of the communication interface file, creating a second communication link of the target dynamic link library, and realizing the networking communication of the target dynamic link library. By the method, the efficiency of realizing networking communication of each diagnosis function module can be improved.

Description

Networking communication method, device, terminal equipment and storage medium
Technical Field
The present application belongs to the field of communication connection technologies, and in particular, relates to a network communication method, a network communication apparatus, a terminal device, and a storage medium.
Background
At present, with the continuous development of diagnostic technologies, more and more diagnostic function modules are developed for a terminal to be diagnosed in a diagnostic device, and in practical application, the diagnostic function modules are required to establish networking communication so as to realize the communication connection between the diagnostic device and the terminal to be diagnosed, and then the terminal to be diagnosed can be diagnosed. However, the communication interface files for establishing the communication connection are loaded and used by another diagnostic function module after the diagnostic function module is loaded and used, and the process of establishing the communication connection for information transmission by each diagnostic function module is complicated, and the processing efficiency is low.
Disclosure of Invention
In view of this, embodiments of the present application provide a network communication method, a network communication apparatus, a terminal device, and a storage medium, which can improve the efficiency of implementing network communication by each diagnostic function module.
A first aspect of an embodiment of the present application provides a networking communication method, configured to implement networking communication of a diagnostic function module, where the diagnostic function module includes a first program and a target dynamic link library, and the networking communication method includes:
if a first communication connection instruction about the first program is acquired, controlling the first program to load a communication interface file, wherein the communication interface file comprises a first interface function and other interface functions;
calling the first interface function, and connecting the first program with a first protocol module, wherein the first interface function is associated with the first protocol module;
based on the first protocol module, calling other interface functions of the communication interface file, creating a first communication link of the first program, and realizing networking communication of the first program;
if detecting the calling instruction of the first program aiming at the target dynamic link library, calling other interface functions of the communication interface file, creating a second communication link of the target dynamic link library, and realizing the networking communication of the target dynamic link library.
Optionally, the first program and the target dynamic link library belong to the same process.
Optionally, the diagnostic function module further includes a second program, where the second program and the first program belong to different processes, and the communication interface file further includes a second interface function;
after calling other interface functions of the communication interface file based on the first protocol module, creating a first communication link of the first program, and implementing networking communication of the first program, the networking communication method further includes:
if a second communication connection instruction related to the second program is detected, controlling the first program to release the communication interface file;
controlling the second program to load the communication interface file;
calling the second interface function to connect the second program with a second protocol module, wherein the second interface function is associated with the second protocol module;
based on the second protocol module, calling other interface functions of the communication interface file, creating a third communication link of the second program, and realizing networking communication of the second program.
Optionally, the calling a first interface function in the communication interface file to connect the first program with a first protocol module includes:
calling the first interface function, and executing module initialization operation on the first protocol module;
connecting the first program with the first protocol module after performing module initialization operations on the first protocol module.
Optionally, before controlling the first program to release the communication interface file, the method further includes:
disconnecting the first communication link of the first program;
and disconnecting the communication connection between the first program and the first protocol module.
Optionally, after the creating a first communication link of the first program and implementing networking communication of the first program, the method includes:
and carrying out data transmission with the terminal to be diagnosed through the first communication link.
A second aspect of an embodiment of the present application provides a network communication apparatus for implementing network communication of a diagnostic function module, where the diagnostic function module includes a first program and a target dynamic link library, and the network communication apparatus includes:
the first loading unit is used for controlling the first program to load a communication interface file if a first communication connection instruction about the first program is acquired, wherein the communication interface file comprises a first interface function and other interface functions;
the first connection unit is used for calling the first interface function and connecting the first program with a first protocol module, wherein the first interface function is associated with the first protocol module;
the first creating unit is used for calling other interface functions of the communication interface file based on the first protocol module, creating a first communication link of the first program and realizing networking communication of the first program;
and the second creating unit is used for calling other interface functions of the communication interface file if a calling instruction of the first program for the target dynamic link library is detected, creating a second communication link between the target dynamic link library and the terminal to be diagnosed, and realizing networking communication of the target dynamic link library.
Optionally, the first program and the target dynamic link library belong to the same process.
Optionally, the diagnostic function module further includes a second program, where the second program and the first program belong to different processes, and the communication interface file further includes a second interface function;
the networked communication device further comprises:
the release unit is used for controlling the first program to release the communication interface file if a second communication connection instruction related to the second program is detected;
the second loading unit is used for controlling the second program to load the communication interface file;
the second connection unit is used for calling the second interface function and connecting the second program with a second protocol module, wherein the second interface function is associated with the second protocol module;
and the third creating unit is used for calling other interface functions of the communication interface file based on the second protocol module, creating a third communication link of the second program, and realizing networking communication of the second program.
Optionally, the connection unit includes:
the initialization subunit is used for calling the first interface function and executing module initialization operation on the first protocol module;
and the connection subunit is used for connecting the first program with the first protocol module after module initialization operation is executed on the first protocol module.
Optionally, the networked communication device further includes:
a first disconnection unit configured to disconnect a first communication link of the first program;
and the second disconnection unit is used for disconnecting the communication connection between the first program and the first protocol module.
Optionally, the networked communication device further includes:
and the data transmission unit is used for carrying out data transmission with the terminal to be diagnosed through the first communication link.
A third aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the networking communication method as described above when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the networked communication method as described above.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the application, after a first communication connection instruction about a first program is acquired, the first program is controlled to load a communication interface file, then a first interface function in the communication interface file is called, and the first program is connected with a first protocol module, so that other interface functions of the communication interface file are called based on the first protocol module, a first communication link of the first program is created, and networking communication of the first program is realized; then, if a call instruction of the first program for the target dynamic link library is detected, other interface functions in the communication interface file loaded in the process can be efficiently called, a second communication link of the target dynamic link library is created, and networking communication of the target dynamic link library is achieved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flow chart of an implementation of a networking communication method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of another implementation of a networking communication method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a networked communication device provided in the second embodiment of the present application;
fig. 4 is a schematic diagram of a terminal device provided in the third embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
At present, with the continuous development of diagnostic technologies, more and more diagnostic function modules are developed for a terminal to be diagnosed in a diagnostic device, and in practical applications, the diagnostic function modules are required to establish networking communication so as to implement communication connection between the diagnostic device and the terminal to be diagnosed, and then the terminal to be diagnosed can be diagnosed. However, the communication interface files for establishing the communication connection all need to be loaded and used by one diagnostic function module after the diagnostic function module is loaded and used, and the process of establishing the communication connection for information transmission by each diagnostic function module is cumbersome. For example, data transmission usually needs to be realized by loading a communication interface file, performing module initialization according to interface functions in the communication interface file, connecting protocol modules, and creating a communication link. Therefore, the processing efficiency of realizing networking communication by each diagnosis function module is low at present.
In order to solve the above problem, embodiments of the present application provide a communication networking method, which can improve the efficiency of each diagnostic function module in implementing networking communication.
The execution subject of the networking communication method provided by the embodiment of the application can be diagnostic equipment. For example, the diagnostic device may be an Electronic Control Unit (ECU), a server, a desktop computer, a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), and the like. The embodiments of the present application do not set any limit to the specific type of the diagnostic device.
In one embodiment, the diagnostic device may be a vehicle diagnostic device, the terminal to be diagnosed may be a vehicle to be diagnosed, and the vehicle diagnostic device may perform communication connection with the vehicle to be diagnosed so as to obtain vehicle data in the vehicle to be diagnosed, so as to obtain a vehicle diagnostic result according to the vehicle data and a corresponding diagnostic function module in the vehicle diagnostic device.
Vehicle diagnostic equipment (such as a computer, portable diagnostic equipment and the like) is provided with vehicle diagnostic software of manufacturers and diagnostic function modules developed by the manufacturers based on the diagnostic protocol data unit application programming interface (D-PDU API) standard.
Specifically, in order to explain the technical means described in the present application, the following description will be given by way of specific examples.
Fig. 1 is a schematic implementation flow diagram of a networking communication method provided in an embodiment of the present application, where the networking communication method is used to implement networking communication of a diagnostic function module, where the diagnostic function module includes a first program and a target dynamic link library.
In the embodiment of the application, the diagnosis function aiming at the appointed terminal to be detected can be realized by operating the diagnosis function module. It should be noted that the diagnostic function module may not be limited to implementing the diagnostic function, but may also be used to implement other functions, for example, controlling the display of specific diagnostic data.
The specific function of the first program may be determined according to an actual application scenario. Illustratively, the first procedure may be a diagnostic procedure. Alternatively, the first program may be a display program for controlling a display operation of the diagnostic apparatus. The specific writing manner of the first program is not limited herein.
The target dynamic link library is a target dynamic link library associated with the first program. In one example, the target dynamically linked library may be a dynamically linked library that the first program can call directly or indirectly.
As shown in fig. 1. The networking communication method may include the steps of:
step S101, if a first communication connection instruction about the first program is acquired, controlling the first program to load a communication interface file, wherein the communication interface file comprises a first interface function and other interface functions.
The specific obtaining manner of the first communication connection instruction may be various. For example, the first communication connection instruction may be generated based on a specified input operation by a user and acquired by the diagnostic device; alternatively, the first communication connection instruction may also be generated when it is detected that the diagnostic device accesses the terminal to be diagnosed through a specified interface; alternatively, the first communication connection instruction may be sent to the diagnostic device by another terminal.
The communication interface file may be a Dynamic communication Library, and specifically may be a Dynamic Link Library (DLL) file. The communication interface file may include information of at least two interface functions, where specifically, the interface function may include information of the first interface function and other interface functions. The networking communication of the diagnosis function module can be realized by calling the interface function on the communication interface file.
Step S102, calling the first interface function, and connecting the first program with a first protocol module, where the first interface function is associated with the first protocol module.
In this embodiment, the first protocol module may be configured to perform communication protocol authentication based on a corresponding preset protocol, and the like. Illustratively, the first protocol module may be a Modular Vehicle Communication Interface (MVCI) protocol module, and the definition of the MVCI protocol module is given in the ISO22900-2-2017 standard and will not be described herein again.
The first interface function may include at least one interface function. The first interface function can be called by loading the communication interface file so as to connect the first program with the first protocol module.
In some embodiments, the calling a first interface function in the communication interface file to connect the first program with a first protocol module includes:
calling the first interface function, and executing module initialization operation on the first protocol module;
connecting the first program with the first protocol module after performing module initialization operations on the first protocol module.
In the embodiment of the present application, the influence of the historical application data for the first protocol module on the current communication connection may be avoided through the initialization operation, so that the first program may be efficiently connected to the first protocol module after the module initialization operation is performed on the first protocol module.
Step S103, based on the first protocol module, calling other interface functions of the communication interface file, creating a first communication link of the first program, and realizing the networking communication of the first program.
In the embodiment of the present application, the type, structure, and the like of the vehicle of the terminal to be diagnosed may be various, and are not limited herein.
In the embodiment of the application, after the diagnostic software is connected to the first protocol module, other interface functions of the communication interface file can be called to create the first communication link of the first program, so that networking communication of the first program is realized. At this time, the first program can communicate with the terminal to be diagnosed through networking communication, so that the diagnosis of the terminal to be diagnosed is realized.
In some embodiments, after said creating a first communication link for said first program, enabling networked communication for said first program, comprises:
and carrying out data transmission with the terminal to be diagnosed through the first communication link.
In this embodiment of the present application, a first communication link of a first program in the diagnostic device may be created, and then information interaction is performed with the terminal to be diagnosed through the first communication link, so as to obtain diagnostic data, analyze a fault of the terminal to be diagnosed according to the diagnostic data, and complete diagnosis of the terminal to be diagnosed.
Step S104, if detecting the calling instruction of the first program aiming at the target dynamic link library, calling other interface functions of the communication interface file, creating a second communication link of the target dynamic link library, and realizing the networking communication of the target dynamic link library.
In this embodiment of the application, the target dynamic link library may be a dynamic link library directly or indirectly invoked by the first program in the execution process. Illustratively, the target dynamic link library may be used to perform a function associated with the first program, such as a particular diagnostic function or data processing function, etc. The specific content of the target dynamic link library is not limited herein.
Since the target dynamic link library is associated with the first program, based on the communication interface file loaded by the first program in step S101, other interface functions of the communication interface file may be called to create the second communication link of the target dynamic link library, and it is not necessary to wait for the first program to release the communication interface file and disconnect the first communication link, and then reload the communication interface file by the target dynamic link library to implement communication connection. Therefore, in the embodiment of the application, the target dynamic link library can efficiently call other interface functions of the communication interface file based on the communication interface file loaded by the first program, and create the second communication link of the target dynamic link library, so that the communication connection process is greatly simplified, and the processing efficiency is improved.
In some embodiments, the first program and the target dynamically linked library belong to the same process.
In this embodiment of the application, because the first program and the target dynamic link library belong to the same process, the target dynamic link library can conveniently share the relevant data when the first program is connected with the first protocol module in the same process, so that the target dynamic link library can conveniently create the second communication link of the target dynamic link library based on the communication interface file loaded by the first program.
In some embodiments, the diagnostic function module further comprises a second program belonging to a different process than the first program, the communication interface file further comprising a second interface function;
after calling other interface functions of the communication interface file based on the first protocol module, creating a first communication link of the first program, and implementing networking communication of the first program, the networking communication method further includes:
step S201, if a second communication connection instruction related to the second program is detected, controlling the first program to release the communication interface file;
step S202, controlling the second program to load the communication interface file;
step S203, calling the second interface function, and connecting the second program with a second protocol module, where the second interface function is associated with the second protocol module;
step S204, based on the second protocol module, calling other interface functions of the communication interface file, creating a third communication link of the second program, and realizing the networking communication of the second program.
The second protocol module may be the same as or different from the first protocol module, and correspondingly, the second interface function may be the same as or different from the first interface function, and the first interface function and the second interface function may be respectively determined according to communication protocols and the like respectively corresponding to the first protocol module and the second protocol module in an actual application scenario.
In this embodiment, the second program and the first program may have different functions. For example, the first program may be a diagnostic program, and the second program may be a display program, etc. The first program and the second program may belong to different processes, and at this time, if a third communication link of the second program needs to be established, the communication interface file needs to be loaded through the process corresponding to the second program after the first program releases the communication interface file and disconnects the first communication link, so as to connect the second program with a second protocol module according to a second interface function in the communication interface file, and then, based on the second protocol module which is successfully connected, the third communication link of the second program is established.
In some embodiments, before controlling the first program to release the communication interface file, the method further includes:
disconnecting the first communication link of the first program;
and disconnecting the communication connection between the first program and the first protocol module.
In this embodiment of the present application, the first communication link of the first program may be disconnected and the communication connection between the first program and the first protocol module may be disconnected, so that the data of the communication interface file is not occupied by the first program, and then the first program is controlled to release the communication interface file, so that the communication interface file may be safely released.
In the embodiment of the application, after a first communication connection instruction about a first program is acquired, the first program is controlled to load a communication interface file, then a first interface function in the communication interface file is called, and the first program is connected with a first protocol module, so that other interface functions of the communication interface file are called based on the first protocol module, a first communication link of the first program is created, and networking communication of the first program is realized; then, if a call instruction of the first program for the target dynamic link library is detected, other interface functions in the communication interface file loaded in the process can be efficiently called, a second communication link of the target dynamic link library is created, and networking communication of the target dynamic link library is achieved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 3 is a schematic diagram of a networked communication device according to a second embodiment of the present application. The networked communication device is used for realizing networked communication of a diagnosis function module, wherein the diagnosis function module comprises a first program and a target dynamic link library, and only the part relevant to the embodiment of the application is shown for convenience of explanation.
As shown in fig. 3, the networked communication apparatus 3 may include:
a first loading unit 301, configured to control the first program to load a communication interface file if a first communication connection instruction about the first program is obtained, where the communication interface file includes a first interface function and other interface functions;
a first connection unit 302, configured to invoke the first interface function and connect the first program with a first protocol module, where the first interface function is associated with the first protocol module;
a first creating unit 303, configured to call, based on the first protocol module, other interface functions of the communication interface file, create a first communication link of the first program, and implement networking communication of the first program;
a second creating unit 304, configured to, if a call instruction of the first program for the target dynamic link library is detected, call other interface functions of the communication interface file, create a second communication link between the target dynamic link library and the terminal to be diagnosed, and implement networking communication of the target dynamic link library.
Optionally, the first program and the target dynamic link library belong to the same process.
Optionally, the diagnostic function module further includes a second program, where the second program and the first program belong to different processes, and the communication interface file further includes a second interface function;
the networked communication device 3 further includes:
the release unit is used for controlling the first program to release the communication interface file if a second communication connection instruction related to the second program is detected;
the second loading unit is used for controlling the second program to load the communication interface file;
the second connection unit is used for calling the second interface function and connecting the second program with a second protocol module, wherein the second interface function is associated with the second protocol module;
and the third creating unit is used for calling other interface functions of the communication interface file based on the second protocol module, creating a third communication link of the second program, and realizing networking communication of the second program.
Optionally, the first connection unit 302 includes:
the initialization subunit is used for calling the first interface function and executing module initialization operation on the first protocol module;
and the connection subunit is used for connecting the first program with the first protocol module after module initialization operation is executed on the first protocol module.
Optionally, the networked communication device 3 further includes:
a first disconnection unit configured to disconnect a first communication link of the first program;
and the second disconnection unit is used for disconnecting the communication connection between the first program and the first protocol module.
Optionally, the networked communication device 3 further includes:
and the data transmission unit is used for carrying out data transmission with the terminal to be diagnosed through the first communication link.
In the embodiment of the application, after a first communication connection instruction about a first program is acquired, the first program is controlled to load a communication interface file, then a first interface function in the communication interface file is called, and the first program is connected with a first protocol module, so that other interface functions of the communication interface file are called based on the first protocol module, a first communication link of the first program is created, and networking communication of the first program is realized; then, if a call instruction of the first program for the target dynamic link library is detected, other interface functions in the communication interface file loaded in the process can be efficiently called, a second communication link of the target dynamic link library is created, and networking communication of the target dynamic link library is achieved.
Fig. 4 is a schematic diagram of a terminal device provided in the third embodiment of the present application. As shown in fig. 4, the terminal device 4 of this embodiment includes: a processor 40, a memory 41 and a computer program 42 stored in said memory 41 and executable on said processor 40. The processor 40, when executing the computer program 42, implements the steps in the various networked communication method embodiments described above, such as steps 101 to 104 shown in fig. 1. Alternatively, the processor 40, when executing the computer program 42, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 301 to 304 shown in fig. 3.
Illustratively, the computer program 42 may be partitioned into one or more modules/units that are stored in the memory 41 and executed by the processor 40 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 42 in the terminal device 4. For example, the computer program 42 may be divided into a first loading unit, a first connecting unit, a first creating unit, and a second creating unit, and the specific functions of each unit are as follows:
the first loading unit is used for controlling the first program to load a communication interface file if a first communication connection instruction about the first program is acquired, wherein the communication interface file comprises a first interface function and other interface functions;
the first connection unit is used for calling the first interface function and connecting the first program with a first protocol module, wherein the first interface function is associated with the first protocol module;
the first creating unit is used for calling other interface functions of the communication interface file based on the first protocol module, creating a first communication link of the first program and realizing networking communication of the first program;
and the second creating unit is used for calling other interface functions of the communication interface file if a calling instruction of the first program for the target dynamic link library is detected, creating a second communication link between the target dynamic link library and the terminal to be diagnosed, and realizing networking communication of the target dynamic link library.
In the embodiment of the application, after a first communication connection instruction about a first program is acquired, the first program is controlled to load a communication interface file, then a first interface function in the communication interface file is called, and the first program is connected with a first protocol module, so that other interface functions of the communication interface file are called based on the first protocol module, a first communication link of the first program is created, and networking communication of the first program is realized; then, if a call instruction of the first program for the target dynamic link library is detected, other interface functions in the communication interface file loaded in the process can be efficiently called, a second communication link of the target dynamic link library is created, and networking communication of the target dynamic link library is achieved.
The terminal device 4 may be an Electronic Control Unit (ECU), a vehicle-mounted device, a desktop computer, a notebook, a palm computer, a server, or other computing devices. The terminal device may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of a terminal device 4 and does not constitute a limitation of terminal device 4 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the terminal device 4, such as a hard disk or a memory of the terminal device 4. The memory 41 may also be an external storage device of the terminal device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the terminal device 4. The memory 41 is used for storing the computer program and other programs and data required by the terminal device. The memory 41 may also be used to temporarily store data that has been output or is to be output.
It will be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional units and modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional units and modules as needed, that is, the internal structure of the networked communication device is divided into different functional units or modules to perform all or part of the above described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the foregoing method embodiments.
The embodiments of the present application provide a computer program product, which when running on a terminal device, enables the terminal device to implement the steps in the above method embodiments when executed.
The integrated module/unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer-readable medium may contain suitable additions or subtractions depending on the requirements of legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer-readable media may not include electrical carrier signals or telecommunication signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (8)

1. A networked communication method for implementing networked communication of a diagnostic function module, the diagnostic function module including a first program and a target dynamic link library, the networked communication method comprising:
if a first communication connection instruction about the first program is acquired, controlling the first program to load a communication interface file, wherein the communication interface file comprises a first interface function and other interface functions;
calling the first interface function, and connecting the first program with a first protocol module, wherein the first interface function is associated with the first protocol module;
based on the first protocol module, calling other interface functions of the communication interface file, creating a first communication link of the first program, and realizing networking communication of the first program;
if detecting the calling instruction of the first program aiming at the target dynamic link library, calling other interface functions of the communication interface file, creating a second communication link of the target dynamic link library, and realizing the networking communication of the target dynamic link library;
the diagnostic function module also comprises a second program, the second program and the first program belong to different processes, and the communication interface file also comprises a second interface function;
after calling other interface functions of the communication interface file based on the first protocol module, creating a first communication link of the first program, and implementing networking communication of the first program, the networking communication method further includes:
if a second communication connection instruction related to the second program is detected, controlling the first program to release the communication interface file;
controlling the second program to load the communication interface file;
calling the second interface function to connect the second program with a second protocol module, wherein the second interface function is associated with the second protocol module;
based on the second protocol module, calling other interface functions of the communication interface file, creating a third communication link of the second program, and realizing networking communication of the second program.
2. The networked communications method of claim 1 wherein said first program and said target dynamically linked library belong to the same process.
3. The networked communication method of claim 1, wherein said invoking a first interface function in said communication interface file to connect said first program with a first protocol module comprises:
calling the first interface function, and executing module initialization operation on the first protocol module;
connecting the first program with the first protocol module after performing module initialization operations on the first protocol module.
4. The networked communication method of claim 1, wherein before controlling said first program to release said communication interface file, further comprising:
disconnecting the first communication link of the first program;
and disconnecting the communication connection between the first program and the first protocol module.
5. The networked communication method according to any one of claims 1 to 4, comprising, after said creating the first communication link of the first program, implementing the networked communication of the first program:
and carrying out data transmission with the terminal to be diagnosed through the first communication link.
6. A networked communication apparatus for implementing networked communication of a diagnostic function module including a first program and a target dynamic link library, the networked communication apparatus comprising:
the first loading unit is used for controlling the first program to load a communication interface file if a first communication connection instruction about the first program is acquired, wherein the communication interface file comprises a first interface function and other interface functions;
the first connection unit is used for calling the first interface function and connecting the first program with a first protocol module, wherein the first interface function is associated with the first protocol module;
a first creating unit, configured to call other interface functions of the communication interface file based on the first protocol module, create a first communication link of the first program, and implement networking communication of the first program;
the second creating unit is used for calling other interface functions of the communication interface file and creating a second communication link of the target dynamic link library to realize the networking communication of the target dynamic link library if the calling instruction of the first program for the target dynamic link library is detected;
the diagnostic function module also comprises a second program, the second program and the first program belong to different processes, and the communication interface file also comprises a second interface function;
the networked communication device further comprises:
the release unit is used for controlling the first program to release the communication interface file if a second communication connection instruction related to the second program is detected;
the second loading unit is used for controlling the second program to load the communication interface file;
the second connection unit is used for calling the second interface function and connecting the second program with a second protocol module, wherein the second interface function is associated with the second protocol module;
and the third creating unit is used for calling other interface functions of the communication interface file based on the second protocol module, creating a third communication link of the second program, and realizing networking communication of the second program.
7. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the networked communication method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the networked communication method according to any one of claims 1 to 5.
CN202110334693.8A 2021-03-29 2021-03-29 Networking communication method, device, terminal equipment and storage medium Active CN113055250B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110334693.8A CN113055250B (en) 2021-03-29 2021-03-29 Networking communication method, device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110334693.8A CN113055250B (en) 2021-03-29 2021-03-29 Networking communication method, device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113055250A CN113055250A (en) 2021-06-29
CN113055250B true CN113055250B (en) 2022-06-17

Family

ID=76516047

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110334693.8A Active CN113055250B (en) 2021-03-29 2021-03-29 Networking communication method, device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113055250B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018103252A1 (en) * 2016-12-05 2018-06-14 深圳市元征科技股份有限公司 Secondary development method and apparatus for diagnostic device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SE527004C2 (en) * 2003-11-26 2005-12-06 Kvaser Consultant Ab Arrangement of distributed for simulation in distributed control systems eg in vehicles
DE102011076638A1 (en) * 2011-05-27 2012-11-29 Stephan Kaufmann A method of vehicle communication via a vehicle-implemented vehicle diagnostic system, interface module and vehicle diagnostic interface and diagnostic and control network for a plurality of vehicles
CN110011809A (en) * 2019-03-29 2019-07-12 深圳市元征科技股份有限公司 A kind of communication means and vehicle diagnostic equipment of vehicle diagnostic equipment
CN112099772A (en) * 2020-08-21 2020-12-18 深圳市元征科技股份有限公司 Communication interface packaging method, device, equipment and storage medium
CN112147983B (en) * 2020-09-27 2022-01-04 深圳市元征科技股份有限公司 Vehicle diagnosis method and device, electronic equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018103252A1 (en) * 2016-12-05 2018-06-14 深圳市元征科技股份有限公司 Secondary development method and apparatus for diagnostic device

Also Published As

Publication number Publication date
CN113055250A (en) 2021-06-29

Similar Documents

Publication Publication Date Title
CN111026367B (en) Micro-service arrangement method, device, terminal equipment and storage medium
CN109976787B (en) Application program upgrading method and device, terminal and computer readable storage medium
US11016769B1 (en) Method and apparatus for processing information
CN110007936B (en) Data processing method and device
CN110727566B (en) Method, device, medium and electronic equipment for acquiring process crash information
CN114465998A (en) Multi-device file transmission method and device, terminal device and readable storage medium
CN110765067A (en) Data processing method and device
CN111767056A (en) Source code compiling method, executable file running method and terminal equipment
EP3608774A1 (en) Method for programming and terminal device
CN113055250B (en) Networking communication method, device, terminal equipment and storage medium
CN110275701B (en) Data processing method, device, medium and computing equipment
CN112953994B (en) Data acquisition method, acquisition device, terminal equipment and readable storage medium
CN112799763A (en) Function management method, management device, terminal equipment and readable storage medium
CN110865848B (en) Component interception method and terminal equipment
CN112818336A (en) Data access method, data access device and computer readable storage medium
CN111538717B (en) Data processing method, device, electronic equipment and computer readable medium
CN112732547B (en) Service testing method and device, storage medium and electronic equipment
CN113805854A (en) Method, system and device for realizing Hook of application layer based on Linux system and storage medium
CN110764995B (en) Method, device, medium and electronic equipment for detecting file access abnormality
CN112073505A (en) Method for unloading on cloud server, control device and storage medium
CN114138363A (en) Program data calling method, device, equipment and storage medium
CN108629175B (en) Access control method and access control device of USB mass storage equipment
CN112015459A (en) Method and device for upgrading image file, terminal and readable storage medium
CN107274589B (en) Access method and system of financial self-service terminal hardware equipment and terminal equipment
CN114303131A (en) File processing method, file processing device and terminal equipment

Legal Events

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