CN115714720A - Embedded network framework and method for supporting multiple communication systems - Google Patents

Embedded network framework and method for supporting multiple communication systems Download PDF

Info

Publication number
CN115714720A
CN115714720A CN202110960925.0A CN202110960925A CN115714720A CN 115714720 A CN115714720 A CN 115714720A CN 202110960925 A CN202110960925 A CN 202110960925A CN 115714720 A CN115714720 A CN 115714720A
Authority
CN
China
Prior art keywords
function
module
target
interface
function 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.)
Pending
Application number
CN202110960925.0A
Other languages
Chinese (zh)
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.)
China Mobile Communications Group Co Ltd
China Mobile IoT Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile IoT 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 China Mobile Communications Group Co Ltd, China Mobile IoT Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110960925.0A priority Critical patent/CN115714720A/en
Publication of CN115714720A publication Critical patent/CN115714720A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The application provides an embedded network framework and a method for supporting multiple communication systems, wherein the embedded network comprises the following steps: the device comprises a function calling module, a function abstraction module and a network adaptation layer; the method comprises the steps that when a function calling command is received by a function calling module, a corresponding function calling interface is obtained, and the target communication system type of the function calling interface is determined according to a preset target communication system identifier; the function abstraction module is used for acquiring and packaging control logic related to the function requirement according to the type of the target communication system and the function requirement in the function calling command, and is associated with the function calling interface; and the network adaptation layer calls a function realization interface corresponding to the function calling interface according to the target equipment identifier in the user configuration table. The embedded network framework in the application configures the communication system and the equipment in advance in a static configuration mode, ensures the accuracy of the finally called function realization interface, and can support various network interfaces while reducing resource consumption.

Description

Embedded network framework and method for supporting multiple communication systems
Technical Field
The present application relates to the field of communications and the field of computers, and in particular, to an embedded network framework and a method for supporting multiple communication systems.
Background
With the advent of the world of everything interconnection, communication functions on embedded devices are gaining more and more importance. In the prior art, the design supporting multiple network interfaces occupies more resources, and a set of more complex logic processing layer needs to be designed to identify different network interfaces, which makes it more difficult to use embedded devices with less flash and Random Access Memory (RAM) resources. For the condition of a plurality of network interfaces, an abstract layer is required to be designed for distributing and processing the network interfaces, and higher requirements are put forward on resource environments. And all current schemes do not have a universal network debugging diagnosis tool, network faults cannot be effectively positioned, and the experience is poor in use.
Disclosure of Invention
The technical purpose to be achieved by the embodiments of the present application is to provide an embedded network framework and a method for supporting multiple communication systems thereof, so as to solve the problem that the current embedded device has fewer resources and cannot support a multiple network interface design which occupies more resources.
In order to solve the foregoing technical problem, an embodiment of the present application provides an embedded network framework, including: the device comprises a function calling module, a function abstraction module and a network adaptation layer;
the function calling module is connected with the application program in a butt joint mode and used for acquiring a function calling interface corresponding to the function calling command when the function calling command of the application program is received, and determining a target communication system type of the function calling interface according to a target communication system identifier in a pre-configured user configuration table;
the function abstract module is used for acquiring and packaging control logic related to the function requirement according to the target communication system type and the function requirement in the function call command, and is associated with the function call interface;
and the network adaptation layer is butted with the function abstraction module, is connected with the plurality of entity communication modules, and is used for calling the function realization interface corresponding to the function calling interface from the plurality of entity communication modules according to the target equipment identifier in the user configuration table.
Preferably, as described above for the embedded network framework, the network adaptation layer includes: an abstract application program interface, a core layer and a module adaptation layer;
the abstract application program interface is butted with the function abstract module and used for receiving a function calling interface issued by the function abstract module;
the core layer is provided with a plurality of function objects of the abstract communication module, and is used for acquiring a target abstract communication module corresponding to the function calling interface according to the target equipment identifier and a target function object corresponding to the function calling interface in the target abstract communication module;
the module adaptation layer is connected with the entity communication modules and is used for instantiating the target abstract communication module and the target function object to obtain and call the corresponding entity communication module and the function realization interface.
Specifically, in the embedded network framework, in the core layer, the abstract communication module and the functional object are correspondingly arranged in a linked list form.
Preferably, as described above, the function calling module includes: a socket layer and a network debugging command layer;
the socket layer is provided with an Application Programming Interface (API) consistent with a standard Berkeley socket BSD socket Interface statement, and is used for receiving a first function calling command about a socket, acquiring a first function calling Interface corresponding to the first function calling command, and determining a first target communication system type of the first function calling Interface according to a target communication system identifier;
the network debugging command layer is provided with a command package for carrying out network information query and fault location by an application program, and is used for receiving a second function calling command related to network debugging, acquiring a second function calling interface corresponding to the second function calling command, and determining a second target communication system type of the second function calling interface according to the target communication system identifier.
Further, the embedded network framework as described above further includes:
and the user configuration module is used for acquiring selection information of a user from a preset communication system list and a preset equipment list, determining a target communication system identifier and a target equipment identifier according to the selection information and generating a user configuration table.
Another preferred embodiment of the present application further provides a method for supporting multiple communication systems by an embedded network framework, which is applied to an embedded electronic device, where the embedded electronic device includes the embedded network framework as described above, the embedded network framework includes a function calling module, a function abstraction module, and a network adaptation layer, and the network adaptation layer is connected to multiple entity communication modules:
after receiving a function calling command of an application program, a function calling module acquires a function calling interface corresponding to the function calling command, and determines a target communication system type of the function calling interface according to a target communication system identifier in a pre-configured user configuration table;
the function abstract module acquires and packages control logic related to the function requirement according to the target communication system type and the function requirement in the function calling command, and is associated with the function calling interface;
and the network adaptation layer calls a function realization interface corresponding to the function calling interface from the plurality of entity communication modules according to the target equipment identifier in the user configuration table.
Preferably, the method for supporting multiple communication systems by the embedded network framework as described above includes, at the network adaptation layer: under the condition of abstract application program interface, core layer and module adapting layer, the network adapting layer calls function realizing interface corresponding to the function calling interface from multiple entity communication modules according to the target device identifier in the user configuration table, and the steps include:
the abstract application program interface receives a function calling interface issued by the function abstract module;
acquiring a target abstract communication module corresponding to the function calling interface and a target function object corresponding to the function calling interface in the target abstract module according to the target equipment identifier in the core layer;
and the module adaptation layer performs instantiation processing on the target abstract communication module and the target function object to obtain and call the corresponding entity communication module and the function realization interface.
Specifically, in the method for supporting multiple communication systems by using the embedded network framework, after the function call module receives the function call command of the application program, the method further includes:
determining to execute and acquire a function calling interface corresponding to the function calling command at the socket layer according to the type of the function calling command, and determining a target communication system type of the function calling interface according to a target communication system identifier in a pre-configured user configuration table;
or, determining to execute the steps of acquiring the function calling interface corresponding to the function calling command in the network debugging command layer according to the type of the function calling command, and determining the target communication system type of the function calling interface according to the target communication system identifier in the pre-configured user configuration table.
Preferably, in the case that the embedded network framework includes a user configuration module, the method further includes:
acquiring selection information of a user from a preset communication system list and a preset equipment list;
and determining the target communication system identifier and the target equipment identifier according to the selection information, and generating a user configuration table.
Still another preferred embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for a network framework to support multiple communication systems, as described above.
Compared with the prior art, the embedded network framework and the method for supporting multiple communication systems thereof provided by the embodiment of the application have at least the following beneficial effects:
the embedded network framework in this embodiment pre-configures the target communication system identifier and the target device identifier in a static configuration manner to ensure accuracy of a function implementation interface to be finally invoked, and reduces resource consumption caused when determining the function implementation interface in a dynamic configuration manner in the prior art, so that the embedded network framework is more suitable for embedded devices, and simultaneously can support multiple network interfaces, so that different network devices are managed through a uniform application program interface, and management of multiple network devices is facilitated.
Drawings
FIG. 1 is a schematic structural diagram of an embedded network framework according to the present application;
fig. 2 is a flowchart illustrating one example of a method for supporting multiple communication systems by an embedded network framework according to the present application;
fig. 3 is a second flowchart illustrating a method for supporting multiple communication systems by an embedded network framework according to the present application;
fig. 4 is a third schematic flowchart of a method for supporting multiple communication systems by the embedded network framework of the present application.
Detailed Description
To make the technical problems, technical solutions and advantages to be solved by the present application clearer, the following detailed description is made with reference to the accompanying drawings and specific embodiments. In the following description, specific details such as specific configurations and components are provided only to help the embodiments of the present application be fully understood. Accordingly, it will be apparent to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. In addition, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present application, it should be understood that the sequence numbers of the following processes do not mean the 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.
It should be understood that the term "and/or" herein is merely one type of association relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
In the embodiments provided herein, it should be understood that "B corresponding to a" means that B is associated with a from which B can be determined. It should also be understood that determining B from a does not mean determining B from a alone, but may be determined from a and/or other information.
Referring to fig. 1, a preferred embodiment of the present application provides an embedded network framework, including: the system comprises a function calling module 1, a function abstraction module 2 and a network adaptation layer 3;
the function calling module 1 is connected with the application program 4 in a butt joint mode, and is used for determining a function calling interface corresponding to the function calling command when receiving the function calling command of the application program 4, and determining a target communication system type of the function calling interface according to a target communication system identifier in a pre-configured user configuration table;
the function abstract module 2 is used for acquiring and packaging control logic related to the function requirement according to the target communication system type and the function requirement in the function calling command, and is associated with the function calling interface;
and a network adaptation layer 3, which is connected to the function abstraction module 2 and connected to the plurality of entity communication modules 5, and is configured to invoke, from the plurality of entity communication modules 5, a function implementation interface 501 corresponding to the function invocation interface according to the target device identifier in the user configuration table.
In a preferred embodiment of the present application, an embedded network architecture is provided, which is applicable to an embedded device such as a smart watch, and the embedded network architecture includes: the system comprises a function calling module 1, a function abstraction module 2 and a network adaptation layer 3, wherein the function calling module 1 corresponds to an application program 4, the network adaptation layer is connected with a plurality of entity communication modules 5, the function calling module 1 can receive a function calling command issued by the application program 4 on an upper layer, after the function calling command is received, a function calling interface corresponding to the function calling command can be obtained, and a target communication system type of the function calling interface is determined according to a target communication system identifier configured in advance by a user in a user configuration table, and if the target communication system identifier is not configured in advance by the user, a pre-stored default type is determined to be the target communication system identifier; the target communication system type can facilitate the subsequent calling of the function of the corresponding type; the target communication system type includes, but is not limited to, light Weight IP (LWIP), cellular technology cellular.
The function abstraction module 2 can receive a function calling interface and a function calling command transmitted by the function calling module 1, and further can acquire a control logic related to the function requirement according to the target communication system type determined by the function calling module 1 and the function requirement in the function calling command, encapsulate the control logic, and associate the control logic with the function calling interface, so that when the function calling interface is called, the corresponding control logic can be realized, and the realization of functions is ensured;
the network adaptation layer 3 is not only in butt joint with the function abstraction module but also in connection with the plurality of entity communication modules 5, can receive the function calling interface issued by the function abstraction module 2, and can determine the function realization interface 501 corresponding to the function calling interface from the plurality of entity communication modules 5 according to the target device identifier in the user configuration table, so that when the application program 4 on the upper layer executes a certain target function, the embedded network framework can be used for calling the function realization interface 501 of the target function in the entity communication module 5 to realize the function. The target device identifier includes but is not limited to an ethernet module, a cellular module, a WiFi module, etc., and can be increased according to a specific supported module model number, so that sustainable integration increase is realized.
In this process, the embedded network framework in this embodiment pre-configures the target communication system identifier and the target device identifier in a static configuration manner to ensure the accuracy of the finally-called function implementation interface 501, and reduces resource consumption caused by determining the function implementation interface 501 in a dynamic configuration manner in the prior art, so that the embedded network framework is more suitable for embedded devices, and can support multiple network interfaces, so that different network devices are managed through a unified application program 4 interface, and management of multiple network devices is facilitated.
Preferably, as described above for the embedded network framework, the network adaptation layer 3 includes: abstract application interface 301, core layer 302, and module adaptation layer 303;
the abstract application program interface 301 is connected to the function abstraction module 2, and is configured to receive a function call interface issued by the function abstraction module 2;
the core layer 302 is provided with a plurality of function objects of the abstract communication module, and is used for acquiring a target abstract communication module corresponding to the function calling interface according to the target device identifier and a target function object corresponding to the function calling interface in the target abstract communication module;
the module adaptation layer 303 is connected to the plurality of entity communication modules 5, and is configured to instantiate the target abstract communication module and the target function object to obtain and call the corresponding entity communication module 5 and the function implementation interface 501.
In another preferred embodiment of the present application, the network adaptation layer 3 in the above embodiment is further defined, wherein the network adaptation layer 3 includes: an abstract application program interface 301, a core layer 302 and a module adaptation layer 303, wherein the abstract application program interface 301 is an external interface of the network adaptation layer 3, is used for being in butt joint with the function abstraction module 2 and the like, and can receive a function call interface below the function abstraction module 2; the core layer 302 receives an abstract application program interface 301, wherein a plurality of abstract communication module function objects are arranged, the abstract communication module corresponds to the entity communication module 5, the function objects correspond to functions in the entity communication module 5, the core layer 302 can determine a required target abstract communication module according to a target device identifier, and further determine a target function object corresponding to the function call interface from the target abstract communication module; the module adaptation layer 303 is connected to the plurality of entity communication modules 5, and can instantiate the target abstract communication module and the target function object after the core layer 302 determines the target abstract communication module and the target function object, so as to obtain the corresponding entity communication module 5 and the function implementation interface 501, and call the function implementation interface 501 in the entity communication module 5, so as to implement the required function.
Optionally, after the controller bearing the embedded network framework calls the function implementation interface 501, in order to ensure that the different interfaces at the two ends perform accurate data and command transmission, an analyzer is further disposed in the network adaptation layer 3 to analyze and assemble the transmitted data and commands.
Specifically, in the embedded network framework described above, in the core layer 302, the abstract communication module and the function object are correspondingly arranged in a linked list form.
In a specific embodiment of the present application, the abstract communication module and the functional object in the core layer 302 are correspondingly arranged in a linked list manner, which is beneficial to reducing resource consumption and improving resource utilization.
Preferably, as described above for the embedded network framework, the function calling module 1 includes: a socket layer 101 and a network debug command layer 102;
the socket layer 101 is provided with an application program 4 interface API consistent with the standard BSD socket interface statement, and is used for receiving a first function call command related to a socket, acquiring a first function call interface corresponding to the first function call command, and determining a first target communication system type of the first function call interface according to a target communication system identifier;
the network debugging command layer 102 has a command encapsulation for the application program 4 to query network information and locate a fault, and is configured to receive a second function call command related to network debugging, obtain a second function call interface corresponding to the second function call command, and determine a second target communication system type of the second function call interface according to the target communication system identifier.
In a specific embodiment of the present application, the function calling module 1 includes a socket generation and network debug command layer 102, where the socket has an application program 4 interface consistent with the BSD socket interface declaration of the standard berkeley socket, so that applications transmitted through the standard berkeley socket can establish interaction and connection with the embedded network framework through the socket layer 101, which is beneficial to improving the portability of the embedded network framework and expanding the application range of the embedded network framework; through the socket layer 101, the function calling module 1 can receive a first function calling command about a socket, further obtain a first function calling interface corresponding to the first function calling command, and determine a first target communication system type of the first function calling interface according to a target communication system identifier; the function called by the first function call command includes, but is not limited to, an application for socket allocation, port binding, data transceiving, network connection, and the like.
The network debugging command layer 102 has the application program 4 for performing command encapsulation of network information query and fault location, so that an upper layer application or a user can obtain, by calling a corresponding network debugging command, a currently obtained IP address, a gateway address, and a Domain Name System (DNS for short), and can also provide corresponding network information for different network modules, for example, cell information, signal strength, and the like for a cellular module, thereby facilitating query of network states of network devices and fault location, and the like. By additionally arranging the network debugging command layer 102, the problems that the current embedded network framework lacks necessary network debugging means and diagnostic tools and further network faults cannot be effectively positioned can be solved.
In a specific implementation of the present application, when the application 4 calls a network connection function in the socket layer 101, the socket layer 101 obtains a corresponding connection interface according to a network connection function command, and determines that a target system type of the connection interface is a cellular type through a target communication system identifier, and then obtains a control logic related to connection according to the cellular type and a connection function requirement in the network connection function command at the function abstraction module 2, including: a connection function of a cellular mode, association with a file descriptor (fd) of a socket, conversion of an ip address, and the like, and associates the connection function with a connection interface to form a mo _ netcon _ connection interface, and then the network adaptation layer 3 maps the mo _ netcon _ connection interface to a corresponding function implementation interface 501 in the entity communication module 5 according to the device identifier, and then the network connection function can be performed by calling the function implementation interface 501.
In another specific implementation of the present application, when the application program 4 invokes a ping function in the network debug command layer 102 to test the network connectivity, the network debug command layer 102 obtains a corresponding ping function call interface according to the ping function command, and determines that the target system type of the ping function call interface is a cellular type through the target communication system identifier, and then obtains a related control logic in the function abstraction module 2 according to the cellular type and the connection function requirement in the ping function command, including: and connecting functions and the like in a cellular mode are associated with the ping function calling interface to form an mo _ ping interface, the network adaptation layer 3 maps the mo _ ping interface to the corresponding function realization interface 501 in the entity communication module 5 according to the equipment identifier, and the ping function test network accessibility can be performed by calling the function realization interface 501.
Further, the embedded network framework as described above further includes:
and the user configuration module is used for acquiring selection information of a user from a preset communication system list and a preset equipment list, determining a target communication system identifier and a target equipment identifier according to the selection information and generating a user configuration list.
In a specific embodiment of the present application, the embedded network framework further includes a user configuration module, and through the user configuration module, according to configuration operations of a user, selection information of the user from a preset communication system list and an equipment list is obtained, and according to the selection information, a target communication system identifier corresponding to a target communication system selected by the user and a target equipment identifier corresponding to a target equipment selected by the user are respectively determined from the communication system list and the equipment list, so as to generate a user configuration table, which facilitates subsequent selection operations according to the user configuration table. Optionally, a default type related to the communication system and the device is pre-stored in the user configuration table, and when the user does not perform a selection operation or does not determine the selected target communication system and the target device, normal use of the embedded network framework is ensured.
Referring to fig. 2, another preferred embodiment of the present application further provides a method for supporting multiple communication systems by an embedded network framework, which is applied to an embedded electronic device, where the embedded electronic device includes the embedded network framework as described above, the embedded network framework includes a function calling module, a function abstraction module, and a network adaptation layer, and the network adaptation layer is connected to multiple entity communication modules:
step S201, after receiving a function calling command of an application program, a function calling module acquires a function calling interface corresponding to the function calling command, and determines a target communication system type of the function calling interface according to a target communication system identifier in a pre-configured user configuration table;
step S202, a function abstract module obtains and packages control logic related to function requirements according to the type of a target communication system and the function requirements in a function calling command, and the control logic is associated with a function calling interface;
step S203, the network adaptation layer calls a function realization interface corresponding to the function calling interface from the plurality of entity communication modules according to the target equipment identifier in the user configuration table.
In a preferred embodiment of the present application, a method for supporting multiple communication systems by an embedded network framework is provided, where the embedded network framework includes: the network communication system comprises a function calling module, a function abstraction module and a network adaptation layer, wherein the function calling module corresponds to an application program, the network adaptation layer is connected with a plurality of entity communication modules, the function calling module can receive a function calling command issued by the application program on the upper layer, can acquire a function calling interface corresponding to the function calling command after receiving the function calling command, and determines a target communication system type of the function calling interface according to a target communication system identifier pre-configured by a user in a user configuration table, and if the target communication system identifier is not pre-configured by the user, the pre-stored default type is determined to be the target communication system identifier; the target communication system type can be convenient for subsequently calling functions of corresponding types; the target communication system type includes, but is not limited to, LWIP and cellular.
The function abstraction module can receive a function calling interface and a function calling command transmitted by the function calling module, and further can acquire control logic related to the function requirement according to the target communication system type determined by the function calling module and the function requirement in the function calling command, encapsulate the control logic, and associate the control logic with the function calling interface, so that when the function calling interface is called, the corresponding control logic can be realized, and the realization of functions is ensured;
the network adaptation layer is not only in butt joint with the function abstraction module but also connected with the plurality of entity communication modules, can receive the function calling interface issued by the function abstraction module, and can determine the function realization interface corresponding to the function calling interface from the plurality of entity communication modules according to the target equipment identifier in the user configuration table, so that when an application program of an upper layer executes a certain target function, the embedded network framework can be used for calling the function realization interface of the target function in the entity communication modules to realize the function. Wherein the target device identifier includes but is not limited to an ethernet module, a cellular module, a WiFi module, etc., and can be incremented according to a specific supported module model number, enabling sustainable integration increase.
In this process, the embedded network framework in this embodiment pre-configures the target communication system identifier and the target device identifier in a static configuration manner to ensure the accuracy of the finally called function implementation interface, and reduces resource consumption caused when determining the function implementation interface in a dynamic configuration manner in the prior art, so that the embedded network framework is more suitable for the embedded device, and simultaneously can support multiple network interfaces, so that different network devices are managed through a unified application program interface, and management of multiple network devices is facilitated.
Referring to fig. 3, preferably, the method for supporting multiple communication systems by the embedded network framework as described above includes, at the network adaptation layer: under the condition of abstract application program interface, core layer and module adapting layer, the network adapting layer calls function realizing interface corresponding to the function calling interface from multiple entity communication modules according to the target device identifier in the user configuration table, and the steps include:
step S301, an abstract application program interface receives a function calling interface issued by a function abstract module;
step S302, a target abstract communication module corresponding to the function calling interface and a target function object corresponding to the function calling interface in the target abstract module are obtained in the core layer according to the target device identifier;
step S303, the module adaptation layer performs instantiation processing on the target abstract communication module and the target function object to obtain and call the corresponding entity communication module and the function realization interface.
In another preferred embodiment of the present application, the network adaptation layer comprises: under the condition of the abstract application program interface, the core layer and the module adaptation layer, in the step of calling a function implementation interface corresponding to the function calling interface from a plurality of entity communication modules by the network adaptation layer according to a target device identifier in a user configuration table, receiving the function calling interface below the function abstract module by the abstract application program interface which is in butt joint with the function abstract module and the like; the core layer is connected with an abstract application program interface, wherein a plurality of abstract communication module functional objects are arranged, the abstract communication modules correspond to the entity communication modules, and the functional objects correspond to the functions in the entity communication modules, so that the core layer can determine the required target abstract communication modules according to the target equipment identifiers, and further determine the target functional objects corresponding to the function calling interfaces from the target abstract communication modules; and after the core layer determines the target abstract communication module and the target function object through the module adaptation layer connected with the plurality of entity communication modules, the target abstract communication module and the target function object are instantiated to obtain the corresponding entity communication module and the corresponding function realization interface, and the corresponding function realization interface in the entity communication module is called to realize the required function. Preferably, the abstract communication module and the functional object are correspondingly arranged in the core layer in a linked list mode, so that resource consumption is reduced, and resource utilization rate is improved.
Specifically, in the method for supporting multiple communication systems by using the embedded network framework, after the function call module receives the function call command of the application program, the method further includes:
determining a function calling interface according to the function calling command executed in the socket layer according to the type of the function calling command, and determining a target communication system type of the function calling interface according to a target communication system identifier in a pre-configured user configuration table;
or, according to the type of the function call command, determining to execute the step of acquiring the function call interface corresponding to the function call command in the network debugging command layer, and according to the target communication system identifier in the pre-configured user configuration table, determining the target communication system type of the function call interface.
In a specific embodiment of the present application, the function calling module may include a socket layer and a network debug command layer, where the socket has an application program interface consistent with the BSD socket interface statement of the standard berkeley socket, so that applications transmitted through the standard berkeley socket can establish interaction and connection with the embedded network framework through the socket layer, which is beneficial to improving the portability of the embedded network framework and expanding the application range of the embedded network framework; the network debugging command layer is provided with an application program for carrying out command encapsulation of network information query and fault location, so that an upper layer application or a user can obtain the currently obtained IP address, gateway address and Domain Name System (DNS) by calling a corresponding network debugging command, and can also provide corresponding network information for different network modules, for example, cell information, signal strength and the like are provided for a cellular module, thereby facilitating the query of the network state of network equipment, the fault location and the like.
And then after receiving the function call command, determining whether the function call command is suitable for a network debugging command layer or a socket layer according to the type of the function call command, further executing the steps of acquiring a function call interface corresponding to the function call command on the corresponding network debugging command layer or socket layer, and determining the target communication system type of the function call interface according to a target communication system identifier in a pre-configured user configuration table, thereby being beneficial to ensuring the function call command to be timely and correctly realized. And by additionally arranging a network debugging command layer, the problems that the current embedded network framework lacks necessary network debugging means and diagnostic tools and further network faults cannot be effectively positioned can be solved.
Referring to fig. 4, preferably, the method for supporting multiple communication systems by the network framework as described above, in case that the embedded network framework includes a user configuration module, the method further includes:
step S401, acquiring selection information of a user from a preset communication system list and a preset device list;
step S402, according to the selection information, determining the target communication system identifier and the target equipment identifier, and generating a user configuration table.
In a specific embodiment of the present application, in a case that the embedded network framework includes a user configuration module, through the user configuration module, according to a configuration operation of a user, selection information of the user from a preset communication system list and an equipment list may be obtained, and according to the selection information, a target communication system identifier corresponding to a target communication system selected by the user and a target equipment identifier corresponding to a target equipment selected by the user are respectively determined from the communication system list and the equipment list, so as to generate a user configuration table, which facilitates a subsequent selection operation according to the user configuration table. Optionally, the user configuration table pre-stores default types related to the communication system and the device, and when the user does not perform a selection operation or determines the selected target communication system and the target device, the normal use of the embedded network framework is ensured.
Still another preferred embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for supporting multiple communication systems by an embedded network framework as described above.
Further, the present application may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion.
The foregoing is a preferred embodiment of the present application, and it should be noted that, for those skilled in the art, several modifications and refinements can be made without departing from the principle described in the present application, and these modifications and refinements should be regarded as the protection scope of the present application.

Claims (10)

1. An embedded network framework, comprising: the device comprises a function calling module, a function abstraction module and a network adaptation layer;
the function calling module is connected with an application program in a butt joint mode and used for acquiring a function calling interface corresponding to a function calling command when the function calling command of the application program is received, and determining a target communication system type of the function calling interface according to a target communication system identifier in a pre-configured user configuration table;
the function abstract module is used for acquiring and packaging control logic related to the function requirement according to the target communication system type and the function requirement in the function calling command, and is associated with the function calling interface;
and the network adaptation layer is butted with the function abstraction module, is connected with the plurality of entity communication modules, and is used for calling a function realization interface corresponding to the function calling interface from the plurality of entity communication modules according to the target equipment identifier in the user configuration table.
2. The embedded network framework of claim 1, wherein the network adaptation layer comprises: an abstract application program interface, a core layer and a module adaptation layer;
the abstract application program interface is in butt joint with the function abstract module and is used for receiving the function calling interface issued by the function abstract module;
the core layer is provided with a plurality of function objects of abstract communication modules, and is used for acquiring a target abstract communication module corresponding to the function calling interface and a target function object corresponding to the function calling interface in the target abstract communication module according to the target equipment identifier;
the module adaptation layer is connected with the entity communication modules and is used for instantiating the target abstract communication module and the target function object to obtain and call the corresponding entity communication module and the function realization interface.
3. The embedded network framework of claim 2, wherein the abstract communication modules and the functional objects are arranged in a linked list manner in the core layer.
4. The embedded network framework of claim 1, wherein the function invocation module comprises: a socket layer and a network debugging command layer;
the socket layer is provided with an application program interface API consistent with a standard Berkeley socket BSD socket interface statement, and is used for receiving a first function calling command about a socket, acquiring a first function calling interface corresponding to the first function calling command, and determining a first target communication system type of the first function calling interface according to the target communication system identifier;
the network debugging command layer is provided with command encapsulation for the application program to query network information and locate faults, and is used for receiving a second function calling command related to network debugging, acquiring a second function calling interface corresponding to the second function calling command, and determining a second target communication system type of the second function calling interface according to the target communication system identifier.
5. The embedded network framework of claim 1, further comprising:
and the user configuration module is used for acquiring selection information of a user from a preset communication system list and a preset equipment list, determining the target communication system identifier and the target equipment identifier according to the selection information and generating the user configuration list.
6. A method for supporting multiple communication systems by an embedded network framework is characterized in that the method is applied to an embedded electronic device, the embedded electronic device comprises the embedded network framework of any one of claims 1 to 5, the embedded network framework comprises a function calling module, a function abstraction module and a network adaptation layer, and the network adaptation layer is connected with a plurality of entity communication modules:
the method comprises the steps that after a function calling command of an application program is received by a function calling module, a function calling interface corresponding to the function calling command is obtained, and the target communication system type of the function calling interface is determined according to a target communication system identifier in a pre-configured user configuration table;
the function abstract module acquires and packages control logic related to the function requirement according to the target communication system type and the function requirement in the function calling command, and is associated with the function calling interface;
and the network adaptation layer calls a function realization interface corresponding to the function calling interface from a plurality of entity communication modules according to the target equipment identifier in the user configuration table.
7. The method of claim 6, wherein the embedded network framework supports multiple communication systems, and comprises, at the network adaptation layer: under the condition of an abstract application program interface, a core layer and a module adaptation layer, the step of calling a function realization interface corresponding to the function calling interface from a plurality of entity communication modules by the network adaptation layer according to a target device identifier in the user configuration table comprises the following steps:
the abstract application program interface receives the function calling interface issued by the function abstract module;
acquiring a target abstract communication module corresponding to the function calling interface and a target function object corresponding to the function calling interface in the target abstract module according to the target equipment identifier in the core layer;
and the module adaptation layer performs instantiation processing on the target abstract communication module and the target function object to obtain and call the corresponding entity communication module and the function realization interface.
8. The method of claim 6, wherein after the function call module receives a function call command of an application, the method further comprises:
determining to execute the step of acquiring a function calling interface corresponding to the function calling command on a socket layer according to the type of the function calling command, and determining a target communication system type of the function calling interface according to a target communication system identifier in a pre-configured user configuration table;
or, determining to execute the step of acquiring the function calling interface corresponding to the function calling command in a network debugging command layer according to the type of the function calling command, and determining the target communication system type of the function calling interface according to a target communication system identifier in a pre-configured user configuration table.
9. The method of claim 6, wherein in a case that the network framework includes a user configuration module, the method further comprises:
acquiring selection information of a user from a preset communication system list and a preset equipment list;
and determining the target communication system identifier and the target equipment identifier according to the selection information, and generating the user configuration table.
10. A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of a method for an embedded network framework to support multiple communication systems according to any one of claims 6 to 9.
CN202110960925.0A 2021-08-20 2021-08-20 Embedded network framework and method for supporting multiple communication systems Pending CN115714720A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110960925.0A CN115714720A (en) 2021-08-20 2021-08-20 Embedded network framework and method for supporting multiple communication systems

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110960925.0A CN115714720A (en) 2021-08-20 2021-08-20 Embedded network framework and method for supporting multiple communication systems

Publications (1)

Publication Number Publication Date
CN115714720A true CN115714720A (en) 2023-02-24

Family

ID=85230212

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110960925.0A Pending CN115714720A (en) 2021-08-20 2021-08-20 Embedded network framework and method for supporting multiple communication systems

Country Status (1)

Country Link
CN (1) CN115714720A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716963A (en) * 2004-07-01 2006-01-04 阿尔卡特公司 Method for selecting among network interfaces, device with multiple network interfaces and application
CN102035657A (en) * 2009-10-02 2011-04-27 佳能株式会社 Communication apparatus having a plurality of network interfaces, method of communication by the communication apparatus
CN103281290A (en) * 2012-01-10 2013-09-04 株式会社理光 Network controller, and method
CN105052076A (en) * 2014-02-26 2015-11-11 华为技术有限公司 Interface management service entity, functional service entity and network element management method
CN109189718A (en) * 2018-09-04 2019-01-11 上海睿赛德电子科技有限公司 A kind of SOCKET Component that supporting multiple network interface and method
CN109525474A (en) * 2018-12-06 2019-03-26 连云港杰瑞深软科技有限公司 A kind of multiplex roles protocol-intelligent converter and conversion method based on Linux platform
WO2020147565A1 (en) * 2019-01-14 2020-07-23 华为技术有限公司 Method and device for calling application program interface

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716963A (en) * 2004-07-01 2006-01-04 阿尔卡特公司 Method for selecting among network interfaces, device with multiple network interfaces and application
CN102035657A (en) * 2009-10-02 2011-04-27 佳能株式会社 Communication apparatus having a plurality of network interfaces, method of communication by the communication apparatus
CN103281290A (en) * 2012-01-10 2013-09-04 株式会社理光 Network controller, and method
CN105052076A (en) * 2014-02-26 2015-11-11 华为技术有限公司 Interface management service entity, functional service entity and network element management method
CN109189718A (en) * 2018-09-04 2019-01-11 上海睿赛德电子科技有限公司 A kind of SOCKET Component that supporting multiple network interface and method
CN109525474A (en) * 2018-12-06 2019-03-26 连云港杰瑞深软科技有限公司 A kind of multiplex roles protocol-intelligent converter and conversion method based on Linux platform
WO2020147565A1 (en) * 2019-01-14 2020-07-23 华为技术有限公司 Method and device for calling application program interface

Similar Documents

Publication Publication Date Title
CN107704395B (en) Cloud platform automation test implementation method and system based on Openstack
CN109324912B (en) Communication method of application management software oriented to software communication system structure
US9923992B2 (en) Inter-process communication method based on application layer of android and basic application communication system
CN100459530C (en) Testing adopter and testing tool system and detecting method
CA2600503C (en) Method and system for executing a container-managed application on a processing device
CN113064780A (en) Automatic test system and method based on router product
CN111542064A (en) Container arrangement management system and arrangement method for wireless access network
CN103294455A (en) Software service implementation method and system, as well as Java platform
KR102274178B1 (en) Emulating test distributed application on server
CN109787864A (en) A kind of network automatic test approach, device, terminal and storage medium based on Netperf
CN101247292A (en) Test equipment and method based on universal test meter API
CN110308986A (en) The method of distributed training data communication on container cloud based on Optimized Operation
WO2017113848A1 (en) Testing method, testing platform and simulated testing device for test case
CN109743396A (en) component loading method of SCA software radio platform
CN114422350B (en) Public cloud container instance creation method
CN114244654B (en) URL forwarding method, device, equipment and computer storage medium
CN108810000B (en) Method and device for generating serialization and deserialization API
CN113691415B (en) Calling method, device and equipment of network tester and storage medium
CN108833005B (en) Optical network communication equipment and automatic test kit and method for networking service thereof
CN104570967B (en) Long-range control method and system based on android system
CN115714720A (en) Embedded network framework and method for supporting multiple communication systems
CN117041111A (en) Vehicle cloud function test method and device, electronic equipment and storage medium
CN113342456A (en) Connection method, device, equipment and storage medium
CN113064737B (en) Method for enabling components of software communication architecture to run in parallel on multi-core processor
CN114936166A (en) Method for constructing SAI Thrift automatic test framework

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