Terminal equipment access method and device based on OpenHarmony and storage medium
By performing the identity authentication and bandwidth management of the terminal device in the Openharmony system, the problem of the terminal device access affects the operation of the Internet of Things system, and the key device priority support when bandwidth is tense.
Patent Information
- Application Number
- CN202411569396.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the OpenHarmony system, the access link of the terminal device has problems affecting the effective operation of the Internet of Things system. In the prior art, the terminal device does not perform effective bandwidth management after access.
Provide an openharmony -based terminal device access method. Through identity authentication, equipment information acquisition, and bandwidth judgment to determine the access method of the terminal equipment to ensure that the key equipment is preferred when bandwidth is tense.
Establish a trust relationship through the identity certification of both parties, ensure the access of authorized equipment, and achieve priority support of key equipment when bandwidth tightness, and maintain the effective operation of the Internet of Things system.
Smart Images

Figure CN119364358A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things, and in particular to an access method, device and storage medium for terminal devices based on OpenHarmony. Background Art
[0002] With the rapid development of IoT technology, more and more terminal devices need to access the network to achieve interconnection. As an open source distributed operating system for all scenarios, OpenHarmony is committed to providing a unified system platform for various terminal devices. OpenHarmony supports multiple communication protocols, including Wi-Fi, Bluetooth, ZigBee, NFC, etc., which can realize device discovery across network domains and expand the scope of device access.
[0003] In the OpenHarmony system, the access link of the terminal device is crucial. In the prior art, when the terminal device is connected to the OpenHarmony system, it is usually directly connected to the OpenHarmony system after the identity authentication is passed. This access method will affect the effective operation of the Internet of Things system. Summary of the invention
[0004] The present application provides an access method, device and storage medium for a terminal device based on OpenHarmony to solve the problems raised by the above background technology.
[0005] In a first aspect, the present application provides an access method for a terminal device based on OpenHarmony, comprising: Responding to an access request from a terminal device, authenticating the terminal device and the target OpenHarmony system based on a preset authentication mechanism; If the authentication is successful, obtaining device information of the terminal device; wherein the device information includes the communication protocol, communication bandwidth and priority of the terminal device; Determining whether the remaining bandwidth of the target network corresponding to the communication protocol is greater than the communication bandwidth; If so, connecting the terminal device to the target network based on the communication bandwidth; If not, the terminal device is connected to the target network based on a preset device access rule, the priority, the communication bandwidth and the remaining bandwidth.
[0006] In a possible implementation, the performing identity authentication on the terminal device and the target OpenHarmony system based on a preset identity authentication mechanism includes: Sending an identity authentication request to the terminal device and the target OpenHarmony system respectively; wherein the identity authentication request includes an initial authentication code generation rule; The terminal device generates a first initial authentication code based on the initial authentication code generation rule, and the target OpenHarmony system generates a second initial authentication code based on the initial authentication code generation rule; Acquire the first initial authentication code and the second initial authentication code, and generate target authentication information based on the first initial authentication code and the second initial authentication code; Whether the authentication is successful is determined based on the target authentication information.
[0007] In a possible implementation, the generating target authentication information based on the first initial authentication code and the second initial authentication code includes: Determine whether the first initial authentication code and the second initial authentication code have multiple identical characters; If so, arranging the identical characters in a predetermined column vector bracket from top to bottom in sequence based on the positions of the identical characters in the first initial authentication code to obtain a target column vector; Placing the first initial authentication code after the second initial authentication code to obtain a target character sequence; Determining whether the number of characters in the target character sequence is an integer multiple of the number of identical characters; If yes, segment the target character sequence based on the number of identical characters to obtain a plurality of character subsequences; wherein the number of characters in each of the character subsequences is equal to the number of identical characters; Arranging each character subsequence in a preset matrix bracket from top to bottom based on the position of each character subsequence in the target character sequence to obtain a target matrix; The target matrix is multiplied by the target column vector to obtain the target authentication information.
[0008] In a possible implementation, after determining whether the number of characters in the target character sequence is an integer multiple of the number of identical characters, the method further includes: If not, add target numbers in sequence after the target character sequence until the number of characters in the target character sequence is an integer multiple of the number of identical characters, thereby obtaining a final character sequence; The final character sequence is segmented based on the number of identical characters to obtain a plurality of character subsequences; wherein the number of characters in each of the character subsequences is equal to the number of identical characters; Arranging each of the character subsequences in order from top to bottom in a preset matrix bracket based on the position of each of the character subsequences in the final character sequence to obtain a target matrix; The target matrix is multiplied by the target column vector to obtain the target authentication information.
[0009] In a possible implementation, after determining whether the first initial authentication code and the second initial authentication code have a plurality of identical characters, the method further includes: If not, determining the greatest common divisor between the number corresponding to the number of characters in the first initial authentication code and the number corresponding to the number of characters in the second initial authentication code; The first initial authentication code is segmented based on the greatest common divisor to obtain a plurality of first sub-codes; wherein the number corresponding to the number of characters in the first sub-codes is consistent with the greatest common divisor; Arranging the first subcodes in a preset matrix bracket from top to bottom in sequence based on the positions of the first subcodes in the first initial authentication code to obtain a first matrix; The second initial authentication code is segmented based on the greatest common divisor to obtain a plurality of second sub-codes; wherein the number corresponding to the number of characters in the second sub-codes is consistent with the greatest common divisor; Arranging each of the second subcodes in a preset matrix bracket from top to bottom in sequence based on the position of each of the second subcodes in the second initial authentication code to obtain a second matrix; Obtain a transposed matrix corresponding to the second matrix; The first matrix is multiplied by the transposed matrix to obtain the target authentication information.
[0010] In a possible implementation, the step of accessing the terminal device to the target network based on a preset device access rule, the priority, the communication bandwidth, and the remaining bandwidth includes: Determine whether a target access device exists in the target network; the priority of the target access device is lower than the priority of the terminal device; If not, connecting the terminal device to the target network based on the remaining bandwidth; If so, determining whether the access bandwidth of the target access device is greater than the bandwidth difference between the communication bandwidth and the remaining bandwidth; If yes, allocating part of the access bandwidth of the target access device to the terminal device based on a preset bandwidth allocation method; wherein the bandwidth value of the part of the access bandwidth is consistent with the bandwidth difference; Connecting the terminal device to the target network based on the communication bandwidth; If not, determining whether the priority of the terminal device is higher than a preset priority; If so, disconnecting the target access device and connecting the terminal device to the target network based on the access bandwidth and the remaining bandwidth; If not, the terminal device is connected to the target network based on the remaining bandwidth.
[0011] In a second aspect, the present application provides an access device for a terminal device based on OpenHarmony, including: An identity authentication module, used to respond to an access request from a terminal device and authenticate the terminal device and the target OpenHarmony system based on a preset identity authentication mechanism; An acquisition module, used for acquiring device information of the terminal device if the authentication is successful; wherein the device information includes the communication protocol, communication bandwidth and priority of the terminal device; A judging module, used to judge whether the remaining bandwidth of the target network corresponding to the communication protocol is greater than the communication bandwidth; A first access module, configured to access the terminal device to the target network based on the communication bandwidth if the remaining bandwidth of the target network corresponding to the communication protocol is greater than the communication bandwidth; In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the access method for a terminal device based on OpenHarmony as described in any one of the above items is implemented.
[0012] The present application provides an access method, device and storage medium for terminal devices based on OpenHarmony. The method includes: responding to an access request from a terminal device, authenticating the terminal device and the target OpenHarmony system based on a preset authentication mechanism; if the authentication is successful, obtaining device information of the terminal device; wherein the device information includes the communication protocol, communication bandwidth and priority of the terminal device; determining whether the remaining bandwidth of the target network corresponding to the communication protocol is greater than the communication bandwidth; If so, the terminal device is connected to the target network based on the communication bandwidth; if not, the terminal device is connected to the target network based on the preset device access rule, the priority, the communication bandwidth and the remaining bandwidth. This method, on the one hand, realizes the mutual verification of the terminal device and the target OpenHarmony system by authenticating the terminal device and the target OpenHarmony system based on a preset identity authentication mechanism, which helps to establish a trust relationship between the terminal device and the target OpenHarmony system, ensures that both parties are authorized subjects and have an associated relationship, and provides a basis for the effective operation of the Internet of Things system. On the other hand, when the remaining bandwidth is not greater than the communication bandwidth, the terminal device is connected to the target network based on the preset device access rule, the priority, the communication bandwidth and the remaining bandwidth, which ensures that key devices in the Internet of Things system receive priority support when bandwidth resources are tight, which helps to maintain the effective operation of the Internet of Things system. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0014] Figure 1 A flowchart of an OpenHarmony-based terminal device access method provided in an embodiment of the present application; Figure 2 A schematic block diagram of the structure of an access device for a terminal device based on OpenHarmony provided in an embodiment of the present application. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0016] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0017] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0018] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0019] With the rapid development of IoT technology, more and more terminal devices need to access the network to achieve interconnection. As an open source distributed operating system for all scenarios, OpenHarmony is committed to providing a unified system platform for various terminal devices. OpenHarmony supports multiple communication protocols, including Wi-Fi, Bluetooth, ZigBee, NFC, etc., which can realize device discovery across network domains and expand the scope of device access.
[0020] In the OpenHarmony system, the access link of the terminal device is crucial. In the prior art, when a terminal device accesses the OpenHarmony system, it is usually directly connected to the OpenHarmony system after identity authentication. This access method will affect the effective operation of the Internet of Things system. To this end, the present application provides an access method, device and storage medium for a terminal device based on OpenHarmony to solve the above problems.
[0021] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0022] See also Figure 1 , Figure 1 A flow chart of a method for accessing a terminal device based on OpenHarmony provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the access method of the terminal device based on OpenHarmony provided in the embodiment of the present application includes steps S1 to S5.
[0023] Step S1, responding to an access request from a terminal device, and performing identity authentication on the terminal device and a target OpenHarmony system based on a preset identity authentication mechanism.
[0024] Step S2: If the authentication is successful, obtain the device information of the terminal device; wherein the device information includes the communication protocol, communication bandwidth and priority of the terminal device.
[0025] Step S3: Determine whether the remaining bandwidth of the target network corresponding to the communication protocol is greater than the communication bandwidth.
[0026] Step S4: If yes, connect the terminal device to the target network based on the communication bandwidth.
[0027] Step S5: If not, the terminal device is connected to the target network based on the preset device access rule, the priority, the communication bandwidth and the remaining bandwidth.
[0028] It should be noted that the execution entity of the embodiment of the present application can be a server or an access device of a terminal device based on OpenHarmony. The following description will be made using a server as an example.
[0029] As described in the above step S1, in response to the access request of the terminal device, the terminal device and the target OpenHarmony system are authenticated based on the preset authentication mechanism. Specifically, after the target OpenHarmony system discovers the terminal device, it notifies the server of the access request of the terminal device. After the server receives the access request sent by the target OpenHarmony system, it authenticates the terminal device and the target OpenHarmony system. It can be understood that traditional device access methods usually only verify the terminal device, while step S1 verifies both the terminal device and the target OpenHarmony system, which helps to establish a trust relationship between the terminal device and the target OpenHarmony system, ensuring that both parties are authorized entities and have an association relationship, providing a basis for the effective operation of the Internet of Things system.
[0030] As described in the above step S2, if the authentication is successful, the device information of the terminal device is obtained. Specifically, the server obtains the device information of the terminal device in the device information database based on the device identification of the terminal device, wherein the device information database is provided with a correspondence between the device identification and the device information. It should be noted that the verification in this embodiment not only indicates that both the terminal device and the target OpenHarmony system are authorized entities, but also indicates that the terminal device and the target OpenHarmony system have an associated relationship.
[0031] As described in step S3 above, it is determined whether the remaining bandwidth of the target network corresponding to the communication protocol is greater than the communication bandwidth. Specifically, the server determines the target network based on the communication protocol, obtains the remaining bandwidth of the target network through the bandwidth monitoring device of the target network, and determines whether the remaining bandwidth is greater than the communication bandwidth.
[0032] As described in the above step S4, if yes, the terminal device is connected to the target network based on the communication bandwidth. Specifically, if the remaining bandwidth is greater than the communication bandwidth, the server connects the terminal device to the target network and allocates a bandwidth equal to the communication bandwidth to the terminal device. It can be understood that when the remaining bandwidth is greater than the communication bandwidth, the method of step 4 is used to connect the terminal device to the target network, which can ensure the effective operation of the target device in the Internet of Things system and the effective use of bandwidth resources.
[0033] As described in the above step S5, if not, the terminal device is connected to the target network based on the preset device access rule, the priority, the communication bandwidth and the remaining bandwidth. Specifically, if the remaining bandwidth is not greater than the communication bandwidth, the server connects the terminal device to the target network based on the preset device access rule, the priority, the communication bandwidth and the remaining bandwidth. Wherein, the step of connecting the terminal device to the target network based on the preset device access rule, the priority, the communication bandwidth and the remaining bandwidth includes the following steps: Determine whether a target access device exists in the target network; the priority of the target access device is lower than the priority of the terminal device; If not, connecting the terminal device to the target network based on the remaining bandwidth; it can be understood that the actual communication bandwidth of the terminal device at this time is the remaining bandwidth; If so, determining whether the access bandwidth of the target access device is greater than the bandwidth difference between the communication bandwidth and the remaining bandwidth; If so, a portion of the access bandwidth of the target access device is allocated to the terminal device based on a preset bandwidth allocation method; wherein the bandwidth value of the portion of the access bandwidth is consistent with the bandwidth difference; it can be understood that at this time, the portion of the access bandwidth is released, and the sum of the bandwidth value of the released portion of the access bandwidth and the remaining bandwidth is consistent with the bandwidth value of the communication bandwidth; Connecting the terminal device to the target network based on the communication bandwidth; it can be understood that the actual communication bandwidth of the terminal device at this time is the communication bandwidth; If not, determining whether the priority of the terminal device is higher than a preset priority; If so, the target access device is disconnected, and the terminal device is connected to the target network based on the access bandwidth and the remaining bandwidth; it can be understood that the actual communication bandwidth of the terminal device at this time is the sum of the access bandwidth and the remaining bandwidth; If not, the terminal device is connected to the target network based on the remaining bandwidth; it can be understood that the actual communication bandwidth of the terminal device at this time is the remaining bandwidth.
[0034] It can be understood that step S5 ensures that key devices in the IoT system receive priority support when bandwidth resources are tight, which helps maintain the effective operation of the IoT system.
[0035] The method provided in this embodiment, on the one hand, realizes mutual verification of the terminal device and the target OpenHarmony system by authenticating the terminal device and the target OpenHarmony system based on a preset identity authentication mechanism, which helps to establish a trust relationship between the terminal device and the target OpenHarmony system, ensures that both parties are authorized entities and have an associated relationship, and provides a basis for the effective operation of the Internet of Things system. On the other hand, when the remaining bandwidth is not greater than the communication bandwidth, the terminal device is connected to the target network based on the preset device access rules, the priority, the communication bandwidth and the remaining bandwidth, thereby ensuring that key devices in the Internet of Things system receive priority support when bandwidth resources are tight, which helps to maintain the effective operation of the Internet of Things system.
[0036] In some embodiments, the identity authentication of the terminal device and the target OpenHarmony system based on a preset identity authentication mechanism includes the following steps: Sending an identity authentication request to the terminal device and the target OpenHarmony system respectively; wherein the identity authentication request includes an initial authentication code generation rule; The terminal device generates a first initial authentication code based on the initial authentication code generation rule, and the target OpenHarmony system generates a second initial authentication code based on the initial authentication code generation rule; specifically, the terminal device encodes its own device identification based on the initial authentication code generation rule to obtain the first initial authentication code, and sends the first initial authentication code to the server, and the target OpenHarmony system encodes its own system identification based on the initial authentication code generation rule to obtain the second initial authentication code, and sends the second initial authentication code to the server; Acquire the first initial authentication code and the second initial authentication code, and generate target authentication information based on the first initial authentication code and the second initial authentication code; Whether the authentication is successful is determined based on the target authentication information. Specifically, the server traverses the authentication information database, and if the target authentication information exists in the authentication information database, it is determined that the authentication is successful.
[0037] In this embodiment, the generating target authentication information based on the first initial authentication code and the second initial authentication code includes: Determine whether the first initial authentication code and the second initial authentication code have multiple identical characters; If so, arranging the identical characters in a predetermined column vector bracket from top to bottom in sequence based on the positions of the identical characters in the first initial authentication code to obtain a target column vector; Placing the first initial authentication code after the second initial authentication code to obtain a target character sequence; Determining whether the number of characters in the target character sequence is an integer multiple of the number of identical characters; If yes, segment the target character sequence based on the number of identical characters to obtain a plurality of character subsequences; wherein the number of characters in each of the character subsequences is equal to the number of identical characters; Arranging each character subsequence in a preset matrix bracket from top to bottom based on the position of each character subsequence in the target character sequence to obtain a target matrix; The target matrix is multiplied by the target column vector to obtain the target authentication information.
[0038] In this embodiment, after determining whether the number of characters in the target character sequence is an integer multiple of the number of identical characters, the method further includes: If not, add target numbers in sequence after the target character sequence until the number of characters in the target character sequence is an integer multiple of the number of identical characters, thereby obtaining a final character sequence; The final character sequence is segmented based on the number of identical characters to obtain a plurality of character subsequences; wherein the number of characters in each of the character subsequences is equal to the number of identical characters; Arranging each of the character subsequences in order from top to bottom in a preset matrix bracket based on the position of each of the character subsequences in the final character sequence to obtain a target matrix; The target matrix is multiplied by the target column vector to obtain the target authentication information.
[0039] In this embodiment, after determining whether the first initial authentication code and the second initial authentication code have a plurality of identical characters, the method further includes: If not, determining the greatest common divisor between the number corresponding to the number of characters in the first initial authentication code and the number corresponding to the number of characters in the second initial authentication code; The first initial authentication code is segmented based on the greatest common divisor to obtain a plurality of first sub-codes; wherein the number corresponding to the number of characters in the first sub-codes is consistent with the greatest common divisor; Arranging the first subcodes in a preset matrix bracket from top to bottom in sequence based on the positions of the first subcodes in the first initial authentication code to obtain a first matrix; The second initial authentication code is segmented based on the greatest common divisor to obtain a plurality of second sub-codes; wherein the number corresponding to the number of characters in the second sub-codes is consistent with the greatest common divisor; Arranging each of the second subcodes in a preset matrix bracket from top to bottom in sequence based on the position of each of the second subcodes in the second initial authentication code to obtain a second matrix; Obtain a transposed matrix corresponding to the second matrix; The first matrix is multiplied by the transposed matrix to obtain the target authentication information.
[0040] The method provided in this embodiment does not need to transmit the identity information of the terminal device and the target OpenHarmony system during the process of verifying the terminal device and the target OpenHarmony system, thereby realizing the identity verification of the terminal device and the target OpenHarmony system without leaking any privacy of the terminal device and the target OpenHarmony system, thereby improving the privacy security of the terminal device and the target OpenHarmony system.
[0041] See also Figure 2 , Figure 2 A schematic block diagram of the structure of an access device for a terminal device based on OpenHarmony provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the access device of the terminal device based on OpenHarmony provided in the embodiment of the present application includes: The identity authentication module 110 is used to respond to the access request of the terminal device and perform identity authentication on the terminal device and the target OpenHarmony system based on a preset identity authentication mechanism.
[0042] The acquisition module 120 is used to acquire the device information of the terminal device if the authentication is successful; wherein the device information includes the communication protocol, communication bandwidth and priority of the terminal device.
[0043] The determination module 130 is used to determine whether the remaining bandwidth of the target network corresponding to the communication protocol is greater than the communication bandwidth.
[0044] The first access module 140 is configured to access the terminal device to the target network based on the communication bandwidth if the remaining bandwidth of the target network corresponding to the communication protocol is greater than the communication bandwidth.
[0045] The second access module 150 is used to access the terminal device to the target network based on a preset device access rule, the priority, the communication bandwidth and the remaining bandwidth if the remaining bandwidth of the target network corresponding to the communication protocol is not greater than the communication bandwidth.
[0046] It should be noted that technical personnel in the relevant technical field can clearly understand that, for the convenience and conciseness of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned access method embodiment of the terminal device based on OpenHarmony, and will not be repeated here.
[0047] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by one or more processors, the one or more processors implement an access method for a terminal device based on OpenHarmony as provided in an embodiment of the present application.
[0048] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for accessing a terminal device based on OpenHarmony, characterized in that: include: Responding to an access request from a terminal device, authenticating the terminal device and the target OpenHarmony system based on a preset authentication mechanism; If the authentication is successful, obtaining device information of the terminal device; wherein the device information includes the communication protocol, communication bandwidth and priority of the terminal device; Determining whether the remaining bandwidth of the target network corresponding to the communication protocol is greater than the communication bandwidth; If so, connecting the terminal device to the target network based on the communication bandwidth; If not, the terminal device is connected to the target network based on a preset device access rule, the priority, the communication bandwidth and the remaining bandwidth.
2. The method for accessing a terminal device based on OpenHarmony according to claim 1, characterized in that: The performing identity authentication on the terminal device and the target OpenHarmony system based on a preset identity authentication mechanism includes: Sending an identity authentication request to the terminal device and the target OpenHarmony system respectively; wherein the identity authentication request includes an initial authentication code generation rule; The terminal device generates a first initial authentication code based on the initial authentication code generation rule, and the target OpenHarmony system generates a second initial authentication code based on the initial authentication code generation rule; Acquire the first initial authentication code and the second initial authentication code, and generate target authentication information based on the first initial authentication code and the second initial authentication code; Whether the authentication is successful is determined based on the target authentication information.
3. The method for accessing a terminal device based on OpenHarmony according to claim 2, characterized in that: The generating target authentication information based on the first initial authentication code and the second initial authentication code comprises: Determine whether the first initial authentication code and the second initial authentication code have multiple identical characters; If so, arranging the identical characters in a predetermined column vector bracket from top to bottom in sequence based on the positions of the identical characters in the first initial authentication code to obtain a target column vector; Placing the first initial authentication code after the second initial authentication code to obtain a target character sequence; Determining whether the number of characters in the target character sequence is an integer multiple of the number of identical characters; If yes, segment the target character sequence based on the number of identical characters to obtain a plurality of character subsequences; wherein the number of characters in each of the character subsequences is equal to the number of identical characters; Arranging each character subsequence in a preset matrix bracket from top to bottom based on the position of each character subsequence in the target character sequence to obtain a target matrix; The target matrix is multiplied by the target column vector to obtain the target authentication information.
4. The method for accessing a terminal device based on OpenHarmony according to claim 3, characterized in that: After determining whether the number of characters in the target character sequence is an integer multiple of the number of identical characters, the method further includes: If not, add target numbers in sequence after the target character sequence until the number of characters in the target character sequence is an integer multiple of the number of identical characters, thereby obtaining a final character sequence; The final character sequence is segmented based on the number of identical characters to obtain a plurality of character subsequences; wherein the number of characters in each of the character subsequences is equal to the number of identical characters; Arranging each of the character subsequences in order from top to bottom in a preset matrix bracket based on the position of each of the character subsequences in the final character sequence to obtain a target matrix; The target matrix is multiplied by the target column vector to obtain the target authentication information.
5. The method for accessing a terminal device based on OpenHarmony according to claim 3, characterized in that: After determining whether the first initial authentication code and the second initial authentication code have a plurality of identical characters, the method further includes: If not, determining the greatest common divisor between the number corresponding to the number of characters in the first initial authentication code and the number corresponding to the number of characters in the second initial authentication code; The first initial authentication code is segmented based on the greatest common divisor to obtain a plurality of first sub-codes; wherein the number corresponding to the number of characters in the first sub-codes is consistent with the greatest common divisor; Arranging the first subcodes in a preset matrix bracket from top to bottom in sequence based on the positions of the first subcodes in the first initial authentication code to obtain a first matrix; The second initial authentication code is segmented based on the greatest common divisor to obtain a plurality of second sub-codes; wherein the number corresponding to the number of characters in the second sub-codes is consistent with the greatest common divisor; Arranging each of the second subcodes in a preset matrix bracket from top to bottom in sequence based on the position of each of the second subcodes in the second initial authentication code to obtain a second matrix; Obtain a transposed matrix corresponding to the second matrix; The first matrix is multiplied by the transposed matrix to obtain the target authentication information.
6. The method for accessing a terminal device based on OpenHarmony according to claim 1, characterized in that: The step of accessing the terminal device to the target network based on a preset device access rule, the priority, the communication bandwidth, and the remaining bandwidth includes: Determine whether a target access device exists in the target network; the priority of the target access device is lower than the priority of the terminal device; If not, connecting the terminal device to the target network based on the remaining bandwidth; If so, determining whether the access bandwidth of the target access device is greater than the bandwidth difference between the communication bandwidth and the remaining bandwidth; If yes, allocating part of the access bandwidth of the target access device to the terminal device based on a preset bandwidth allocation method; wherein the bandwidth value of the part of the access bandwidth is consistent with the bandwidth difference; Connecting the terminal device to the target network based on the communication bandwidth; If not, determining whether the priority of the terminal device is higher than a preset priority; If so, disconnecting the target access device and connecting the terminal device to the target network based on the access bandwidth and the remaining bandwidth; If not, the terminal device is connected to the target network based on the remaining bandwidth.
7. An access device for a terminal device based on OpenHarmony, characterized in that: include: An identity authentication module, used to respond to an access request from a terminal device and authenticate the terminal device and the target OpenHarmony system based on a preset identity authentication mechanism; An acquisition module, used for acquiring device information of the terminal device if the authentication is successful; wherein the device information includes the communication protocol, communication bandwidth and priority of the terminal device; A judgment module, used to judge whether the remaining bandwidth of the target network corresponding to the communication protocol is greater than the communication bandwidth; A first access module, configured to access the terminal device to the target network based on the communication bandwidth if the remaining bandwidth of the target network corresponding to the communication protocol is greater than the communication bandwidth; The second access module is used to access the terminal device to the target network based on a preset device access rule, the priority, the communication bandwidth and the remaining bandwidth if the remaining bandwidth of the target network corresponding to the communication protocol is not greater than the communication bandwidth.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the access method for a terminal device based on OpenHarmony as described in any one of claims 1 to 6 is implemented.