Communication methods, terminals, media and products
By adopting the basic version of public modules and alternative branch modules in the terminal, the problem of excessive terminal storage space is solved, and efficient software management and data processing is achieved.
Patent Information
- Application Number
- CN202510511493.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-04-23
AI Technical Summary
The terminal needs to store the software corresponding to multiple sub-operators, resulting in excessive storage space occupied, reducing data processing speed and increasing operation and maintenance complexity.
Using the basic version of the common module and multiple alternative branch modules, by determining that the current communication subnet is the target communication subnet, the corresponding target branch module is selected and loaded, and the communication of the terminal in the target communication subnet is realized.
Save terminal storage space, reduce software maintenance workload, and improve operation and maintenance efficiency and data processing speed.
Smart Images

Figure CN120050689B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a communication method, a terminal, a computer-readable medium, and a computer program product. Background Art
[0002] Currently, in order to support the business needs of multiple sub-operators under the main operator, software corresponding to multiple sub-operators is usually stored on the terminal side, so that the terminal can select one of the software to run when supporting the business processing of a certain sub-operator.
[0003] However, this will cause the terminal to need to store multiple sets of software, so that the terminal's storage space is occupied by a large amount of software, which reduces the terminal's data processing speed. The terminal also needs to maintain multiple software, which will also reduce operation and maintenance efficiency. Summary of the Invention
[0004] The present disclosure provides a communication method, a terminal, a computer-readable medium, and a computer program product.
[0005] In a first aspect, an embodiment of the present disclosure provides a communication method, which is applied to a terminal, wherein the terminal stores a basic version, the basic version includes a common module and multiple alternative branch modules, each alternative branch module corresponding to a communication subnet; the method includes: determining that the current communication subnet is the target communication subnet; selecting a target branch module corresponding to the target communication subnet from multiple alternative branch modules; and loading the target branch module.
[0006] In a second aspect, an embodiment of the present disclosure provides a terminal comprising: one or more processors; and a memory storing one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the communication methods in the embodiments of the present disclosure.
[0007] In a third aspect, an embodiment of the present disclosure provides a readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements any one of the communication methods in the embodiments of the present disclosure.
[0008] In a fourth aspect, an embodiment of the present disclosure provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements any one of the communication methods in the embodiments of the present disclosure.
[0009] The communication method in the embodiment of the present disclosure can save the storage space of the terminal by storing the basic version in the form of a common module and multiple alternative branch modules in the terminal, compared with the existing technology of storing multiple different software on the terminal side; after determining that the current communication subnet is the target communication subnet, the terminal selects the target branch module corresponding to the target communication subnet from multiple alternative branch modules, and loads the target branch module, so that the terminal can realize communication in the target communication subnet based on the basic version loaded with the target branch module. Compared with the existing technology, the terminal does not need to maintain multiple software, thereby improving operation and maintenance efficiency.
[0010] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings.
[0012] Figure 1 A flow chart of a communication method provided in an embodiment of the present disclosure.
[0013] Figure 2 A block diagram of a communication system provided in an embodiment of the present disclosure.
[0014] Figure 3 A block diagram of another communication system provided in an embodiment of the present disclosure.
[0015] Figure 4 A flowchart of another communication method provided by an embodiment of the present disclosure.
[0016] Figure 5 A block diagram of a terminal provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] To enable those skilled in the art to better understand the technical solutions of the present disclosure, exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0018] The accompanying drawings of the embodiments of the present disclosure are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the detailed embodiments, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing the detailed embodiments with reference to the accompanying drawings.
[0019] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0020] The terms used in this disclosure are only used to describe specific embodiments and are not intended to limit the disclosure. As used in this disclosure, the term "and / or" includes any and all combinations of one or more related enumerated items. As used in this disclosure, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. As used in this disclosure, the terms "comprising" and "made of" specify the presence of the features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof.
[0021] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meanings as those commonly understood by those skilled in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless expressly defined in this disclosure.
[0022] At present, for different types of communication subnets, in order to adapt to a wider range of business support, terminals usually have multiple different software. For example, based on the business needs of multiple sub-operators under a main operator, the software corresponding to each sub-operator is stored separately, so that the terminal can select one of the software to run when supporting the business processing of a certain sub-operator.
[0023] However, this will cause the terminal to need to store multiple sets of software, so that the terminal's storage space is occupied by a large amount of software, which reduces the terminal's data processing speed. The terminal also needs to maintain multiple software, which will also reduce operation and maintenance efficiency.
[0024] In order to solve the above problems, the present disclosure provides a communication method, a terminal, a computer-readable medium, and a computer program product.
[0025] In a first aspect, an embodiment of the present disclosure provides a communication method.
[0026] Figure 1A flow chart of a communication method provided by an embodiment of the present disclosure is provided. The communication method is applied to a terminal, which stores a basic version including a common module and multiple candidate branch modules, each of which corresponds to a communication subnet.
[0027] The common module is a module used to support basic operations of the terminal, or a common code in software that supports terminal operations.
[0028] In some embodiments, the terminal provided by the present disclosure may be a terminal used in any of the following application scenarios: a digital subscriber line (DSL) communication scenario, a fiber to the room (FTTR) communication scenario, a fiber to the home (FTTH) communication scenario, and a gigabit-capable PON (GPON) communication scenario.
[0029] like Figure 1 As shown, the communication method includes but is not limited to the following steps.
[0030] Step S101: Determine the current communication subnet as the target communication subnet.
[0031] The current communication subnet is the communication subnet that the terminal has currently entered. If the communication subnet that the terminal was previously in is not the target communication subnet, the terminal needs to adjust its running software to support the communication services performed by the terminal in the target communication subnet.
[0032] For example, the software currently running on the terminal supports the first communication subnet. When the terminal enters the second communication subnet (ie, the target communication subnet), the terminal needs to switch the software supporting the first communication subnet to the software supporting the target communication subnet.
[0033] Step S102: Select a target branch module corresponding to the target communication subnet from a plurality of candidate branch modules.
[0034] The target branch module is a module that can support the terminal to communicate in the target communication subnet.
[0035] Each candidate branch module corresponds to a communication subnet. By combining any candidate branch module with the common module, the obtained version can support the terminal to communicate in any one of the multiple communication subnets.
[0036] In some embodiments, each candidate branch module can be implemented in the form of different configuration files or in the form of code branches.
[0037] Step S103: load the target branch module.
[0038] Among them, by selecting to load the target branch module in the basic version, the obtained version can support the communication of the terminal in the target communication subnet.
[0039] The communication method in the embodiment of the present disclosure can save the storage space of the terminal by storing the basic version in the form of a common module and multiple alternative branch modules in the terminal, compared with the existing technology of storing multiple different software on the terminal side; after determining that the current communication subnet is the target communication subnet, the terminal selects the target branch module corresponding to the target communication subnet from multiple alternative branch modules, and loads the target branch module, so that the terminal can realize communication in the target communication subnet based on the basic version loaded with the target branch module. Compared with the existing technology, the terminal does not need to maintain multiple software, thereby improving operation and maintenance efficiency.
[0040] In some embodiments, before determining the current communication subnet as the target communication subnet in step S101 , the method further includes: loading a common module.
[0041] Common modules are modules used to support basic terminal operations, or are common code within the software that supports terminal operations. For example, common modules include basic logic processing modules such as system initialization and power-on processing, or they may be common code within the software versions corresponding to the various alternative communication subnets supported by the terminal.
[0042] In order to ensure the normal operation of the terminal, as a method of an embodiment of the present disclosure, the terminal needs to first load the common module and then load the target branch module to realize communication support for the target communication subnet, thereby realizing a version formed by the basic version based on the common module and the target branch module, supporting the terminal to communicate in the target communication subnet.
[0043] In some embodiments, determining the current communication subnet as the target communication subnet in step S101 can be implemented as follows: in response to the received configuration message, obtaining the service identifier carried in the configuration message; and determining the current communication subnet as the target communication subnet based on the service identifier.
[0044] The service identifier is used to identify the corresponding communication subnet.
[0045] When the network-side device configures a terminal, each configuration only opens a service channel corresponding to one communication subnet. In other words, a configuration message carries the service identifier for only one communication subnet. If the service identifier carried in the received configuration message matches the service identifier for the target communication subnet, the current communication subnet is determined to be the target communication subnet.
[0046] As one method of an embodiment of the present disclosure, a configuration message is sent to the terminal by a network-side device, so that the terminal can clearly identify its current communication network as a target communication subnet, so that the terminal can select a target branch module corresponding to the target communication subnet from multiple alternative branch modules; thereby supporting the terminal to communicate in the target communication subnet based on the version determined by the target branch module and the common module.
[0047] In some embodiments, the configuration message includes an idle field defined by a preset communication protocol, and the service identifier is stored in the idle field.
[0048] The preset communication protocol includes a communication protocol for short-range communication between the network-side device and the terminal. For example, if the short-range communication supported between the network-side device and the terminal is mobile hotspot (WiFi) communication, the preset communication protocol is a WiFi communication protocol (e.g., the 802.11 ax standard protocol). If the short-range communication supported between the network-side device and the terminal is Bluetooth communication, the preset communication protocol is a Bluetooth communication protocol.
[0049] The service identifier stored in the idle field can be any of the following fields: Option 43 in Dynamic Host Configuration Protocol (DHCP), Option 15 in DHCP, Option 60 in DHCP, or a custom field in Point-to-Point Protocol Over Ethernet (PPPoE).
[0050] By storing the service identifier in the free field defined by the above-mentioned preset communication protocol, there is no need to reconstruct the communication message. The service identifier can be carried through the original preset communication protocol, which reduces the number of communication messages. At the same time, it can also enable the terminal to quickly know the service identifier corresponding to the target communication subnet it needs to support, which is conducive to the terminal to quickly switch versions, support the normal communication of the terminal in the target communication subnet, and improve communication efficiency.
[0051] In some embodiments, determining the current communication subnet as the target communication subnet based on the service identifier includes: in response to the service identifier including the first type target virtual local area network channel identifier, determining the current communication subnet corresponding to the first type target virtual local area network channel identifier as the target communication subnet.
[0052] Each first-type target virtual local area network channel identifier corresponds to a candidate communication subnet. The first-type target virtual local area network channel identifier is an identifier of a terminal in a target virtual local area network (VLAN) channel configured by a network-side device.
[0053] By querying the correspondence table between the pre-planned VLAN channel identifiers and various alternative communication subnets, it can be known that the first-class target VLAN channel identifier carried in the current configuration message corresponds to only one alternative communication subnet. Therefore, it is only necessary to extract the first-class target VLAN channel identifier to obtain the service identifier, and then determine the corresponding communication subnet as the target communication subnet based on the first-class target VLAN channel identifier.
[0054] As one method of an embodiment of the present disclosure, by receiving a configuration message and confirming that the first-class target virtual local area network channel identifier carried in the configuration message corresponds to only one alternative communication subnet, the corresponding communication subnet can be directly determined as the target communication subnet based on the first-class target virtual local area network channel identifier, thereby improving the identification speed of the target communication subnet.
[0055] In some embodiments, determining the current communication subnet as the target communication subnet based on the service identifier includes: in response to the service identifier including the second-class target virtual local area network channel identifier and the device parameters of the alternative communication subnet, determining the target communication subnet based on the second-class target virtual local area network channel identifier and the device parameters of the alternative communication subnet.
[0056] Each second-type target virtual local area network channel identifier corresponds to at least two candidate communication subnets, and a combination of each second-type target virtual local area network channel identifier and a device parameter of each candidate communication subnet corresponds to one candidate communication subnet.
[0057] By querying the correspondence table between the pre-planned VLAN channel identifiers and each alternative communication subnet, it can be known that the second-class target VLAN channel identifier carried in the current configuration message corresponds to at least two alternative communication subnets, and the device parameters of each alternative communication subnet are different; therefore, the second-class target virtual LAN channel identifier and the device parameters of the alternative communication subnet can be used together as a service identifier, and then the corresponding target communication subnet is determined based on the service identifier to speed up the identification of the target communication subnet.
[0058] For example, by querying the correspondence table between the pre-planned VLAN channel identifiers and the various alternative communication subnets, it can be determined that the second-class target VLAN channel identifier is 300, which can correspond to the alternative communication subnet C or the alternative communication subnet D; when the second-class target virtual LAN channel identifier carried in the configuration message received by the terminal is 300, and the device parameters of the alternative communication subnet carried are the network address information of the alternative communication subnet C, it can be determined that the target communication subnet is the alternative communication subnet C.
[0059] Using the above method to determine the service identifier and determining the target communication subnet based on the service identifier can more accurately confirm different alternative communication subnets, thereby determining which alternative communication subnet the terminal is currently in based on a more accurate service identifier, thereby improving the accuracy of determining the target communication subnet.
[0060] In some embodiments, the device parameters of the candidate communication subnet include at least one of the following: a network address identifier of a network-side device, type information of a terminal, and mask information of a communication subnet where the terminal is located.
[0061] In some embodiments, each alternative branch module includes alternative service parameters and / or alternative service processing logic.
[0062] Among them, the alternative service parameters are parameters that characterize the alternative branch module for processing service data in its corresponding alternative communication subnet; the alternative service processing logic is the logic used by the alternative branch module to process service data in the alternative communication subnet.
[0063] For example, the alternative service parameters include parameters such as the subnet identifier of the alternative communication subnet and the service types that the alternative communication subnet can support. These alternative service parameters can be updated through configuration files.
[0064] For example, the alternative business processing logic can be implemented using alternative code branches. When it is determined that an alternative branch module is needed to support the business data processing in the corresponding alternative communication subnet, the business data of the alternative communication subnet can be processed by selecting the alternative code branch corresponding to the identifier of the alternative communication subnet in the basic version.
[0065] By characterizing the processing method of business data in the alternative communication subnet based on alternative business parameters and / or alternative business processing logic, the business data in the alternative communication subnet can be processed more accurately, thereby improving the accuracy of business data processing. At the same time, the terminal no longer needs to store specific software corresponding to the alternative communication subnet. It only needs to filter and load the alternative branch modules based on the basic version to obtain the version that can support the business data processing of the alternative communication subnet, thereby reducing the proportion of storage space occupied by the terminal and improving the terminal's processing speed of business data.
[0066] In some embodiments, before executing step S103 of loading the target branch module, the method further includes: unloading the history branch module.
[0067] Among them, the historical branch module is the branch module used at the moment before entering the current communication subnet.
[0068] For example, assume that the communication subnet where the terminal is located at the first moment is the first communication subnet, and the communication subnet where the terminal is located at the second moment is the second communication subnet, and the first moment is the moment before the second moment; then when the terminal switches from the first communication subnet to the second communication subnet, it needs to uninstall the historical branch module corresponding to the first communication subnet in the version used at the first moment, and then load the target branch module corresponding to the second communication subnet, so as to obtain a new version, which can support the business processing of the terminal in the second communication subnet (i.e., the target communication subnet).
[0069] It should be noted that when the terminal is set up at the factory, a default branch module will be set by default in the basic version stored in it. The default version generated by the default branch module and the common module can support the terminal to process corresponding business data in the communication subnet corresponding to the default branch module.
[0070] When the terminal enters an actual communication subnet (such as the first communication subnet) for communication for the first time, its corresponding default branch module can also be regarded as a historical branch module; at this time, the terminal needs to uninstall the default branch module and load the target branch module corresponding to the first communication subnet, so that the loaded version corresponds to the first communication subnet and supports the terminal to perform corresponding business data processing in the first communication subnet.
[0071] By adopting the above-mentioned method of unloading the historical branch module and loading the target branch module, the terminal can replace the software of different communication subnets. Compared with the method in which the terminal needs to store software codes and versions corresponding to multiple alternative communication subnets in the prior art, it can obtain the version corresponding to the target communication subnet more quickly and conveniently, and support the terminal to process the corresponding business data in the target communication subnet, which not only reduces the proportion of storage space occupied by the terminal, but also improves the terminal's processing efficiency of business data in the target communication subnet.
[0072] In some embodiments, the terminal in the present disclosure may be any one of the following devices: a router, a gateway device, or an ONU in an optical network.
[0073] For example, the terminal is an optical network unit ONU in the optical network; the network address identifier of the network-side device is the network address identifier of the target optical line terminal OLT connected to the ONU.
[0074] For example, Figure 2 This is a block diagram of a communication system provided by an embodiment of the present disclosure. Figure 2 As shown, the communication system includes an optical line terminal (OLT) 201 and an optical network unit (ONU) 202 that are communicatively connected.
[0075] The ONU 202 stores a basic version to support communication in the communication subnet corresponding to the target OLT (eg, OLT 201). The basic version includes a common module and multiple candidate branch modules, each of which corresponds to a communication subnet.
[0076] Figure 3 This is a block diagram of another communication system provided by an embodiment of the present disclosure. Figure 3 As shown, a broadband remote access server (BRAS) 310 is connected to an optical line terminal OLT 320 , and the optical line terminal OLT 320 is connected to an optical network unit ONU 330 .
[0077] Among them, ONU330 includes: an ONU management and control interface (OMCI) module 331, a network connection module 332, and multiple service sub-modules (such as a first service sub-module 3331, a second service sub-module 3332, ..., a kth service sub-module 333k, etc., where k is an integer greater than or equal to 1).
[0078] The BRAS 310 is used to allocate corresponding Internet Protocol (IP) addresses to the wide area network (WAN) connections corresponding to multiple primary operators, so that different primary operators can be distinguished by using different IP addresses.
[0079] The OLT 320 is used to configure the VLAN channel of the WAN connection to which the ONU 330 belongs through an OMCI message.
[0080] The OMCI message may be a configuration message, which carries a target virtual local area network identifier of a target primary operator corresponding to the OLT 320 and / or a network address identifier of a network-side device.
[0081] In some embodiments, BRAS 310 may use the value of DHCP option 43 (or the value of DHCP option 15, or the value of DHCP option 60, or the value corresponding to the custom field in DHCP, or the value corresponding to the custom field in PPOE, etc.) to represent the network address identifier of the network side device to distinguish the identifier of the target sub-operator under the target main operator.
[0082] The OMCI module 331 is configured to receive and parse the configuration message sent by the OLT 320 to obtain the target virtual local area network channel identifier configured by the OLT 320; and send the target virtual local area network channel identifier to the network connection module 332, so that the network connection module 332 selects a business submodule corresponding to the target virtual local area network channel identifier from multiple business submodules to process business data based on the target virtual local area network channel identifier.
[0083] The network connection module 332 is used to select a target business submodule (such as the second business submodule 3332) from multiple business submodules based on the received target virtual local area network channel identifier and / or the network address identifier of the network side device, and specify the target business submodule to execute the target business of the target sub-operator under the target main operator.
[0084] The target service submodule in ONU 330 processes service data in the corresponding target communication subnet (ie, the communication subnet corresponding to the target sub-operator) based on its corresponding target virtual local area network channel identifier.
[0085] In some embodiments, when the target business sub-module is selected as the second business sub-module 3332, the target branch module corresponding to the identifier of the target sub-operator corresponding to the second business sub-module 3332 can be loaded on the basis of the common module in the basic version to obtain a version for processing the business data of the target sub-operator, so that each module in ONU330 can cooperate with the second business sub-module 3332 based on the business processing logic of this version to perform corresponding business data processing.
[0086] By storing the basic version in a common module and multiple alternative branch modules in an ONU, compared with the existing method of storing multiple different software codes and versions on the terminal side, the storage space of the ONU can be saved; in addition, a high degree of software sharing can be achieved, the workload of software development and maintenance can be reduced, and the scalability and flexibility of the terminal can be improved.
[0087] In some embodiments, each sub-operator is an operator that leases the basic network resources provided by the main operator, so that each sub-operator can process corresponding communication services based on the basic network resources provided by the main operator. For example, a sub-operator sets different communication packages to meet the service usage needs of different end users.
[0088] In some embodiments, the main operator is an operator that can provide comprehensive network services (eg, including broadband services, mobile network access services, etc.) to each sub-operator.
[0089] In some embodiments, the number of service sub-modules in the ONU 330 is four, corresponding to supporting service processing of four different sub-operators (eg, sub-operator A, sub-operator B, sub-operator C, and sub-operator D).
[0090] During the network planning process, BRAS 310 will set the preset virtual LAN channel identifier for sub-operator A to 100, the preset virtual LAN channel identifier for sub-operator B to 200, and the preset virtual LAN channel identifier for sub-operators C and D to 300. The network address of the OLT corresponding to sub-operator C is C, and the network address of the OLT corresponding to sub-operator D is D.
[0091] In some embodiments, the preset virtual local area network channel is a communication channel corresponding to each virtual local area network (VLAN) included in a wide area network (WAN).
[0092] The network addresses of different OLTs are represented by the values of DHCP option 43 (or DHCP option 15, or DHCP option 60, or the values corresponding to the custom fields in DHCP, or the values corresponding to the custom fields in PPOE, etc.) carried in the configuration message.
[0093] Figure 4 A flow chart of another communication method provided by an embodiment of the present disclosure. Figure 4 As shown, the communication method includes but is not limited to the following steps.
[0094] Step S401 : When the ONU 330 requests to access the OLT 320 , the OLT 320 configures a corresponding network channel for the ONU 330 according to the attribute information of the ONU 330 .
[0095] The attribute information of the ONU 330 includes the type information of the ONU, the type information of the sub-operators that the ONU can support, etc. When the OLT 320 configures the network channel for the ONU 330, one configuration only corresponds to opening a service channel corresponding to one communication subnet.
[0096] It should be noted that when the ONU 330 is powered on and initialized, it is necessary to load the common modules in the basic version and the default branch modules of the default configuration to achieve software support for the ONU 330.
[0097] The default branch module is a module used to support the ONU 330 to communicate in its default communication subnet.
[0098] In step S402, the ONU 330 responds to the configuration message sent by the OLT 320 by parsing the configuration message and obtaining the service identifier carried in the configuration message.
[0099] The service identifier indicates which candidate communication subnet the ONU 330 is currently located in. Thus, the service identifier determines which candidate branch module in the basic version the ONU 330 uses to support communication in the communication subnet the ONU 330 is currently located in.
[0100] In some embodiments, the service identifier includes a first-type target virtual local area network channel identifier, and each first-type target virtual local area network channel identifier corresponds to an alternative communication subnet.
[0101] In some embodiments, the service identifier includes a second-class target virtual local area network channel identifier and device parameters of an alternative communication subnet; wherein, each second-class target virtual local area network channel identifier corresponds to at least two alternative communication subnets, and the combination of each second-class target virtual local area network channel identifier and the device parameters of each alternative communication subnet corresponds to one alternative communication subnet.
[0102] In some embodiments, the OMCI module 331 in the ONU 330 is used to receive the configuration message sent by the OLT 320, parse the configuration message, obtain the service identifier carried in the configuration message, and then send the service identifier to the network connection module 332, so that the network connection module 332 selects the corresponding service submodule according to the service identifier to process the corresponding service data.
[0103] Each service submodule in the ONU 330 corresponds to an alternative branch module in the basic version.
[0104] Step S403 : The ONU 330 determines whether the target virtual local area network channel identifier in the service identifier is 100.
[0105] If it is determined that the target virtual local area network channel identifier in the service identifier is 100, step S404 is executed; if it is determined that the target virtual local area network channel identifier in the service identifier is not 100, step S405 is executed.
[0106] Step S404, ONU 330 determines that the current communication subnet is the target communication subnet corresponding to the virtual local area network channel identifier 100, and selects a plurality of candidate branch modules (eg, Figure 3 Select a target branch module corresponding to the target communication subnet from among multiple business submodules in the target branch module; uninstall the default branch module, and load the target branch module to obtain a version corresponding to the target branch module.
[0107] In some embodiments, the default branch module may also be a historical branch module to represent the branch module used by the ONU 330 before obtaining the configuration message; the historical branch module is used to support the ONU 330 to communicate in the communication subnet corresponding to the historical branch module.
[0108] Step S405 : The ONU 330 determines whether the target virtual local area network channel identifier in the service identifier is 200.
[0109] If it is determined that the target virtual local area network channel identifier in the service identifier is 200, step S406 is executed; if it is determined that the target virtual local area network channel identifier in the service identifier is not 200, step S407 is executed.
[0110] Step S406, ONU 330 determines that the current communication subnet is the target communication subnet corresponding to the virtual local area network channel identifier 200, and selects a plurality of candidate branch modules (eg, Figure 3 Select a target branch module corresponding to the target communication subnet from among multiple business submodules in the target branch module; uninstall the default branch module, and load the target branch module to obtain a version corresponding to the target branch module.
[0111] In step S407 , the ONU 330 determines whether the target virtual local area network channel identifier in the service identifier is 300 .
[0112] If it is determined that the target virtual local area network channel identifier in the service identifier is 300, step S408 is executed; if it is determined that the target virtual local area network channel identifier in the service identifier is not 300, the process ends.
[0113] Step S408: ONU 330 determines whether the network address of the OLT in the service identifier is C.
[0114] If it is determined that the network address of the OLT in the service identifier is C, step S409 is executed; if it is determined that the network address of the OLT in the service identifier is not C, step S410 is executed.
[0115] Step S409, ONU 330 determines that the current communication subnet is the target communication subnet, the service identifier corresponding to the target communication subnet includes a virtual local area network channel identifier of 300 and an OLT network address of C; from multiple candidate branch modules in the basic version (such as, Figure 3 Select a target branch module corresponding to the target communication subnet from among multiple business submodules in the target branch module; uninstall the default branch module, and load the target branch module to obtain a version corresponding to the target branch module.
[0116] In step S410, the ONU 330 determines whether the network address of the OLT in the service identifier is D.
[0117] If it is determined that the network address of the OLT in the service identifier is D, step S411 is executed; if it is determined that the network address of the OLT in the service identifier is not D, the process ends.
[0118] Step S411, ONU 330 determines that the current communication subnet is the target communication subnet, the service identifier corresponding to the target communication subnet includes a virtual local area network channel identifier of 300 and an OLT network address of D; from multiple candidate branch modules in the basic version (such as, Figure 3 Select a target branch module corresponding to the target communication subnet from among multiple business submodules in the target branch module; uninstall the default branch module, and load the target branch module to obtain a version corresponding to the target branch module.
[0119] In step S412, the ONU 330 operates based on the version corresponding to the target branch module.
[0120] In this embodiment, by storing the basic version in the terminal in the form of a common module and multiple alternative branch modules, compared to the prior art method of storing multiple different software on the terminal side, the terminal in this embodiment no longer needs to store software corresponding to multiple communication subnets, but only distinguishes different communication subnets in the form of alternative branch modules, thereby saving terminal storage space, achieving a high degree of code sharing in the software, and greatly reducing the development workload. Furthermore, when the basic version needs to be maintained or updated according to actual usage requirements, it is only necessary to select each alternative branch module without any operation on the common module, reducing the complexity and risk of maintenance.
[0121] Moreover, when a new communication subnet needs to be supported by the terminal, the terminal only needs to add a backup branch module corresponding to the newly added communication subnet (for example, adding based on a configuration file, etc.), thereby enhancing the compatibility and scalability of the terminal.
[0122] In a third aspect, embodiments of the present disclosure provide a terminal, a computer-readable medium, and a computer program product.
[0123] Figure 5 A block diagram of a terminal provided in an embodiment of the present disclosure.
[0124] like Figure 5 As shown, the terminal includes: at least one processor 501, at least one memory 502, and one or more I / O interfaces 503. The processor 501, memory 502, and I / O interface 503 are interconnected via a bus 504. The memory 502 stores one or more computer programs, which are executed by the at least one processor 501 to enable the at least one processor 501 to implement any of the communication methods described in the above embodiments.
[0125] Each module in the above-mentioned terminal can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each of the above modules.
[0126] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the communication methods described in the above embodiments. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0127] An embodiment of the present disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of a terminal, the processor in the terminal executes the above-mentioned communication method.
[0128] Those skilled in the art will appreciate that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, or any combination thereof. In hardware implementations, the divisions between the functional modules / units described above do not necessarily correspond to the divisions between physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components.
[0129] Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on computer-readable storage media, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is well known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable program instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0130] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0131] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, the state information of the computer-readable program instructions is used to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), so that the electronic circuit can execute the computer-readable program instructions, thereby implementing various aspects of the present disclosure.
[0132] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0133] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0134] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine such that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0135] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0136] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, and the execution order between the boxes can be determined based on the functions involved in each box. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0137] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure.
Claims
1. A communication method, applied to a terminal, wherein the terminal stores a basic version, the basic version including a common module and a plurality of alternative branch modules, each of the alternative branch modules corresponding to a communication subnet; The common module is a module for supporting basic operation of the terminal, or a common code in software supporting operation of the terminal; the method includes: Determine the current communication subnet as the target communication subnet; Selecting a target branch module corresponding to the target communication subnet from a plurality of the candidate branch modules; Loading the target branch module; Determining the current communication subnet as the target communication subnet includes: In response to the received configuration message, obtaining a service identifier carried in the configuration message; According to the service identifier, determining the current communication subnet as the target communication subnet; The determining, according to the service identifier, that the current communication subnet is the target communication subnet includes: In response to the service identifier including the second-type target virtual local area network channel identifier and the device parameters of the alternative communication subnet, determining the target communication subnet according to the second-type target virtual local area network channel identifier and the device parameters of the alternative communication subnet; Each of the second-type target virtual local area network channel identifiers corresponds to at least two of the candidate communication subnets, and the combination of each of the second-type target virtual local area network channel identifiers and the device parameters of each of the candidate communication subnets corresponds to one of the candidate communication subnets.
2. The method according to claim 1, wherein Before determining the current communication subnet as the target communication subnet, the method further includes: The common module is loaded.
3. The method according to claim 1, wherein The configuration message includes an idle field defined by a preset communication protocol, and the service identifier is stored in the idle field.
4. The method according to claim 1 or 3, wherein The determining, according to the service identifier, that the current communication subnet is the target communication subnet includes: In response to the service identifier including a first-type target virtual local area network channel identifier, determining that a current communication subnet corresponding to the first-type target virtual local area network channel identifier is the target communication subnet; Each of the first-type target virtual local area network channel identifiers corresponds to a candidate communication subnet.
5. The method according to claim 1 or 3, wherein: The device parameters of the candidate communication subnet include at least one of the following: a network address identifier of a network-side device, type information of the terminal, and mask information of the communication subnet where the terminal is located.
6. The method according to claim 1, wherein Each of the candidate branch modules includes candidate service parameters and / or candidate service processing logic.
7. The method according to claim 1, wherein Before loading the target branch module, the method further includes: Uninstall the historical branch module; the historical branch module is the branch module used at the last moment before entering the current communication subnet.
8. A terminal comprising a memory and a processor; the memory stores a computer program executable by the processor, and when the computer program is executed by the processor, the communication method according to any one of claims 1 to 7 is implemented.
9. A computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the communication method according to any one of claims 1 to 7 is implemented.
10. A computer program product comprising a computer program, wherein when the computer program is executed by a processor, the communication method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Communication processing method and device, terminal equipment and computer readable storage medium
CN114585002A