CN113452698A - Terminal identity distribution method, control terminal and controlled equipment - Google Patents

Terminal identity distribution method, control terminal and controlled equipment Download PDF

Info

Publication number
CN113452698A
CN113452698A CN202110713190.1A CN202110713190A CN113452698A CN 113452698 A CN113452698 A CN 113452698A CN 202110713190 A CN202110713190 A CN 202110713190A CN 113452698 A CN113452698 A CN 113452698A
Authority
CN
China
Prior art keywords
identity
control terminal
terminal
request
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110713190.1A
Other languages
Chinese (zh)
Inventor
朱建生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
GD Midea Air Conditioning Equipment Co Ltd
Foshan Shunde Midea Electric Science and Technology Co Ltd
Original Assignee
GD Midea Air Conditioning Equipment Co Ltd
Foshan Shunde Midea Electric Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by GD Midea Air Conditioning Equipment Co Ltd, Foshan Shunde Midea Electric Science and Technology Co Ltd filed Critical GD Midea Air Conditioning Equipment Co Ltd
Priority to CN202110713190.1A priority Critical patent/CN113452698A/en
Publication of CN113452698A publication Critical patent/CN113452698A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2807Exchanging configuration information on appliance services in a home automation network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the application discloses a terminal identity distribution method, a control terminal and controlled equipment, wherein the method comprises the following steps: sending an identity distribution request to controlled equipment controlled by a current control terminal, wherein the identity distribution request can contain an identity ID of the current control terminal; acquiring identity distribution data replied by the controlled equipment according to the identity distribution request; the identity assignment data may include identity information assigned by the currently controlled device for the ID of the control terminal. Through the scheme of the embodiment, the identity is automatically matched for the control terminal, the matching efficiency is improved, and the cost is not required to be increased.

Description

Terminal identity distribution method, control terminal and controlled equipment
Technical Field
The embodiment of the application relates to the field of electrical equipment, in particular to a terminal identity distribution method, a control terminal and controlled equipment.
Background
The water heater system comprises an internal machine and a plurality of control terminals which belong to the same communication network. In order to ensure the normal communication of the communication network, a master control terminal and a slave control terminal must be distinguished among a plurality of control terminals, the master control terminal and the slave control terminal are used as slave machines to distinguish addresses, and the master control terminal is used as a master machine to periodically access the master machine or the slave control terminal with different addresses. In the related art, when the hardware of the water heater system is installed, a worker sets the control terminal as a master or a slave through dial codes or a human-computer interaction interface on an electric control board of the control terminal.
The manual setting has the following disadvantages:
1. manual dial operation or interface operation needs to be performed on each control terminal, and the installation efficiency is low.
2. The setting correctness is difficult to ensure, and the error rate is high.
3. Increasing the cost.
Disclosure of Invention
The embodiment of the application mainly aims to provide a terminal identity distribution method, a control terminal and controlled equipment, and aims to solve the technical problems of low installation efficiency, high error rate and cost increase in the prior art.
In order to achieve the above object, an embodiment of the present application provides a method for automatically allocating identities of a control terminal, which may be applied to a control terminal side, where the method may include:
sending an identity allocation request (namely an identity allocation request data message) to a controlled device controlled by a current control terminal, wherein the identity allocation request can contain an identity ID of the current control terminal;
acquiring identity distribution data (namely identity distribution data message) replied by the controlled equipment according to the identity distribution request; the identity assignment data may include identity information assigned by the currently controlled device for the ID of the control terminal; the identity information may be used to indicate an identity to which the control terminal corresponding to the ID is assigned.
In an exemplary embodiment of the present application, before sending the identity allocation request to the controlled device controlled by the current control terminal, the method may further include:
generating a random number and the ID of the current control terminal;
generating the waiting sending time T of the identity distribution request according to the random numberRandom numberAt said waiting time TRandom numberUpon arrival, an identity assignment request may be sent to the controlled device.
In an exemplary embodiment of the present application, the method may further include:
at a preset total duration TTotal period of timeIf the controlled device does not receive the reply, the random number can be regenerated, and the waiting sending time T can be regenerated according to the random numberRandom numberAccording to the regenerated waiting transmission time TRandom numberAnd re-sending the identity allocation request to the controlled equipment.
In an exemplary embodiment of the present application, the identity information may include a master identity or a slave identity;
the method may further comprise: storing the identity information; when the identity allocated to the current control terminal is the slave identity, the identity information may further include a slave address.
In an exemplary embodiment of the present application, the identity assignment request may include: for competing for the host's data.
The embodiment of the present application further provides a control terminal, which may include a first processor and a first computer-readable storage medium, where the first computer-readable storage medium may store a first instruction, and when the first instruction is executed by the first processor, the method for allocating a terminal identity may be implemented as any one of the above methods.
The embodiment of the present application further provides a terminal identity allocating method, which can be applied to a controlled device side, and the method can include:
receiving an identity allocation request sent by a control terminal, wherein the identity allocation request can contain the ID of the control terminal;
detecting whether the host identity is already allocated according to the identity allocation request;
according to the detection result, identity distribution is carried out on the control terminal corresponding to the ID, and identity distribution data are replied to the control terminal; the identity assignment data may include identity information assigned to the ID; the identity information may be used to indicate an identity to which the control terminal is assigned; the identity information may include a master identity or a slave identity.
In an exemplary embodiment of the present application, the allocating an identity to the control terminal corresponding to the ID according to the detection result may include:
if no host has been assigned, a host identity may be assigned to the ID;
if a master has been assigned, a slave identity may be assigned to the ID.
In an exemplary embodiment of the present application, the method may further include:
after the slave identity is assigned to the ID, a slave address may be assigned to the ID, and the assigned slave identity and slave address may be returned to the control terminal by the identity assignment data.
In an exemplary embodiment of the present application, the method may further include:
when the received identity allocation request is checked for errors, timing can be started, and the allocation of identities for the plurality of control terminals can be stopped;
when the timing time length reaches the preset total time length TTotal period of timeThe timing can be reset, and the total time length T can be setTotal period of timeAnd adding 1 to the counted number of times, and re-receiving the identity distribution request sent by the control terminal.
In an exemplary embodiment of the present application, the method may further include:
when the total duration T isTotal period of timeWhen the total number of times of statistics reaches n, the receiving of the identity allocation request sent by any control terminal can be stopped, and thus the allocation of the identity to the control terminal is stopped, wherein n is a positive integer greater than 1.
An embodiment of the present application may further provide a controlled device, which may include: a second processor and a second computer-readable storage medium, where a second instruction may be stored in the second computer-readable storage medium, and when the second instruction is executed by the second processor, the method for assigning a terminal identity may be implemented.
The technical scheme of the embodiment of the application can comprise that: sending an identity distribution request to controlled equipment controlled by a current control terminal, wherein the identity distribution request can contain an identity ID of the current control terminal; acquiring identity distribution data replied by the controlled equipment according to the identity distribution request; the identity assignment data may include identity information assigned by the currently controlled device for the ID of the control terminal; the identity information may be used to indicate the identity to which the control terminal is assigned. Through the scheme of the embodiment, the identity is automatically matched for the control terminal, the matching efficiency is improved, and the cost is not required to be increased.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
Fig. 1 is a flowchart of a method for automatically allocating control terminal identities at a control terminal according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a controlled device and a plurality of control terminals according to an embodiment of the present application;
FIG. 3 shows T in an embodiment of the present applicationRandom numberGenerating a schematic diagram;
fig. 4 is a schematic diagram of a method for automatically allocating control terminal identities at a control terminal according to an embodiment of the present application;
FIG. 5 is a block diagram of a control terminal according to an embodiment of the present disclosure;
fig. 6 is a flowchart of a method for automatically allocating control terminal identities at a controlled device side according to an embodiment of the present application;
fig. 7 is a schematic diagram of a method for automatically allocating control terminal identities at a controlled device side according to an embodiment of the present application;
fig. 8 is a block diagram of a controlled device according to an embodiment of the present application.
The reference numbers illustrate:
Figure BDA0003134432660000041
the implementation, functional features and advantages of the objects of the embodiments of the present application will be further described with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the embodiments in the present application.
It should be noted that all the directional indications (such as up, down, left, right, front, and rear … …) in the embodiment of the present application are only used to explain the relative position relationship between the components, the movement situation, and the like in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indication is changed accordingly.
In addition, descriptions such as references to "first", "second", and the like in the embodiments of the present application are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicit ly indicating a number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the embodiments of the present application, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the embodiments of the present application, unless otherwise explicitly specified or limited, the terms "connected," "fixed," and the like are to be construed broadly, e.g., "fixed" may be fixedly connected, or detachably connected, or integrated; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the embodiments of the present application can be understood by those of ordinary skill in the art according to specific situations.
In addition, technical solutions between the embodiments of the present application may be combined with each other, but it must be based on the realization of the technical solutions by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should be considered to be absent and not within the protection scope claimed by the embodiments of the present application.
The embodiment of the present application provides a method for automatically allocating identities of a control terminal, which may be applied to a control terminal side, as shown in fig. 1, the method may include steps S101 to S102:
s101, sending an identity distribution request (namely an identity distribution request data message) to controlled equipment controlled by a current control terminal, wherein the identity distribution request can contain an identity ID of the current control terminal;
s102, obtaining identity distribution data (namely identity distribution data message) replied by the controlled equipment according to the identity distribution request; the identity assignment data may include identity information assigned by the currently controlled device for the ID of the control terminal; the identity information may be used to indicate an identity to which the control terminal corresponding to the ID is assigned.
In an exemplary embodiment of the present application, a controlled device (e.g., an internal machine of a water heater system) and a plurality of control terminals, which may be included in an existing electrical equipment system (e.g., a water heater system), may all belong to the same communication network, and the structure is shown in fig. 2.
In the exemplary embodiment of the application, the controlled device and the plurality of control terminals belonging to the same network can perform data communication through the network to perform data interaction, so that a technical basis can be provided for the controlled device to assign identities to the plurality of control terminals.
In an exemplary embodiment of the present application, the network may include, but is not limited to, a home local area network, a public wireless fidelity (WIFI) network, a network hotspot, and the like.
In the exemplary embodiment of the application, the controlled device and the plurality of control terminals may communicate with each other in a plurality of communication manners such as bluetooth and near field communication NFC, and the communication manners between the controlled device and the plurality of control terminals are not limited in detail herein, and may be defined by themselves according to different application scenarios and requirements.
In an exemplary embodiment of the present application, before sending the identity allocation request to the controlled device controlled by the current control terminal, the method may further include:
generating a random number and the ID of the current control terminal;
generating the waiting sending time T of the identity distribution request according to the random numberRandom numberAt said waiting time TRandom numberUpon arrival, an identity assignment request may be sent to the controlled device.
In an exemplary embodiment of the present application, after the electrical device system is powered on, each control terminal may automatically generate a random number and an ID identification.
In an exemplary embodiment of the present application, as shown in fig. 3, a waiting transmission time T may be generated from the random numberRandom numberIn particular, TRandom numberRandom number TTime base
In an exemplary embodiment of the present application, each control terminal generates TRandom numberThereafter, a timer can be timed and set at TRandom numberAn identity assignment request is sent to the controlled device (e.g., internal machine) upon arrival to request assignment of an identity to the controlled device.
In an exemplary embodiment of the present application, the identity assignment request may include: for competing for the host's data. That is, the identity assignment request may be used to request assignment of a master identity to a controlled device.
In an exemplary embodiment of the present application, TRandom numberCan be used as waiting sending time measurement for competing host identity, and during waiting, i.e. timing does not reach TRandom numberAnd may be in a receiving state.
In the exemplary embodiment of the present application, if waiting for the transmission time TRandom numberIf the ID is satisfied, the control terminal actively sends an identity distribution request containing the ID identification of the control terminal to the controlled equipment.
In the exemplary embodiment of the present application, if the controlled device (internal device) receives the identity allocation request sent by the control terminal, it may start allocating corresponding identity information to the corresponding control terminal.
In an exemplary embodiment of the present application, the identity information may include a master identity or a slave identity;
when the identity allocated to the current control terminal is the slave identity, the identity information may further include a slave address.
In an exemplary embodiment of the present application, the controlled device may first detect whether a host identity is already currently assigned, and if the host identity is not already assigned, assign the host identity to the control terminal corresponding to the current ID, and send identity assignment data to the control terminal. The identity assignment data may include currently assigned identity information, e.g., a host identity. If the master identity is already allocated, allocating a slave identity to the control terminal corresponding to the current ID, and allocating a slave address to the control terminal, where the identity allocation data sent to the control terminal may include the slave identity and the allocated slave address.
In an exemplary embodiment of the present application, the identity assignment data returned by the controlled device to the control terminal may include an ID of the terminal, so as to send the identity assignment data to the correct control terminal.
In an exemplary embodiment of the present application, the control terminal may receive identity assignment data corresponding to an ID identifier corresponding to a self-provided ID to confirm assigned identity information and store the identity information.
In exemplary embodiments of the present application, T generated when two or more control terminals generateRandom numberIf the same, several sets of identity assignment request signals may be sent simultaneously, that is, multiple control terminals simultaneously send requests for assigning identities to controlled devices. Due to the uniqueness of the ID identification of each control terminal, the distribution request data message signals sent by the control terminals are overlapped, so that data verification is not passed, therefore, the internal machine cannot normally receive the distribution request data message, and correspondingly, the internal machine cannot perform identity distribution on the control terminal sending the distribution request data message, so that identity distribution data cannot be returned to the control terminals.
In an exemplary embodiment of the present application, the method may further include:
at a preset total duration TTotal period of timeIf the controlled device does not receive the reply, the random number can be regenerated, and the waiting sending time T can be regenerated according to the random numberRandom numberAccording to the regenerated waiting transmission time TRandom numberAnd re-sending the identity allocation request to the controlled equipment.
In an exemplary embodiment of the present application, the total duration T may be set in advanceTotal period of timeFor limiting the reply time of the controlled device if it is within the total time length TTotal period of timeThe controlled device has already received the identity assignment data returned by the controlled device, which indicates that the controlled device has already received the identity assignment request sent by the current control terminal and has assigned a corresponding identity to the current control terminal according to the request, so that the control terminal can store the identity information contained in the received identity assignment data and stop sending the identity assignment request to the controlled device at this time.
In the exemplary embodiment of the present application, if at this total duration TTotal period of timeIf the identity allocation request returned by the controlled device is not received, it can be determined that the controlled device does not receive the identity allocation request sent by the current control terminal, or the controlled device receives the identity allocation request sent by the current control terminalThe identity allocation request does not allocate an identity to the current control terminal, and at this time, the current control terminal may send the identity allocation request to the controlled device again to re-request the controlled device to allocate an identity in order to acquire the identity information. Wherein, before resending the identity allocation request, a random number can be generated again first, so as to be based on the random number and TRandom numberRandom number TTime baseRecalculating the wait-to-send time T for the identity assignment requestRandom numberAnd waiting for a transmission time TRandom numberThe identity assignment request is sent again when it arrives.
In an exemplary embodiment of the present application, for a total duration TTotal period of timeCan be defined by itself according to the requirements, here for the total duration TTotal period of timeThe numerical values of (a) are not particularly limited.
In an exemplary embodiment of the present application, as shown in fig. 4, a schematic diagram of an automatic identity allocation method on a control terminal side is given, which may include steps S201 to S210:
s201, powering on a system;
s202, detecting TRandom numberAnd if ID identification has been generated? If not, go to step S203, and if it is, go to step S204;
s203, generating TRandom numberAnd an ID identification;
s204, starting a timing function;
s205, detecting whether the timing duration is more than or equal to TRandom numberIs there a If yes, the procedure goes to step S206, if not, the timing is continued, and whether the timing duration is longer than or equal to T or not is continuously detectedRandom number
S206, the control terminal sends an identity distribution request to the controlled equipment;
s207, starting a timing function;
s208, detecting whether the timing duration is more than or equal to TTotal period of timeIs there a If not, the step S209 is carried out, and if yes, the detection returns to the step S202;
s209, detecting whether identity distribution data returned by the controlled device is received? If the identity distribution data returned by the controlled equipment is received, the step S210 is entered, and if the identity distribution data returned by the controlled equipment is not received, the step S208 is returned;
s210, storing the distributed identity information.
In the exemplary embodiment of the application, in an application scenario of one more controller, the multiple controllers belong to the same network system, and by the scheme of the embodiment, the identities can be automatically matched after being powered on without manual intervention. The installation steps are simplified, the installation efficiency is improved, and the cost is not required to be increased.
The embodiment of the present application further provides a control terminal 1, as shown in fig. 5, which may include a first processor 11 and a first computer-readable storage medium 12, where the first computer-readable storage medium 12 may store first instructions, and when the first instructions are executed by the first processor 11, the method for allocating a terminal identity may be implemented as any one of the above-mentioned methods.
In the exemplary embodiment of the present application, any embodiment of the foregoing identity automatic allocation method applied to the control terminal side may be applied to the control terminal 1, and details are not repeated here.
The embodiment of the present application further provides a terminal identity allocating method, as shown in fig. 6, which may be applied to a controlled device side, where the method may include steps S301 to S303:
s301, receiving an identity allocation request sent by a control terminal, wherein the identity allocation request can contain the ID of the control terminal;
s302, detecting whether the host identity is already allocated according to the identity allocation request;
s303, performing identity distribution on the control terminal corresponding to the ID according to the detection result, and replying identity distribution data to the control terminal; the identity assignment data may include identity information assigned to the ID; the identity information may include a master identity or a slave identity.
In the exemplary embodiment of the present application, after the electrical equipment system is powered on, the controlled equipment may enter a state capable of receiving an identity allocation request, so as to allocate an identity to a corresponding control terminal according to the request.
In an exemplary embodiment of the present application, the request may include data of the competing host identity, that is, the controlled device may determine, according to the data of the competing host identity, that the current controlled device is to compete for the host identity.
In an exemplary embodiment of the present application, the allocating an identity to the control terminal corresponding to the ID according to the detection result may include:
if no host has been assigned, a host identity may be assigned to the ID;
if a master has been assigned, a slave identity may be assigned to the ID.
In an exemplary embodiment of the present application, the method may further include:
after the slave identity is assigned to the ID, a slave address may be assigned to the ID, and the assigned slave identity and slave address may be returned to the control terminal by the identity assignment data.
In an exemplary embodiment of the present application, the controlled device may first detect whether a host identity is already currently assigned, and if the host identity is not already assigned, assign the host identity to the control terminal corresponding to the current ID, and send identity assignment data to the control terminal. The identity assignment data may include currently assigned identity information, e.g., a host identity. If the master identity is already allocated, allocating a slave identity to the control terminal corresponding to the current ID, and allocating a slave address to the control terminal, where the identity allocation data sent to the control terminal may include the slave identity and the allocated slave address.
In an exemplary embodiment of the present application, the identity assignment data returned by the controlled device to the control terminal may include an ID of the terminal, so as to send the identity assignment data to the correct control terminal.
In an exemplary embodiment of the present application, the control terminal may receive identity assignment data corresponding to an ID identifier corresponding to a self-provided ID to confirm assigned identity information and store the identity information.
In an exemplary embodiment of the present application, the method may further include:
when the received identity allocation request is checked for errors, timing can be started, and the allocation of identities for the plurality of control terminals can be stopped;
when the timing time length reaches the preset total time length TTotal period of timeThe timing can be reset, and the total time length T can be setTotal period of timeAnd adding 1 to the counted number of times, and re-receiving the identity distribution request sent by the control terminal.
In exemplary embodiments of the present application, T generated when two or more control terminals generateRandom numberIf the same, several sets of identity assignment request signals may be sent simultaneously, that is, multiple control terminals simultaneously send requests for assigning identities to controlled devices. Due to the uniqueness of the ID identification of each control terminal, the distribution request data message signals sent by the control terminals are overlapped, so that data verification is not passed, therefore, the internal machine cannot normally receive the distribution request data message, and correspondingly, the internal machine cannot perform identity distribution on the control terminal sending the distribution request data message, so that identity distribution data cannot be returned to the control terminals.
In the exemplary embodiment of the present application, in this case, the controlled apparatus may also set the total duration T in advanceTotal period of timeFor limiting the time at which identity assignment requests can be re-received. If the total duration T has been reachedTotal period of timeThen, it means that the request sent by any control terminal can be received again, if the total duration T is not reachedTotal period of timeIt means that the request sent by any control terminal cannot be received again because of the total duration TTotal period of timeIf the control terminal has not received the reply of the controlled equipment all the time, the control terminal can automatically judge that the controlled equipment has a fault, and can automatically send the request again without processing the last request. Therefore, during the total duration TTotal period of timeIn case of data failure (for example, multiple control terminals simultaneously send requests for identity assignment to controlled devices), the total duration T may be maintainedTotal period of timeIs not aligned at allAnd the control terminal replies to realize phase change informing of the fault of the controlled equipment terminal.
In an exemplary embodiment of the present application, the method may further include:
when the total duration T isTotal period of timeWhen the total number of times of statistics reaches n, the receiving of the identity allocation request sent by any control terminal can be stopped, and thus the allocation of the identity to the control terminal is stopped, wherein n is a positive integer greater than 1.
In the exemplary embodiment of the present application, the total time period T is setTotal period of timeOn the basis of (2), the total duration T can be set againTotal period of timeTo define the duration of time that the control terminal can apply for identity.
In the exemplary embodiment of the present application, the total duration T is reached each time the currently controlled terminal is in each caseTotal period of timeWhen the identity allocation request returned by the controlled equipment is not received yet, the random number can be generated again, and T is generated according to the random numberRandom numberAnd waiting for a transmission time TRandom numberThe identity assignment request is sent again when it arrives. The above operation can be executed circularly until the identity assigned by the controlled equipment is applied. However, if at n total durations TTotal period of timeIf the identity distribution request sent by any control terminal is not received, the control terminal can be determined to stop applying for identity distribution; therefore, the controlled equipment end can also stop identity distribution; wherein n may be a positive integer greater than 1.
In the exemplary embodiments of the present application, the value of n may be defined according to the requirement, and the value of n is not limited in detail herein.
In an exemplary embodiment of the present application, as shown in fig. 7, a schematic diagram of an automatic identity allocation method on a controlled device side is provided, which may include steps S401 to S411:
s401, powering on a system;
s402, detecting whether an identity assignment request sent by a control terminal is received? If so, go to step S403; if not, go to step S410;
s403, performing data verification on the identity allocation request;
s404, detecting whether the data check passes? If the data check is passed, the process goes to step S405; if the data verification fails, the step S408 is executed;
s405, detect whether a host identity has been assigned? If not, go to step S406, if already allocated, go to step S407;
s406, allocating a host identity to the control terminal corresponding to the ID contained in the identity allocation request, and returning to the step S402;
s407, distributing slave identity to the control terminal corresponding to the ID contained in the identity distribution request, distributing slave address, and returning to the step S402;
s408, starting a timing function;
s409, detecting whether the timing duration is more than or equal to TTotal period of timeIs there a If yes, returning to the step S402, if not, continuing timing and continuously detecting whether the timing duration T is metTotal period of time
S410, detecting the total time length TTotal period of timeIs the total number of statistics of (a) reached n? Total time length TTotal period of timeIf the total number of times of statistics does not reach n, returning to the step S402; total time length TTotal period of timeIf the total number of times of statistics reaches n, the step S411 is performed;
s411, stopping receiving the identity distribution request sent by any control terminal, and thus stopping distributing the identity for the control terminal.
The embodiment of the present application may further provide a controlled device 2, as shown in fig. 8, which may include: a second processor 21 and a second computer-readable storage medium 22, where the second computer-readable storage medium 22 may store a second instruction, and when the second instruction is executed by the second processor 21, the terminal identity allocating method may be implemented as any one of the above methods.
In the exemplary embodiment of the present application, any embodiment of the foregoing identity automatic allocation method applied to the controlled device side may be applied to the controlled device 2, and details are not repeated here. It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.

Claims (12)

1. A terminal identity distribution method is applied to a control terminal side, and comprises the following steps:
sending an identity distribution request to the controlled equipment, wherein the identity distribution request comprises an identity ID of the control terminal;
acquiring identity distribution data replied by the controlled equipment according to the identity distribution request; the identity allocation data includes identity information allocated to the ID by the controlled device; the identity information is used to indicate the assigned identity.
2. The terminal identity allocation method according to claim 1, wherein before sending the identity allocation request to the controlled device, the method further comprises:
generating a random number and the ID;
generating a wait-to-send time T for an identity assignment request based on the random numberRandom numberTo wait for the transmission time TRandom numberAnd when the identity distribution request arrives, sending the identity distribution request to the controlled equipment.
3. The terminal identity allocation method according to claim 2, wherein the method further comprises:
at a preset total duration TTotal period of timeThe random number is regenerated when the reply of the controlled equipment is not received, and the waiting sending time T is regeneratedRandom numberAnd sending the identity distribution request to the controlled equipment.
4. A terminal identity allocation method according to any one of claims 1-3, wherein the identity information comprises a master identity or a slave identity;
the method further comprises the following steps: storing the identity information; when the identity information is the identity of the slave, the identity information further comprises the address of the slave.
5. A terminal identity allocation method according to any one of claims 1 to 3, wherein the identity allocation request comprises: for competing for the host's data.
6. A control terminal comprising a first processor and a first computer readable storage medium having first instructions stored therein, wherein the first instructions, when executed by the first processor, implement the terminal identity assignment method according to any one of claims 1 to 5.
7. A terminal identity distribution method is applied to a controlled device side, and the method comprises the following steps:
receiving an identity allocation request sent by a control terminal, wherein the identity allocation request comprises an identity Identification (ID) of the control terminal;
detecting whether the host identity is distributed according to the identity distribution request;
distributing identities to the control terminals corresponding to the IDs according to the detection results, and replying identity distribution data to the control terminals; the identity distribution data comprises identity information distributed to the control terminal corresponding to the ID; the identity information is used to indicate the assigned identity; the identity information includes a master identity or a slave identity.
8. The terminal identity assigning method of claim 7, wherein the assigning the identity to the ID according to the detection result comprises:
if the host is not allocated, allocating a host identity to the control terminal corresponding to the ID;
and if the master is allocated, allocating slave identity to the control terminal corresponding to the ID.
9. The terminal identity allocation method according to claim 8, wherein the method further comprises:
and after the ID is allocated with the slave identity, allocating a slave address for the ID, and returning the slave identity and the slave address to the control terminal through the identity allocation data.
10. The terminal identity allocation method according to claim 7, wherein the method further comprises:
checking the received identity allocation request for errors, starting timing, and stopping allocating identities for the control terminal;
the timing time reaches the preset total time TTotal period of timeResetting the timing and the total time length TTotal period of timeAdds 1 to the counted number of times and receives the identity distribution request sent by the control terminal again.
11. The terminal identity allocation method according to claim 10, wherein the method further comprises:
the total duration TTotal period of timeWhen the number of times reaches n, stopping receiving the identity distribution request sent by the control terminal to stop distributing the identity for the control terminal, wherein n is a positive integer greater than 1.
12. A controlled device, comprising a second processor and a second computer-readable storage medium, wherein the second computer-readable storage medium stores second instructions, and when the second instructions are executed by the second processor, the terminal identity distribution method according to any one of claims 7 to 11 is implemented.
CN202110713190.1A 2021-06-25 2021-06-25 Terminal identity distribution method, control terminal and controlled equipment Pending CN113452698A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110713190.1A CN113452698A (en) 2021-06-25 2021-06-25 Terminal identity distribution method, control terminal and controlled equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110713190.1A CN113452698A (en) 2021-06-25 2021-06-25 Terminal identity distribution method, control terminal and controlled equipment

Publications (1)

Publication Number Publication Date
CN113452698A true CN113452698A (en) 2021-09-28

Family

ID=77812991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110713190.1A Pending CN113452698A (en) 2021-06-25 2021-06-25 Terminal identity distribution method, control terminal and controlled equipment

Country Status (1)

Country Link
CN (1) CN113452698A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103888504A (en) * 2013-09-18 2014-06-25 苏州硕穗光机电科技有限公司 Host computer and slave computer in intelligent household system and communication method thereof
CN104486457A (en) * 2014-12-11 2015-04-01 电信科学技术研究院 Address allocation method, address acquisition method, address allocation device, address acquisition device
CN104980428A (en) * 2015-04-28 2015-10-14 腾讯科技(深圳)有限公司 Network communication method, device and system
CN105554730A (en) * 2015-12-21 2016-05-04 联想(北京)有限公司 Communication method, server and terminal
CN106453246A (en) * 2016-08-30 2017-02-22 北京小米移动软件有限公司 Equipment identity information distribution method, device and system
CN107168774A (en) * 2017-06-14 2017-09-15 北京云联万维技术有限公司 It is a kind of based on the virtual machine migration method being locally stored and system
CN112597474A (en) * 2020-12-16 2021-04-02 佛山市顺德区美的电子科技有限公司 Identity determination method, control method and system, storage medium and terminal equipment
CN112753276A (en) * 2020-06-16 2021-05-04 深圳市大疆创新科技有限公司 Role control method, device and equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103888504A (en) * 2013-09-18 2014-06-25 苏州硕穗光机电科技有限公司 Host computer and slave computer in intelligent household system and communication method thereof
CN104486457A (en) * 2014-12-11 2015-04-01 电信科学技术研究院 Address allocation method, address acquisition method, address allocation device, address acquisition device
CN104980428A (en) * 2015-04-28 2015-10-14 腾讯科技(深圳)有限公司 Network communication method, device and system
CN105554730A (en) * 2015-12-21 2016-05-04 联想(北京)有限公司 Communication method, server and terminal
CN106453246A (en) * 2016-08-30 2017-02-22 北京小米移动软件有限公司 Equipment identity information distribution method, device and system
CN107168774A (en) * 2017-06-14 2017-09-15 北京云联万维技术有限公司 It is a kind of based on the virtual machine migration method being locally stored and system
CN112753276A (en) * 2020-06-16 2021-05-04 深圳市大疆创新科技有限公司 Role control method, device and equipment
CN112597474A (en) * 2020-12-16 2021-04-02 佛山市顺德区美的电子科技有限公司 Identity determination method, control method and system, storage medium and terminal equipment

Similar Documents

Publication Publication Date Title
KR101382161B1 (en) Network access method and system for machine type communications
KR102040072B1 (en) Linkage establishment method and device
CN107148086B (en) Information interaction method and device, distributed unit and computer storage medium
CN102439949A (en) Method for solving internet protocol address assignment conflict and related device and system
EP3800853A1 (en) Address management method and device
CN107041010B (en) Method, base station and mobile terminal for realizing service access
CN110708400B (en) Network address allocation method, device, node equipment and storage medium
EP3291592A1 (en) Monitoring management method and apparatus
CN115314470A (en) RS-485 networking communication address automatic allocation method, host, slave and system
CN105338129B (en) Automatic address division method, display terminal and module terminal
CN102355510B (en) Medium/media access control (MAC) address allocation method, device and system
CN110769078B (en) Address allocation method and system
CN111597123A (en) Automatic address allocation method, device, computer equipment and storage medium
CN114585026A (en) Frequency point switching method, terminal, base station and storage medium
CN113452698A (en) Terminal identity distribution method, control terminal and controlled equipment
CN111741143B (en) Method and device for on-line distribution of Modbus addresses of electrical measuring instrument
CN115470165A (en) Address allocation method, battery management system and electronic equipment
KR100719302B1 (en) A method and apparatus for dynamically determining an address uniquely identifying a hardware component on a common bus
CN109981822B (en) Alternative address allocation method based on DHCP detection, storage medium and terminal
CN113132498A (en) Message processing method, relay equipment, system and storage medium
CN116527638B (en) Slave address automatic allocation method based on CAN bus communication
CN110855465B (en) Message processing method and device
CN113612868A (en) Equipment address allocation method, device and system
CN117544596B (en) Automatic address allocation method for telemetry system, telemetry system and storage medium
CN112888063A (en) Remote terminal network access method, system, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210928

RJ01 Rejection of invention patent application after publication