Communication equipment, address code generation method, communication configuration method and storage medium
By obtaining the communication device's own status information and time information to generate random numbers as address codes, the problems of low efficiency in the communication device's address code generation, easy to operate incorrectly and low security in the prior art, and automation, safe and efficient Address code generation.
Patent Information
- Application Number
- CN202411217132.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-17
AI Technical Summary
Existing communication equipment is inefficient in generating address codes, is prone to misoperation and is not very safe, and the number of address codes is limited, which makes it easy to have duplicate encoding, resulting in increased production costs and reduced security.
By obtaining the communication device's own status information and time information, a random number is generated as an address code, which avoids manual setting and welding operations, improves production efficiency and enhances the randomness and security of the address code.
It realizes automatic address code generation, avoids misoperation and repeated encoding, improves production efficiency and communication security, and enhances the randomness and unpredictability of address codes, which are difficult to crack.
Smart Images

Figure CN119155281A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication device, an address code generation method, a communication configuration method, and a storage medium. Background Art
[0002] When a communication device needs to send information to another communication device, it needs to know the other party's address code in advance. At present, the address code is mostly set by R&D personnel according to certain rules when the communication equipment is produced and welded or written into the communication equipment by professionals. This method of determining the address code is not only inefficient, but also requires too high professional quality of personnel and is prone to misoperation. At the same time, due to the limited number of address codes, if the number of addresses is to be increased, more processing costs and processing procedures will be required, and it is still easy to have repeated coding. Once the phenomenon of repeated coding occurs, it is necessary to disassemble the machine again. In addition, the address code obtained by this method can be cracked using an oscilloscope or other tools, so it is not very secure. Summary of the invention
[0003] The technical problems to be solved by the present application are low efficiency, easy misoperation and low safety. For this purpose, a communication device, an address code generation method, a communication configuration method and a storage medium are provided.
[0004] In order to solve the above technical problems, the present invention constructs an address code generation method, which is applied to a processor, comprising:
[0005] Get the current self-state information and the current self-time information;
[0006] Generate a random number according to the own state information and the own time information;
[0007] The random number is used as its own address code.
[0008] Preferably, the obtaining of current self-state information includes:
[0009] The current temperature and humidity information and / or photosensitivity information is collected from the temperature and humidity sensor and / or photosensitivity sensor, and is used as the current self-state information.
[0010] Preferably, the obtaining of the current own time information includes:
[0011] The current self-time information is obtained from a timer built into or externally connected to the processor.
[0012] Preferably, generating a random number according to the self-state information and the self-time information includes:
[0013] The self-state information and the self-time information are combined and calculated to obtain a random number.
[0014] Preferably, the combining operation of the self-state information and the self-time information comprises:
[0015] A linear congruential operation or a modulo operation is performed on the self-state information and the self-time information to obtain a random number.
[0016] The present invention also constructs a communication configuration method, which is applied to a first communication device, comprising:
[0017] After receiving a trigger signal input by a user, an address code request instruction is generated, and the address code request instruction is broadcasted;
[0018] The address code of the second communication device is received from the second communication device, and the address code of the second communication device is stored, wherein the second communication device generates its own address code according to the above-mentioned address code generation method when receiving the address code request instruction.
[0019] Preferably, it also includes:
[0020] After receiving a trigger signal input by a user, generating its own address code according to the address code generation method according to any one of claims 1 to 5;
[0021] The address code of the first communication device is sent to the second communication device so that the second communication device can store the address code of the first communication device.
[0022] The present invention also constructs a communication configuration method, which is applied to a second communication device, comprising:
[0023] Upon receiving the address code request instruction broadcasted by the first communication device, generating its own address code according to the address code generation method described above, wherein the first communication device generates the address code request instruction after receiving a trigger signal input by a user;
[0024] The address code of the second communication device is sent to the first communication device so that the first communication device can store the address code of the second communication device.
[0025] The present invention also constructs a storage matrix storing a computer program, which, when executed by a processor, implements the steps of the above-mentioned address code generation method and / or the steps of the above-mentioned communication configuration method.
[0026] The present invention also constructs a communication device, including a processor and a memory storing a computer program, wherein the processor implements the steps of the above-mentioned address code generation method and / or the steps of the above-mentioned communication configuration method when executing the computer program.
[0027] Through the technical solution of the present application, when a communication device needs to generate an address code, it first obtains its current state information and its current time information, generates a random number based on its state information and its time information, and then uses the generated random number as the address code of the communication device. Therefore, the technical solution has the following beneficial effects:
[0028] 1. Since the address code is automatically generated according to its own status information and time information, it is no longer necessary for R&D personnel to set the address code for each communication device according to certain rules and perform welding or writing, which greatly improves the production efficiency of the communication equipment and completely avoids misoperation or repeated coding;
[0029] 2. Since the self-state information and the self-time information are selected as the seeds for generating random numbers, and the self-state information and the self-time information are not only variable but also have certain real physical characteristics, the quality of the generated random numbers is higher, which can make the address codes of different communication devices more random and unpredictable. Therefore, it is more difficult for illegal personnel to maliciously crack the address code and improve the security of communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0031] Figure 1 is a flow chart of an address code generating method according to an embodiment of the present invention;
[0032] Figure 2 is a flow chart of a communication configuration method according to an embodiment of the present invention;
[0033] Figure 3 is a flow chart of a communication configuration method according to another embodiment of the present invention. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0035] Please refer to Figure 1 The address code generation method provided in this embodiment is applied to a processor of a communication device and includes the following steps:
[0036] Step S01, obtaining current self-state information and current self-time information;
[0037] Step S02, generating a random number according to the self-state information and the self-time information;
[0038] Step S03, using the random number as its own address code.
[0039] In this embodiment, when the communication device needs to generate an address code, it first obtains its current state information and its current time information, generates a random number based on its state information and its time information, and then uses the generated random number as the address code of the communication device. Therefore, the technical solution of this embodiment has the following beneficial effects:
[0040] 1. Since the address code is automatically generated according to its own status information and time information, it is no longer necessary for R&D personnel to set the address code for each communication device according to certain rules and perform welding or writing, which greatly improves the production efficiency of the communication equipment and completely avoids misoperation or repeated coding;
[0041] 2. Since the self-state information and the self-time information are selected as the seeds for generating random numbers, and the self-state information and the self-time information are not only variable but also have certain real physical characteristics, the quality of the generated random numbers is higher, which can make the address codes of different communication devices more random and unpredictable. Therefore, it is more difficult for illegal personnel to maliciously crack the address code and improve the security of communication.
[0042] Further, in an optional embodiment, obtaining the current self-state information in step S01 includes: collecting the current temperature and humidity information and / or light-sensitive information from the temperature and humidity sensor and / or the light-sensitive sensor, and using it as the current self-state information. In this embodiment, the communication device is provided with a temperature and humidity sensor and / or a light-sensitive sensor, which collects real-time variable temperature and humidity and / or light-sensitive analog signals, and then converts them into digital signals as part of the seed for random number generation.
[0043] Further, in an optional embodiment, obtaining the current self-time information in step S01 includes: obtaining the current self-time information from a timer built into or externally connected to the processor. In this embodiment, in the communication device, the processor has a built-in or externally connected timer, and the timer performs cyclic timing, for example, with 24 hours or 12 hours as a timing cycle, and the count value of the timer is used as another part of the seed for generating the random number.
[0044] Further, in an optional embodiment, generating a random number according to the self-state information and the self-time information in step S20 includes: performing a combination operation on the self-state information and the self-time information to obtain a random number. In this embodiment, after obtaining the self-state information and the self-time information, the random number is obtained by combining the two, for example, by a linear congruential operation or a modulus operation.
[0045] Figure 2 : is a flow chart of a communication configuration method according to an embodiment of the present invention. The communication configuration method according to the embodiment is applied to a first communication device. When the first communication device needs to obtain the address code of the second communication device, for example, the remote control (first communication device) wants to control the air conditioner A (second communication device) at home, and needs to obtain the address code of the air conditioner A first, at this time, the first communication device performs the following steps:
[0046] Step S11, after receiving a trigger signal input by a user, generating an address code request instruction, and broadcasting the address code request instruction;
[0047] In this step, the first communication device may be provided with a trigger module, such as a button. Before the first communication device sends an information instruction to the second communication device for the first time, the user may input a trigger signal through the trigger module, and the first communication device generates an address code request instruction after receiving the trigger signal. Since the first communication device does not know the address code of the second communication device at this time, it is not possible to send the address code request instruction one-to-one, and can only send the address code request instruction by broadcasting, such as Bluetooth broadcasting, WIFI broadcasting, etc.
[0048] Step S12, receiving the address code of the second communication device from the second communication device, and saving the address code of the second communication device, wherein the second communication device generates its own address code according to the above-mentioned address code generation method when receiving the address code request instruction.
[0049] In this embodiment, when the first communication device needs to obtain the address code of the second communication device, it can generate an address code request instruction after receiving a trigger signal from the user, and broadcast the address code request instruction. After receiving the address code request instruction, the second communication device generates its own address code according to the above-mentioned address code generation method, and sends it to the first communication device for storage. In this way, the first communication device obtains the address code of the second communication device.
[0050] Furthermore, in some applications, not only the first communication device needs to obtain the address code of the second communication device, but the second communication device also needs to obtain the address code of the first communication device. Therefore, based on the above embodiment, the first communication device further performs:
[0051] After receiving the trigger signal input by the user, the address code is generated according to the address code generation method described above;
[0052] The address code of the first communication device is sent to the second communication device so that the second communication device can store the address code of the first communication device.
[0053] In this embodiment, when the first communication device receives the user's trigger signal, it will also generate its own address code according to the above-mentioned address code generation method, and send its own address code to the second communication device. For example, its own address code and address code request instruction are sent to the second communication device by broadcasting, or, after receiving the address code of the second communication device, its own address code is sent to the second communication device in a one-to-one manner.
[0054] Figure 3 : is a flow chart of a communication configuration method according to another embodiment of the present invention. The communication configuration method according to this embodiment is applied to a second communication device. When the first communication device needs to obtain the address code of the second communication device, for example, the remote control (first communication device) wants to control the air conditioner A (second communication device) at home, and needs to obtain the address code of the air conditioner A first, at this time, the second communication device performs the following steps:
[0055] Step S21, upon receiving an address code request instruction broadcast by a first communication device, generating its own address code according to the address code generation method described above, wherein the first communication device generates the address code request instruction after receiving a trigger signal input by a user;
[0056] Step S22, sending its own address code to the first communication device, so that the first communication device can save the address code of the second communication device.
[0057] In this embodiment, when the first communication device needs to obtain the address code of the second communication device, it can generate an address code request instruction after receiving a trigger signal from the user, and broadcast the address code request instruction. After receiving the address code request instruction, the second communication device generates its own address code according to the above-mentioned address code generation method, and sends it to the first communication device for storage. In this way, the first communication device obtains the address code of the second communication device.
[0058] Furthermore, in some applications, not only the first communication device needs to obtain the address code of the second communication device, but the second communication device also needs to obtain the address code of the first communication device. Therefore, based on the above embodiment, the second communication device further performs:
[0059] Receiving an address code of the first communication device sent by the first communication device, wherein the first communication device generates its own address code according to the above-mentioned address code generation method after receiving a trigger signal input by a user;
[0060] The address code of the first communication device is saved.
[0061] In this embodiment, when the first communication device receives the user's trigger signal, it will also generate its own address code according to the above-mentioned address code generation method, and send its own address code to the second communication device. For example, its own address code and address code request instruction are sent to the second communication device by broadcasting, or, after receiving the address code of the second communication device, its own address code is sent to the second communication device in a one-to-one manner.
[0062] The present invention also constructs a storage matrix, and the storage medium can be a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, etc., which can store program codes. The storage matrix stores a computer program, and when the computer program is executed by a processor, the steps of the address code generation method described above and / or the steps of the communication configuration method described above are implemented.
[0063] The present invention also constructs a communication device, which includes a processor and a memory storing a computer program, and the processor implements the steps of the address code generation method described above when executing the computer program, and / or implements the steps of the communication configuration method described above. The processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0064] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.
Claims
1. A method for generating an address code, applied to a processor, It is characterized in that include: Get the current self-state information and the current self-time information; Generate a random number according to the own state information and the own time information; The random number is used as its own address code.
2. The address code generating method according to claim 1, It is characterized in that The obtaining of the current self-state information includes: The current temperature and humidity information and / or photosensitivity information is collected from the temperature and humidity sensor and / or photosensitivity sensor, and is used as the current self-state information.
3. The address code generating method according to claim 1, It is characterized in that The obtaining of the current own time information includes: The current self-time information is obtained from a timer built into or externally connected to the processor.
4. The address code generating method according to claim 1, It is characterized in that Generating a random number according to the own state information and the own time information, including: The self-state information and the self-time information are combined and calculated to obtain a random number.
5. The address code generating method according to claim 4, It is characterized in that The combining operation of the self-state information and the self-time information includes: A linear congruential operation or a modulo operation is performed on the self-state information and the self-time information to obtain a random number.
6. A communication configuration method, applied to a first communication device, It is characterized in that include: After receiving a trigger signal input by a user, an address code request instruction is generated, and the address code request instruction is broadcasted; Receive the address code of the second communication device from the second communication device, and save the address code of the second communication device, wherein the second communication device generates its own address code according to the address code generation method according to any one of claims 1-5 when receiving the address code request instruction.
7. The communication configuration method according to claim 6, It is characterized in that Also includes: After receiving a trigger signal input by a user, generating its own address code according to the address code generation method according to any one of claims 1 to 5; The address code of the first communication device is sent to the second communication device so that the second communication device can store the address code of the first communication device.
8. A communication configuration method, applied to a second communication device, It is characterized in that include: Upon receiving an address code request instruction broadcast by a first communication device, generating its own address code according to the address code generation method according to any one of claims 1 to 5, wherein the first communication device generates the address code request instruction after receiving a trigger signal input by a user; The address code of the second communication device is sent to the first communication device so that the first communication device can store the address code of the second communication device.
9. A storage matrix storing a computer program, It is characterized in that When the computer program is executed by a processor, the computer program implements the steps of the address code generation method described in any one of claims 1 to 5, and / or implements the steps of the communication configuration method described in any one of claims 6 to 8.
10. A communication device comprising a processor and a memory storing a computer program, It is characterized in that When executing the computer program, the processor implements the steps of the address code generation method described in any one of claims 1-5, and / or implements the steps of the communication configuration method described in any one of claims 6-8.
