A multi-module adaptation method and device based on 5G dial-up

Through the 5G terminal, the module hardware parameters are automatically detected and the dialing code is called using the module identifier to achieve isolation and decoupling between modules, solving the problem of high development and maintenance costs of 5G terminals and improving the flexibility and stability of module adaptation.

CN115802520BActive Publication Date: 2025-08-19ZHEJIANG JIECHUANG FANGZHOU DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211445671.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2025-08-19
Estimated Expiration
2042-11-18

AI Technical Summary

Technical Problem

The access development cost of 5G terminals and communication modules is high, module replacement is frequent and maintenance is difficult, and the module code coupling is high, resulting in an increase in development and maintenance costs.

Method used

Automatically detect module hardware parameters through 5G terminals, use module identifiers to call pre-deployed dial codes, realize isolation and decoupling between modules, use external annotations to mark module classes written in JAVA, and instantiate module classes at compile time to achieve automatic adaptation.

Benefits of technology

It reduces the cost of 5G terminal development and maintenance, improves the flexibility and stability of module adaptation, reduces the workload of code modification, and adapts to changes in the module market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115802520B_ABST
    Figure CN115802520B_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-module adaptation method and device based on 5G dialing, which relates to the field of Internet of Things technology. A specific implementation of the method includes: in response to accessing a 5G communication module, automatically detecting the hardware parameters of the accessed 5G communication module, and determining the identifier of the accessed 5G communication module from a plurality of preset 5G communication modules based on the detected hardware parameters; using the determined identifier of the accessed 5G communication module to call the 5G dialing code of the accessed 5G communication module pre-deployed locally to achieve connection between the 5G terminal and the accessed 5G communication module; locally pre-deploying 5G dialing codes of multiple 5G communication modules including the 5G dialing code of the accessed 5G communication module, and isolating and decoupling the 5G dialing codes of each 5G communication module from each other. This implementation enables 5G terminals to quickly and easily match different module models, and at the same time enables 5G terminal manufacturers to calmly face the ever-changing 5G module market.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet of Things technology, and in particular to a multi-module adaptation method and device based on 5G dial-up. Background Art

[0002] With the rapid development of the Internet, 5G (fifth-generation mobile communication technology) has gradually entered thousands of households. Internet connection through 5G dial-up may no longer be a problem. However, for each 5G user, access to 5G signals must be achieved through a 5G terminal. The 5G terminal is a bridge connecting network infrastructure and industry applications, and the 5G communication module is an important carrier for enabling terminal equipment to access the network.

[0003] However, due to the ever-changing current international situation, the development of 5G communication modules has been subject to various constraints and restrictions. At the same time, there are many types of 5G communication modules on the market. However, for terminal manufacturers, the access development cost based on 5G communication modules is extremely high. At the same time, due to changes in the module market and supply and demand issues, modules are prone to shortages or maintenance. Terminal manufacturers need to constantly replace module models and the development platform for module access for redevelopment. In addition, maintenance of the old platform cannot be stopped. As a result, not only does the user's development cost increase exponentially, but the subsequent maintenance also requires huge manpower and material resources.

[0004] In addition, because the interface information and calling methods of 5G modules are more complex, the coupling degree of each module code in the corresponding program is extremely high, and the modules are closely connected, which requires a large number of people to collaborate on development and testing, resulting in high costs. In addition, because the codes of each module are located in the same partition and are not isolated from each other, when the module code needs to be replaced or added, it needs to be modified in a hard-coded manner. At the same time, the previous module code is easily changed, making it impossible to recognize the previously used module again. In addition, due to the current instability of the 5G module market and unstable module production, companies need to constantly replace modules when developing 5G, which greatly increases software development and labor costs. Summary of the Invention

[0005] In view of this, an embodiment of the present invention provides a multi-module adaptation method and device based on 5G dial-up, which can enable 5G terminals to match different module models conveniently and quickly, and at the same time enable 5G terminal manufacturers to calmly face the ever-changing 5G module market.

[0006] To achieve the above objectives, according to one aspect of the present invention, a multi-module adaptation method based on 5G dial-up is provided.

[0007] The multi-module adaptation method based on 5G dialing in an embodiment of the present invention is used to achieve adaptation between a 5G terminal and a 5G communication module; the method is executed by a 5G terminal, including: in response to accessing a 5G communication module, automatically detecting the hardware parameters of the accessed 5G communication module, and determining the identifier of the accessed 5G communication module from a plurality of preset 5G communication modules based on the detected hardware parameters; using the determined identifier of the accessed 5G communication module to call the 5G dialing code of the accessed 5G communication module pre-deployed locally to achieve connection between the 5G terminal and the accessed 5G communication module; wherein, 5G dialing codes of multiple 5G communication modules including the 5G dialing code of the accessed 5G communication module are pre-deployed locally, and the 5G dialing codes of each 5G communication module are isolated and decoupled from each other.

[0008] Optionally, the 5G dialing code of any 5G communication module includes the execution code of the following actions: interface registration, AT port setting, packet data protocol PDP setting, 5G mode setting, frequency band setting, flight mode setting, network stationing, dialing, module static information acquisition, module dynamic information acquisition and sub-module monitoring.

[0009] Optionally, the module static information includes at least one of the following: integrated circuit card identification code ICCID, international mobile equipment identity code IMEI, international mobile subscriber identity code IMSI, and telephone number PHONE_NUMBER; the module dynamic information includes at least one of the following: identification password PIN, temperature TEMPERATURE, IP address, reverse address resolution protocol RARP, signal to interference plus noise ratio SINR and physical cell identifier PCIs.

[0010] Optionally, the 5G dialing code is written in JAVA; and the method further includes: in the 5G dialing code, using external annotations to mark multiple module classes; wherein the multiple module classes all implement module access interfaces, the number of the multiple module classes is equal to the number of the multiple 5G communication modules, the multiple module classes correspond one-to-one to the multiple 5G communication modules, and the 5G dialing code of each 5G communication module is contained in the corresponding module class; the external annotation has an annotation name and an annotation additional parameter, which is used to mark that the external annotations of any two module classes have the same annotation name and different annotation additional parameters; when compiling the 5G dialing code, each module class is instantiated locally as a module class instance, each module class instance is located by the annotation name, and the correspondence between the module class instance name of each module class and the annotation additional parameters in the external annotation marking the module class is stored locally.

[0011] Optionally, the method of using the determined identifier of the accessed 5G communication module to call the 5G dialing code of the accessed 5G communication module pre-deployed locally includes: determining the target annotation additional parameters corresponding to the identifier of the accessed 5G communication module through the pre-stored correspondence between the identifier of the 5G communication module and the annotation additional parameters; determining the target module class instance corresponding to the target annotation additional parameters based on the pre-stored correspondence between the annotation additional parameters and the module class instance name, and executing the 5G dialing code in the target module class instance.

[0012] Optionally, the method further includes: when a new 5G communication module needs to be added, creating a new module class corresponding to the new 5G communication module in the program, enabling the new module class to implement the module access interface, and forming an external annotation through the annotation name and the new annotation additional parameters to mark the new module class; when compiling the 5G dialing code, locally instantiating the new module class into a new module class instance, and storing the correspondence between the name of the new module class instance and the new annotation additional parameters locally; in response to determining the identifier of the new 5G communication module based on the detected hardware parameters, determining the new annotation additional parameters corresponding to the identifier of the new 5G communication module through the pre-stored correspondence between the identifier of the 5G communication module and the annotation additional parameters; determining the new module class instance corresponding to the new annotation additional parameters based on the pre-stored correspondence between the annotation additional parameters and the module class instance name, and executing the 5G dialing code in the new module class instance.

[0013] To achieve the above objectives, according to another aspect of the present invention, a multi-module adaptation device based on 5G dial-up is provided.

[0014] The multi-module adaptation device based on 5G dialing of an embodiment of the present invention may include: a detection unit and an adaptation unit. The detection unit is used to: in response to accessing a 5G communication module, automatically detect the hardware parameters of the accessed 5G communication module, and determine the identifier of the accessed 5G communication module from a plurality of preset 5G communication modules based on the detected hardware parameters. The adaptation unit is used to: use the determined identifier of the accessed 5G communication module to call the 5G dialing code of the accessed 5G communication module pre-deployed locally to achieve connection between the 5G terminal and the accessed 5G communication module; wherein, 5G dialing codes of multiple 5G communication modules including the 5G dialing code of the accessed 5G communication module are pre-deployed locally, and the 5G dialing codes of each 5G communication module are isolated and decoupled from each other.

[0015] Optionally, the 5G dialing code of any 5G communication module includes the execution code of the following actions: interface registration, AT port setting, packet data protocol PDP setting, 5G mode setting, frequency band setting, flight mode setting, network access, dialing, module static information acquisition, module dynamic information acquisition and sub-module monitoring; the module static information includes at least one of the following: integrated circuit card identification code ICCID, international mobile equipment identity code IMEI, international mobile subscriber identity code IMSI, and telephone number PHONE_NUMBER; the module dynamic information includes at least one of the following: identification password PIN, temperature TEMPERATURE, IP address, reverse address resolution protocol RARP, signal to interference plus noise ratio SINR and physical cell identifier PCIs.

[0016] Optionally, the 5G dial-up code is written in JAVA; and the adaptation unit can be further used to: in the 5G dial-up code, use external annotations to mark multiple module classes; wherein the multiple module classes all implement module access interfaces, the number of the multiple module classes is equal to the number of the multiple 5G communication modules, the multiple module classes correspond one-to-one to the multiple 5G communication modules, and the 5G dial-up code of each 5G communication module is included in the corresponding module class; the external annotation has an annotation name and an annotation additional parameter, which is used to mark that the external annotations of any two module classes have the same annotation name and different annotation additional parameters; when compiling the 5G dial-up code, each module class is instantiated locally as a module class instance, each module class instance is located by the annotation name, and the correspondence between the module class instance name of each module class and the annotation additional parameters in the external annotation marking the module class is stored locally.

[0017] Optionally, the adaptation unit can be further used to: determine the target annotation additional parameters corresponding to the identifier of the accessed 5G communication module through the pre-stored correspondence between the identifier of the 5G communication module and the annotation additional parameters; determine the target module class instance corresponding to the target annotation additional parameters based on the pre-stored correspondence between the annotation additional parameters and the module class instance name, and execute the 5G dialing code in the target module class instance.

[0018] Optionally, the adaptation unit can be further used to: when a new 5G communication module needs to be added, create a new module class corresponding to the new 5G communication module in the program, enable the new module class to implement the module access interface, and mark the new module class by forming an external annotation through the annotation name and the new annotation additional parameters; when compiling the 5G dialing code, locally instantiate the new module class into a new module class instance, and store the correspondence between the name of the new module class instance and the new annotation additional parameters locally; in response to determining the identifier of the new 5G communication module based on the detected hardware parameters, determine the new annotation additional parameters corresponding to the identifier of the new 5G communication module through the pre-stored correspondence between the identifier of the 5G communication module and the annotation additional parameters; determine the new module class instance corresponding to the new annotation additional parameters based on the pre-stored correspondence between the annotation additional parameters and the module class instance name, and execute the 5G dialing code in the new module class instance.

[0019] To achieve the above objective, according to another aspect of the present invention, an electronic device is provided.

[0020] An electronic device of the present invention includes: one or more processors; a storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the multi-module adaptation method based on 5G dialing provided by the present invention.

[0021] To achieve the above objective, according to another aspect of the present invention, a computer-readable storage medium is provided.

[0022] A computer-readable storage medium of the present invention stores a computer program thereon, and when the program is executed by a processor, the multi-module adaptation method based on 5G dialing provided by the present invention is implemented.

[0023] According to the technical solution of the present invention, the embodiments of the above invention have the following advantages or beneficial effects:

[0024] After a 5G terminal accesses a 5G communication module, it automatically detects the hardware parameters of the accessed 5G communication module and, based on the detected hardware parameters, determines the identifier of the accessed 5G communication module from a pre-set set of multiple 5G communication modules. The 5G terminal then uses the determined identifier of the accessed 5G communication module to call the pre-deployed 5G dialing code of the accessed 5G communication module locally to establish a connection between the 5G terminal and the accessed 5G communication module. The 5G dialing codes of multiple 5G communication modules, including the 5G dialing code of the accessed 5G communication module, are pre-deployed locally, and the 5G dialing codes of each 5G communication module are isolated and decoupled from each other. In this way, automatic module model detection and complete isolation and decoupling of each 5G communication module code block enable automatic adaptation between the 5G terminal and the 5G communication module, facilitating program development and subsequent testing and maintenance. When adding or replacing modules, since the code blocks of each module are completely isolated and decoupled, related operations will not affect other code, thereby reducing subsequent maintenance costs.

[0025] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings are provided for a better understanding of the present invention and are not intended to limit the present invention.

[0027] Figure 1 1 is a schematic diagram of the main steps of the multi-module adaptation method based on 5G dial-up in an embodiment of the present invention;

[0028] Figure 2 5G dialing code execution diagram of an embodiment of the present invention;

[0029] Figure 3 Schematic diagram of components of a multi-module adaptation device based on 5G dial-up in an embodiment of the present invention;

[0030] Figure 4 This is a schematic diagram of the structure of an electronic device used to implement the multi-module adaptation method based on 5G dialing in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0032] It should be pointed out that, in the absence of conflict, the embodiments of the present invention and the technical features therein may be combined with each other.

[0033] Figure 1 3. It is a schematic diagram of the main steps of the multi-module adaptation method based on 5G dial-up according to an embodiment of the present invention.

[0034] like Figure 1 As shown, the multi-module adaptation method based on 5G dialing in an embodiment of the present invention is executed by a 5G terminal and can be specifically performed according to the following steps:

[0035] Step S101: In response to accessing a 5G communication module, automatically detecting hardware parameters of the accessed 5G communication module, and determining an identifier of the accessed 5G communication module from a plurality of preset 5G communication modules based on the detected hardware parameters.

[0036] In an embodiment of the present invention, after the 5G terminal accesses a certain 5G communication module, it first automatically detects the hardware parameters of the accessed 5G communication module through an automatic detection program pre-deployed locally. The above hardware parameters, as characteristic data of the 5G communication module, can indicate the model (i.e., identification) of the corresponding 5G communication module, that is, locate the specific 5G communication module.

[0037] Step S102: Using the determined identifier of the accessed 5G communication module, the 5G dialing code of the accessed 5G communication module pre-deployed locally is called to achieve connection between the 5G terminal and the accessed 5G communication module.

[0038] In actual applications, the 5G terminal pre-deploys the 5G dialing codes of multiple 5G communication modules, including the 5G dialing code of the connected 5G communication module. The 5G dialing codes of each 5G communication module are isolated and decoupled from each other through the isolation mechanism described below. It can be understood that the 5G dialing code of each 5G communication module includes the execution code for the module dialing behavior and information acquisition behavior.

[0039] In one embodiment, the 5G dialing code for any 5G communication module includes execution code for the following actions: interface registration, AT port (i.e., ATTENTION port) configuration, Packet Data Protocol (PDP) configuration, 5G mode configuration, frequency band configuration, flight mode configuration, network access, dialing, module static information acquisition, module dynamic information acquisition, and submodule monitoring. Through these actions, the 5G dialing-based 5G terminal and the 5G communication module can be connected. For example, the module static information includes at least one of the following: an integrated circuit card identifier (ICCID), an international mobile equipment identity (IMEI), an international mobile subscriber identity (IMSI), and a phone number (PHONE_NUMBER); and the module dynamic information includes at least one of the following: an identification code (PIN), a temperature (TEMPERATURE), an IP address, a reverse address resolution protocol (RARP), a signal-to-interference-plus-noise ratio (SINR), and a physical cell identifier (PCIs).

[0040] In this step, the 5G terminal determines the 5G dialing code of the connected 5G communication module based on the 5G communication module identifier obtained in step S101 and executes the 5G dialing code, thereby establishing a connection between the 5G terminal and the connected 5G communication module. Through the above steps, the 5G software module automatically detects and distinguishes the type of connected module by enumerating hardware devices, and calls the corresponding module dialing behavior and information acquisition function according to the different module types. This can achieve a fast connection between the terminal and the communication module based on the isolation and decoupling mechanism between the communication module code blocks, and can also reduce the workload of code modification in the subsequent module replacement process, enhancing the stability and availability of the software system.

[0041] Figure 2 Schematic diagram of the execution of the 5G dialing code of the embodiment of the present invention, such as Figure 2 As shown in the figure, the 5G software module has designed a universal dialing process, including initialization, access mode configuration, access method configuration, flight mode configuration, working mode configuration, registration configuration, dialing configuration, and IPV4 / IPV6 configuration.

[0042] Specifically, see Figure 2After determining the identifier of the connected 5G communication module, the 5G terminal first registers the corresponding interface using the 5G interface registry. It then sets the AT port, PDP (access point APN parameters), 5G mode, frequency band, and flight mode, activates the network, and dials. The 5G terminal then obtains the module's static and dynamic information (recording the module's IP address) and monitors the submodule to determine whether network monitoring is enabled. It then checks the module's online status and determines whether the network interface or module hardware connection has been disconnected. Finally, it checks the log submodule to complete the dialing process and information acquisition. If the module is determined to be offline or offline, it returns to the previous steps and redials. If multiple redial attempts fail, the module can be restarted.

[0043] Isolation mechanism of 5G communication module code blocks and code block calling mechanism based on module identification.

[0044] In actual applications, the 5G dialing code for each 5G communication module can be written in JAVA. During the source code writing process, you can first use external annotations to mark multiple module classes. Annotations are special modifiers in JAVA, and external annotations refer to annotations written by relevant personnel in addition to the system's built-in annotations. Module classes are classes associated with 5G communication modules. The number of module classes is equal to the number of 5G communication modules. Each module class corresponds one-to-one with a 5G communication module, meaning that any 5G communication module has a unique corresponding module class. The 5G dialing code for each 5G communication module is written in the corresponding module class, that is, in the class body of the module class.

[0045] In particular, the above multiple module classes can implement the same module access interface through class and interface implementations, thereby having the same external 5G communication module access function. In addition, each of the above external annotations has an annotation name and annotation additional parameters. The annotation name is generally written after the annotation start character, and the annotation additional parameters can be written in the annotation body. For external annotations that mark any two module classes, the two external annotations have the same annotation name and different annotation additional parameters. The above identical annotation name enables subsequent query of module class instances, and the above different annotation additional parameters help to achieve isolation and independent calling of each module dialing code.

[0046] Subsequently, during the compilation process for the 5G dialing code, each module class can be instantiated into a module class instance. Searching for the same annotation name above can locate each module class instance. The correspondence between each module class instance name and the annotation additional parameters in the external annotation that identifies the module class is then stored locally. This achieves the mutual isolation and decoupling of the 5G dialing codes for each 5G communication module.

[0047] After obtaining the identifier of the accessed 5G communication module, the 5G terminal can determine the target annotation additional parameters corresponding to the identifier of the accessed 5G communication module through the pre-stored correspondence between the identifier of the 5G communication module and the annotation additional parameters. Thereafter, the 5G terminal determines the target module class instance corresponding to the target annotation additional parameters based on the pre-stored correspondence between the annotation additional parameters and the module class instance name. The above target module class instance contains the 5G dialing code of the accessed 5G communication module. Finally, the 5G dialing code in the target module class instance is executed to achieve docking between the 5G terminal and the 5G communication module.

[0048] Based on the above decoupling and isolation mechanism, when a new 5G communication module needs to be added, a new module class corresponding to the new 5G communication module is created in the program. The new module class implements the above module access interface and is marked with an external annotation using the above annotation name and the new annotation additional parameters. When compiling the 5G dialing code, the new module class is locally instantiated into a new module class instance, and the correspondence between the name of the new module class instance and the new annotation additional parameters is stored locally. After the 5G terminal determines the identity of the new 5G communication module based on detected hardware parameters (i.e., it detects that the connected module is identified as the new 5G communication module), the new annotation additional parameters corresponding to the new 5G communication module identity are determined based on the pre-stored correspondence between the 5G communication module identity and the annotation additional parameters. Furthermore, the new module class instance corresponding to the new annotation additional parameters is determined based on the pre-stored correspondence between the annotation additional parameters and the module class instance name. Finally, the 5G dialing code in the new module class instance is executed, thereby achieving connection between the 5G terminal and the new 5G communication module.

[0049] Through the above mechanism, the corresponding annotation additional parameters can be obtained based on the module identifier determined based on the hardware parameters of the communication module. The obtained annotation additional parameters are then used to obtain the required module class instance, thereby connecting the terminal and the communication module by executing the corresponding dialing code in the module class instance. The above method can achieve complete decoupling and isolation of each communication module code block. When adding a communication module, it is only necessary to create a new module class, set new annotation additional parameters, and create corresponding external annotations to mark the module class. During the program compilation phase, the system automatically instantiates each module class and records the correspondence between the module class and the annotation additional parameters. During the module adaptation phase, the system automatically addresses the corresponding module class instance based on the module identifier and executes the corresponding dialing code to complete the dialing. During this process, there is no need to change the original dialing code of other modules, thereby reducing the maintenance workload of the software system and improving the scalability of 5G module docking scenarios. [Wang 1]

[0050] In the technical solution of the embodiment of the present invention, docking with different communication modules is achieved through 5G dial-up, which can effectively cope with unstable market changes in modules, reduce the development cost of 5G terminal development for 5G module replacement, and reduce subsequent maintenance costs.

[0051] It should be noted that for the aforementioned method embodiments, for ease of description, they are expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited to the order of the actions described, and certain steps can actually be performed in other orders or simultaneously. In addition, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required to implement the present invention.

[0052] In order to better implement the above solutions of the embodiments of the present invention, relevant devices for implementing the above solutions are also provided below.

[0053] See also Figure 3 As shown, the multi-module adaptation device 300 based on 5G dial-up provided in an embodiment of the present invention may include: a detection unit 301 and an adaptation unit 302.

[0054] The detection unit 301 is used to automatically detect the hardware parameters of the accessed 5G communication module in response to the access of the 5G communication module, and determine the identifier of the accessed 5G communication module from a plurality of preset 5G communication modules based on the detected hardware parameters. The adaptation unit 302 is used to call the 5G dialing code of the accessed 5G communication module pre-deployed locally using the determined identifier of the accessed 5G communication module to achieve a connection between the 5G terminal and the accessed 5G communication module; wherein the 5G dialing codes of multiple 5G communication modules, including the 5G dialing code of the accessed 5G communication module, are pre-deployed locally, and the 5G dialing codes of each 5G communication module are isolated and decoupled from each other.

[0055] In an embodiment of the present invention, the 5G dialing code of any 5G communication module includes the execution code of the following actions: interface registration, AT port setting, packet data protocol PDP setting, 5G mode setting, frequency band setting, flight mode setting, network access, dialing, module static information acquisition, module dynamic information acquisition and sub-module monitoring; the module static information includes at least one of the following: integrated circuit card identification code ICCID, international mobile equipment identity code IMEI, international mobile subscriber identity code IMSI, and telephone number PHONE_NUMBER; the module dynamic information includes at least one of the following: identification password PIN, temperature TEMPERATURE, IP address, reverse address resolution protocol RARP, signal to interference plus noise ratio SINR and physical cell identifier PCIs.

[0056] In an optional technical solution, the 5G dialing code is written using JAVA; and the adaptation unit 302 can be further used to: use external annotations to mark multiple module classes in the 5G dialing code; wherein the multiple module classes all implement module access interfaces, the number of the multiple module classes is equal to the number of the multiple 5G communication modules, the multiple module classes correspond one-to-one to the multiple 5G communication modules, and the 5G dialing code of each 5G communication module is included in the corresponding module class; the external annotation has an annotation name and an annotation additional parameter, which is used to mark that the external annotations of any two module classes have the same annotation name and different annotation additional parameters; when compiling the 5G dialing code, each module class is instantiated locally as a module class instance, each module class instance is located by the annotation name, and the correspondence between the module class instance name of each module class and the annotation additional parameters in the external annotation marking the module class is stored locally.

[0057] Preferably, the adaptation unit 302 can be further used to: determine the target annotation additional parameters corresponding to the identifier of the accessed 5G communication module through the pre-stored correspondence between the identifier of the 5G communication module and the annotation additional parameters; determine the target module class instance corresponding to the target annotation additional parameters based on the pre-stored correspondence between the annotation additional parameters and the module class instance name, and execute the 5G dialing code in the target module class instance.

[0058] In addition, in an embodiment of the present invention, the adaptation unit 302 can be further used to: when a new 5G communication module needs to be added, create a new module class corresponding to the new 5G communication module in the program, enable the new module class to implement the module access interface, and mark the new module class by forming an external annotation through the annotation name and the new annotation additional parameters; when compiling the 5G dialing code, locally instantiate the new module class into a new module class instance, and store the correspondence between the name of the new module class instance and the new annotation additional parameters locally; in response to determining the identifier of the new 5G communication module based on the detected hardware parameters, determine the new annotation additional parameters corresponding to the identifier of the new 5G communication module through the pre-stored correspondence between the identifier of the 5G communication module and the annotation additional parameters; determine the new module class instance corresponding to the new annotation additional parameters based on the pre-stored correspondence between the annotation additional parameters and the module class instance name, and execute the 5G dialing code in the new module class instance.

[0059] According to the technical solution of the embodiment of the present invention, automatic docking with different communication modules is achieved through 5G dialing, and the code blocks of each communication module are isolated and decoupled from each other, making subsequent module changes convenient and fast. It can be widely used in the field of 5G digitalization, effectively reducing the enterprise module adaptation development costs, increasing product practicality and maintainability, and has broad application prospects.

[0060] The present invention also provides an electronic device. The electronic device in an embodiment of the present invention includes: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the multi-module adaptation method based on 5G dialing provided by the present invention.

[0061] Reference below Figure 4 , which shows a schematic structural diagram of a computer system 400 suitable for implementing an electronic device of an embodiment of the present invention. Figure 4 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.

[0062] like Figure 4 As shown, computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage unit 408 into a random access memory (RAM) 403. Various programs and data required for the operation of computer system 400 are also stored in RAM 403. CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to bus 404.

[0063] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 408 including devices such as a hard disk; and a communication section 409 including a network interface card such as a LAN card or a modem. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. Removable media 411, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 410 as needed, so that computer programs read from the removable media can be installed in the storage section 408 as needed.

[0064] In particular, according to embodiments disclosed herein, the processes described in the main step diagrams above can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for executing the methods shown in the main step diagrams. In the above embodiments, the computer program can be downloaded and installed from a network via the communication section 409 and / or installed from removable media 411. When the computer program is executed by the central processing unit 401, the above-described functions defined in the system of the present invention are performed.

[0065] It should be noted that the computer-readable medium described in the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical cable, RF, or any suitable combination thereof.

[0066] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0067] The units involved in the embodiments of the present invention may be implemented in software or hardware. The units described may also be provided in a processor. For example, they may be described as follows: a processor includes a detection unit and an adaptation unit. The names of these units do not, in some cases, limit the units themselves. For example, the detection unit may also be described as a "unit that provides an identification of a 5G communication module to be accessed to the adaptation unit."

[0068] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the device, the steps executed by the device include: in response to accessing a 5G communication module, automatically detecting the hardware parameters of the accessed 5G communication module, and determining the identifier of the accessed 5G communication module from a plurality of preset 5G communication modules based on the detected hardware parameters; using the determined identifier of the accessed 5G communication module to call the 5G dialing code of the accessed 5G communication module pre-deployed locally to achieve connection between the 5G terminal and the accessed 5G communication module; wherein, the 5G dialing codes of multiple 5G communication modules including the 5G dialing code of the accessed 5G communication module are pre-deployed locally, and the 5G dialing codes of each 5G communication module are isolated and decoupled from each other.

[0069] In the technical solution of the embodiment of the present invention, after the 5G terminal accesses the 5G communication module, the hardware parameters of the accessed 5G communication module are automatically detected, and the identifier of the accessed 5G communication module is determined from multiple preset 5G communication modules based on the detected hardware parameters. Thereafter, the 5G terminal uses the determined identifier of the accessed 5G communication module to call the 5G dialing code of the accessed 5G communication module pre-deployed locally to achieve the connection between the 5G terminal and the accessed 5G communication module; wherein, the 5G dialing codes of multiple 5G communication modules including the 5G dialing code of the accessed 5G communication module are pre-deployed locally, and the 5G dialing codes of each 5G communication module are isolated and decoupled from each other. In this way, through the automatic detection of the module model and the complete isolation and decoupling of the code blocks of each 5G communication module, automatic adaptation between the 5G terminal and the 5G communication module is achieved, which is beneficial to program development and subsequent testing and maintenance. When modules need to be added or replaced, since the code blocks of each module are completely isolated and decoupled, related operations will not affect other codes, thereby reducing subsequent maintenance costs.

[0070] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A multi-module adaptation method based on 5G dial-up, characterized in that: Used to achieve adaptation between 5G terminals and 5G communication modules; The method is executed by a 5G terminal and includes: In response to accessing a 5G communication module, automatically detecting hardware parameters of the accessed 5G communication module, and determining an identifier of the accessed 5G communication module from a plurality of preset 5G communication modules based on the detected hardware parameters; Using the determined identifier of the accessed 5G communication module, calling a 5G dialing code of the accessed 5G communication module pre-deployed locally to achieve a connection between the 5G terminal and the accessed 5G communication module; wherein, 5G dialing codes of multiple 5G communication modules including the 5G dialing code of the accessed 5G communication module are pre-deployed locally, and the 5G dialing codes of the various 5G communication modules are isolated and decoupled from each other; In the 5G dialing code, an external annotation is used to mark multiple module classes; wherein the multiple module classes all implement a module access interface, the number of the multiple module classes is equal to the number of the multiple 5G communication modules, the multiple module classes correspond one-to-one to the multiple 5G communication modules, and the 5G dialing code of each 5G communication module is included in the corresponding module class; the external annotation has an annotation name and annotation additional parameters, and is used to mark that the external annotations of any two module classes have the same annotation name and different annotation additional parameters; When compiling the 5G dialing code, each module class is locally instantiated into a module class instance, each module class instance is located by the annotation name, and a correspondence between the module class instance name of each module class and the annotation additional parameters in the external annotation that marks the module class is stored locally; The step of using the determined identifier of the accessed 5G communication module to call a 5G dialing code of the accessed 5G communication module pre-deployed locally includes: Determine the target annotation additional parameter corresponding to the identifier of the connected 5G communication module through a pre-stored correspondence between the identifier of the 5G communication module and the annotation additional parameter; The target module class instance corresponding to the target annotation additional parameter is determined according to a pre-stored correspondence between the annotation additional parameter and the module class instance name, and the 5G dialing code in the target module class instance is executed.

2. The method according to claim 1, characterized in that The 5G dial-up code of any 5G communication module includes the execution code of the following actions: interface registration, AT port setting, packet data protocol (PDP) setting, 5G mode setting, frequency band setting, flight mode setting, network access, dialing, module static information acquisition, module dynamic information acquisition, and submodule monitoring.

3. The method according to claim 2, characterized in that The module static information includes at least one of the following: an integrated circuit card identification code ICCID, an international mobile equipment identity code IMEI, an international mobile subscriber identity code IMSI, and a phone number PHONE_NUMBER; The module dynamic information includes at least one of the following: an identification password PIN, a temperature TEMPERATURE, an IP address, a reverse address resolution protocol RARP, a signal to interference plus noise ratio SINR, and a physical cell identifier PCIs.

4. The method according to claim 1, wherein The method further comprises: When a new 5G communication module needs to be added, a new module class corresponding to the new 5G communication module is created in the program, the new module class implements the module access interface, and an external annotation is formed by the annotation name and the new annotation additional parameters to mark the new module class; When compiling the 5G dialing code, locally instantiating the new module class into a new module class instance, and storing a correspondence between the name of the new module class instance and the new annotation additional parameter locally; In response to determining the identifier of the new 5G communication module according to the detected hardware parameters, determining the new annotation additional parameter corresponding to the identifier of the new 5G communication module by using a pre-stored correspondence between the identifier of the 5G communication module and the annotation additional parameter; The new module class instance corresponding to the new annotation additional parameter is determined according to a pre-stored correspondence between the annotation additional parameter and the module class instance name, and the 5G dialing code in the new module class instance is executed.

5. A multi-module adaptation device based on 5G dial-up, characterized in that: Used to achieve adaptation between a 5G terminal and a 5G communication module; the device is provided in the 5G terminal and includes: A detection unit, configured to: in response to accessing a 5G communication module, automatically detect hardware parameters of the accessed 5G communication module, and determine an identifier of the accessed 5G communication module from a plurality of preset 5G communication modules based on the detected hardware parameters; The adaptation unit is configured to: use the determined identifier of the accessed 5G communication module to call the 5G dialing code of the accessed 5G communication module pre-deployed locally to achieve a connection between the 5G terminal and the accessed 5G communication module; wherein the 5G dialing codes of multiple 5G communication modules including the 5G dialing code of the accessed 5G communication module are pre-deployed locally, and the 5G dialing codes of the various 5G communication modules are isolated and decoupled from each other; In the 5G dialing code, external annotations are used to mark multiple module classes; wherein the multiple module classes all implement module access interfaces, the number of the multiple module classes is equal to the number of the multiple 5G communication modules, the multiple module classes correspond one-to-one to the multiple 5G communication modules, and the 5G dialing code of each 5G communication module is included in the corresponding module class. The external annotation has an annotation name and annotation additional parameters, and is used to mark that the external annotations of any two module classes have the same annotation name and different annotation additional parameters. When the 5G dialing code is compiled, each module class is locally instantiated as a module class instance, each module class instance is located by the annotation name, and the correspondence between the module class instance name of each module class and the annotation additional parameters in the external annotation marking the module class is stored locally. The target annotation additional parameters corresponding to the identifier of the accessed 5G communication module are determined by the pre-stored correspondence between the identifier of the 5G communication module and the annotation additional parameters; the target module class instance corresponding to the target annotation additional parameters is determined based on the pre-stored correspondence between the annotation additional parameters and the module class instance name, and the 5G dialing code in the target module class instance is executed.

6. The device according to claim 5, characterized in that The 5G dial-up code of any 5G communication module includes the execution code of the following actions: interface registration, AT port setting, packet data protocol (PDP) setting, 5G mode setting, frequency band setting, flight mode setting, network station setting, dialing, module static information acquisition, module dynamic information acquisition, and submodule monitoring; The module static information includes at least one of the following: an integrated circuit card identification code ICCID, an international mobile equipment identity code IMEI, an international mobile subscriber identity code IMSI, and a phone number PHONE_NUMBER; The module dynamic information includes at least one of the following: an identification password PIN, a temperature TEMPERATURE, an IP address, a reverse address resolution protocol RARP, a signal to interference plus noise ratio SINR, and a physical cell identifier PCIs.

7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Unmanned vehicle communication method, device, storage medium and electronic equipment

    CN113692030A

  • 5G slice configuration system, method and device based on multi-module optimization and medium

    CN114205851A