CN114039849A - Equipment parameter modification method and device, electronic equipment and storage medium - Google Patents

Equipment parameter modification method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114039849A
CN114039849A CN202111237827.0A CN202111237827A CN114039849A CN 114039849 A CN114039849 A CN 114039849A CN 202111237827 A CN202111237827 A CN 202111237827A CN 114039849 A CN114039849 A CN 114039849A
Authority
CN
China
Prior art keywords
equipment
access
identification
access equipment
library
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
CN202111237827.0A
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.)
Guangdong Yuanyuan Technology Co ltd
Guilin Credit Suisse Information Technology Co ltd
Shandong Shangshi Internet Of Things Co ltd
Yuanmei Zhikong Guangdong Co ltd
Shenzhen Yixin Semiconductor Co ltd
Original Assignee
Guangdong Yuanyuan Technology Co ltd
Guilin Credit Suisse Information Technology Co ltd
Shandong Shangshi Internet Of Things Co ltd
Yuanmei Zhikong Guangdong Co ltd
Shenzhen Yixin Semiconductor 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 Guangdong Yuanyuan Technology Co ltd, Guilin Credit Suisse Information Technology Co ltd, Shandong Shangshi Internet Of Things Co ltd, Yuanmei Zhikong Guangdong Co ltd, Shenzhen Yixin Semiconductor Co ltd filed Critical Guangdong Yuanyuan Technology Co ltd
Priority to CN202111237827.0A priority Critical patent/CN114039849A/en
Publication of CN114039849A publication Critical patent/CN114039849A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0846Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure provides a device parameter modification method, apparatus, electronic device and storage medium, when an access device is detected, a recognition algorithm and a recognition library of the access device are requested from a cloud, where the recognition library is used to support the recognition algorithm; loading the identification algorithm and the identification library of the access equipment received from the cloud, and searching equipment based on the loaded identification algorithm and identification library of the access equipment; after the access equipment is identified through the equipment search result, the serial port parameters of the access equipment are modified to be consistent with the set parameters of the central station, and the address of the access equipment is modified according to a segment self-increment method. The invention can remotely modify the serial port parameters of the equipment and improve the working efficiency.

Description

Equipment parameter modification method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of agricultural Internet of things, in particular to a method and a device for modifying equipment parameters, electronic equipment and a storage medium.
Background
A system often need insert the serial ports equipment of a lot of different producers, different grade type, for example can insert soil moisture content sensor, light sensor, air velocity transducer, fan controller etc. below the wisdom irrigation wisdom cloud valve, be used for realizing environmental parameter linkage valve, fan automatic control function. And for example, an electric meter, a temperature and humidity sensor, an ammonia gas sensor, a CO2 sensor, a fan controller and the like can be connected below the intelligent culture controller to realize the functions of environment monitoring and early warning. Because the serial port equipment has no unified standard, the serial port parameters such as the baud rate, the check bit and the like are not unified, and the equipment address can also have conflict, the serial port parameters such as the baud rate, the check bit, the equipment address and the like need to be read and changed by upper computer software on a street computer in advance before the equipment is accessed into a system, and the equipment with the changed parameters needs to be manually represented and distinguished, so that the problem that the conflict is caused when two or more substation equipment with the same address is accessed under the same bus is avoided, the bus communication function is influenced, and the instruction cannot be correctly received and responded.
Disclosure of Invention
The embodiment of the invention provides a method and a device for modifying equipment parameters, electronic equipment and a storage medium, which can solve the problems that parameters such as baud rate, check bits and the like of the conventional serial equipment are not uniform.
In a first aspect, an embodiment of the present invention provides an apparatus parameter modification method, where the method includes:
when the access equipment is detected, requesting an identification algorithm and an identification library of the access equipment from a cloud end, wherein the identification library is used for supporting the identification algorithm;
loading the identification algorithm and the identification library of the access equipment received from the cloud, and searching equipment based on the loaded identification algorithm and identification library of the access equipment;
after the access equipment is identified through the equipment search result, the serial port parameters of the access equipment are modified to be consistent with the bus setting parameters, and the address of the access equipment is modified according to a segment self-increment method.
Further, before the requesting, when an access device is detected, an identification algorithm and an identification library of the access device from a cloud, the identification library being used for supporting the identification algorithm, the method further includes:
counting the distribution condition of the equipment parameters in the current library;
and sequencing according to the equipment parameter distribution to form a priority identification algorithm.
Further, the device parameters include at least one of baud rate, check bit, data bit, stop bit, default address, and register address, the device parameter distribution of all devices is counted, and the device parameter distribution is sorted to form a priority identification algorithm, including:
and counting baud rates, check bits, data bits, stop bits, default addresses and register addresses of all the devices, and sequencing according to the counting result to form a priority identification algorithm.
Further, the loading the identification algorithm and the identification library of the access device received from the cloud, and performing device search based on the loaded identification algorithm and the loaded identification library of the access device includes:
acquiring and loading an identification algorithm and an identification library of the access equipment issued by a cloud;
modifying the bus parameters and the equipment address of the access equipment, and sending a data instruction for inquiring the address of the first register;
and when a response result of the data instruction for inquiring the first register address is received, determining a device search result according to the response result.
Further, after the modifying the bus parameter and the device address of the access device and sending the query register data instruction, the method further includes:
and when the response result of the data instruction for inquiring the register is not received, continuously modifying the bus parameters and the equipment address of the access equipment, and continuously sending the data instruction for inquiring the first register address until the response result of the data instruction for inquiring the first register data address is received.
Further, when a response result of the query register data instruction is received, determining a device search result according to the response result, including:
when a response result of the register data query instruction is received, if the name and the model of the access equipment are selected by a user, determining the response result as an equipment search result;
if the user does not select the name and the model of the access equipment, analyzing the response result, and judging whether the unique feature can be matched according to the data type and the value range obtained by analysis;
and if the unique characteristics can be matched, determining that the response result is an equipment search result, otherwise, sending a data instruction for inquiring the second register address until receiving the response result of the data instruction for inquiring the second register address.
Further, when the access device is detected, requesting the identification algorithm and the identification library of the access device from the cloud, including:
when detecting access equipment, sending an equipment access request to a cloud end, wherein the equipment access request comprises an identification algorithm and identification library request and a name and model acquisition request of the access equipment, the name and model acquisition request of the access equipment is used for requesting the name and model of the access equipment to a user, and the name and model of the access equipment are used for matching the identification algorithm and identification library of the access equipment.
In a second aspect, an apparatus for modifying device parameters is provided, the apparatus comprising:
the system comprises a request module, a recognition module and a recognition module, wherein the request module is used for requesting a recognition algorithm and a recognition library of an access device from a cloud when the access device is detected, and the recognition library is used for supporting the recognition algorithm;
the searching module is used for loading the identification algorithm and the identification library of the access equipment received from the cloud end and searching equipment based on the loaded identification algorithm and identification library of the access equipment;
and the modification module is used for modifying the serial port parameters of the access equipment to be consistent with the equipment search result after the access equipment is identified through the equipment search result, and modifying the access equipment according to a segment self-increment method.
In a third aspect, an electronic device is provided, including: the device parameter modification method comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the steps of the device parameter modification method according to any one of the embodiments of the invention.
In a fourth aspect, a computer readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, implements the steps in the device parameter modification method according to any one of the embodiments of the present invention.
In the embodiment of the invention, when the access equipment is detected, an identification algorithm and an identification library of the access equipment are requested from a cloud end, wherein the identification library is used for supporting the identification algorithm; loading the identification algorithm and the identification library of the access equipment received from the cloud, and searching equipment based on the loaded identification algorithm and identification library of the access equipment; after the access equipment is identified through the equipment search result, the serial port parameters of the access equipment are modified to be consistent with the bus setting parameters, and the address of the access equipment is modified according to a segment self-increment method. According to the embodiment of the invention, the method for remotely modifying the serial port parameters of the substation equipment can be used, the processes of equipment identification, parameter modification, parameter maintenance and the like are realized by virtue of the cloud end and the cloud valve end of the Internet of things, the operation is automatic, the difficulty in installation and debugging and later maintenance of the equipment is greatly reduced, and the working efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for modifying device parameters according to an embodiment of the present invention;
fig. 2 is a flowchart of a device for searching for a model without selecting a device name according to an embodiment of the present invention;
fig. 3 is a flowchart of a device name model selected search device according to an embodiment of the present invention;
fig. 4 is a flowchart of a post-maintenance device replacement according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus parameter modification device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present invention and should not be construed as limiting the present invention, and all other embodiments that can be obtained by one skilled in the art based on the embodiments of the present invention without inventive efforts shall fall within the scope of protection of the present invention.
In the description of the present invention, it is to be understood that the terms "central," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "circumferential," "radial," and the like are used in the orientations and positional relationships indicated in the drawings for convenience in describing the present invention and to simplify the description, and are not intended to indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and are therefore not to be considered limiting of the present invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, "above" or "below" a first feature means that the first and second features are in direct contact, or that the first and second features are not in direct contact but are in contact with each other via another feature therebetween. Also, the first feature being "on," "above" and "over" the second feature includes the first feature being directly on and obliquely above the second feature, or merely indicating that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature includes the first feature being directly under and obliquely below the second feature, or simply meaning that the first feature is at a lesser elevation than the second feature.
Referring to fig. 1, fig. 1 is a method for controlling device parameter modification according to the present application, the method including:
101. and when the access equipment is detected, requesting the identification algorithm and the identification library of the access equipment from the cloud.
In the embodiment of the invention, when the cloud electrically operated valve detects the access device, the cloud electrically operated valve requests the identification algorithm and the identification library of the access device from the cloud, the access device is a sub device (also called as a substation device) for accessing the cloud electrically operated valve, the cloud electrically operated valve can provide an RS485 interface, can access all RS485 serial port devices, and is used as a main device (also called as a main station device).
In the embodiment of the present invention, RS485 was a new balanced transmission standard approved by the american Electronic Industries Association (EIA) in 1983. The wireless receiving device has the main advantages of long-distance link, longest length of 4000 feet, differential signal transmission, strong anti-interference capability, capability of connecting a plurality of receiving sub-devices with the same bus and the like. And the electrical attribute of the RS-485 bus is utilized, and the address is distributed and the equipment is identified by combining a software protocol.
In the embodiment of the invention, the cloud is a software platform adopting an application virtualization technology, and integrates multiple functions of software searching, downloading, using, managing, backing up and the like.
In the embodiment of the present invention, the recognition library is used for supporting the recognition algorithm. The identification algorithm and the identification library are issued to the cloud electric valve through the cloud end, and the identification rate can be continuously expanded under the condition that cloud end equipment is not upgraded. The participation process of the user is increased, the name and the model of the accessed serial port equipment can be selected, the identification range is narrowed, and the identification speed is improved.
Specifically, when the access device is connected to the cloud electric valve, the cloud electric valve identifies the connected device through the electric signal, reports the event to the cloud end, pushes the event to the APP to prompt a user that the device is connected, and please select the name and the model of the connected device.
Further, before the above-mentioned detecting the access device, requesting the cloud for the identification algorithm and the identification library of the access device, where the identification library is used to support the identification algorithm, the present invention further includes: counting the distribution condition of equipment parameters; and sequencing according to the equipment parameter distribution to form a priority identification algorithm.
In the embodiment of the present invention, the device parameter may be preset data used as a reference, and the device parameter includes a baud rate, a check bit, a data bit, a stop bit, a default address, a register address, and the like.
In the embodiment of the present invention, the baud rate is a rate of a single chip microcomputer or a computer during serial port communication, and refers to a change of a signal in a unit time after being modulated, that is, the number of times of carrier parameter changes in the unit time, for example, 240 characters are transmitted per second, each character format includes 10 bits (1 start bit, 1 stop bit, 8 data bits), the baud rate is 240Bd, and the bit rate is 10 bits × 240 bits/second — 2400 bps. For example, 240 binary bits are transmitted per second, with a baud rate of 240Bd and a bit rate of 240 bps. (but typically the modulation rate is greater than the baud rate, such as manchester encoding). Baud rate, which can be understood colloquially as how many symbols of data a device transmits (or receives) in one second. It is a measurement of the symbol transmission rate, 1 baud means that 1 symbol is transmitted per second (by different modulation methods, multiple bit information can be loaded on one symbol), and 1 bit per second means that 1 bit (bit) is transmitted per second. The unit "Baud" itself already represents the number of modulations per second, and is a common error in units of Baud per second (Baud per second).
In the embodiment of the present invention, the check bit is a data bit that can be considered as a special data bit, and the received data bit is generally determined by using a similar method to determine whether there is an error, and is generally a parity check, which is usually cancelled during the use process.
In the embodiment of the invention, the data bit is a data bit which is the most important data bit in each group of data transmitted by a modem on a line and contains corresponding control data, including start sending data and end data. Different numbers of data bits and end bits are typically specified for different communication environments. In the receiver process, data bits can be obtained in three ways, the first is obtained in advance by using an externally assisted data link (such as a mobile communication network); the second is that the stored message is used for realizing data stripping by utilizing the periodicity of the navigation message, and the method is invalid when the message is updated; the third method is to estimate the data bits using the integration result (or demodulation result) of the live tributary, thereby achieving data stripping.
In an embodiment of the present invention, the stop bit is a bit for marking the end of a character transmission. There are two states in common on the signal line, which can be distinguished by a logic 1 (high level) and a logic 0 (low level), respectively. The data line should remain in a logic high state while sending its idle. The stop bit is the last to mark the end of the run of a character, which corresponds to the state of a logic 1. The high level refers to a minimum input high level allowed by ensuring that the input of the logic gate is a high voltage among the logic levels, and when the input level is higher than the input high voltage, the input level is considered as a high level. In a digital logic circuit, a low level indicates 0, and a high level indicates 1. Generally, the low level is 0-2.25V and the high level is 3.5-5V.
In the embodiment of the present invention, the default address may be an address set in advance, or a fixed address.
In an embodiment of the present invention, the register address is a high-speed storage unit with limited storage capacity, which can be used to temporarily store instructions, data and addresses. The register is a component of the CPU, and because the register is in the CPU, the CPU has the fastest read-write speed and does not need IO transmission. But at the same time it has been decided that the number of such registers is very limited, to the extent that almost every store has its own name, and some have multiple names. The register mainly has the functions of: the data in the register may be subject to arithmetic and logical operations; the address stored in the register can be used to point to a certain location of the memory, i.e. addressing; can be used to read and write data to the peripheral equipment of the computer.
It should be noted that, the device priority identification algorithm is formed by summing up and sorting the statistical device parameter distribution, the baud rate, the check bit, the data bit, the stop bit, the default address and the register address which are commonly used by the statistical device.
Further, the above requesting, from the cloud, the identification algorithm and the identification library of the access device when the access device is detected includes:
when the cloud electrically operated valve detects an access device, sending a device access request to a cloud end, wherein the device access request comprises a recognition algorithm and recognition base request and a name and model acquisition request of the access device, the name and model acquisition request of the access device is used for requesting the name and model of the access device to a user, and the name and model of the access device are used for matching the recognition algorithm and recognition base of the access device.
Further, the device parameters include at least one of baud rate, check bit, data bit, stop bit, default address, and register address, the device parameter distribution of all devices is counted, and the device parameter distribution is sorted to form a priority identification algorithm, including:
and counting baud rates, check bits, data bits, stop bits, default addresses and register addresses of all the devices, and sequencing according to the counting result to form a priority identification algorithm.
In the embodiment of the invention, the identification algorithm is formed by sequencing through inducing and counting the common baud rate, the check bit, the data bit, the stop bit, the default address and the register address of the equipment. And modifying the baud rate, the check bit, the data bit and the stop bit of the serial port of the bus in sequence through a traversal algorithm, sending an instruction to a traversal address, determining the correct baud rate, the check bit, the data bit, the stop bit and the equipment address according to whether a response exists, and determining the name and the model of the equipment according to the response content.
102. And loading the identification algorithm and the identification library of the access equipment received from the cloud, and searching the equipment based on the loaded identification algorithm and identification library of the access equipment.
In the embodiment of the invention, the cloud electrically operated valve loads the identification algorithm and the identification library of the access equipment received from the cloud end, when the equipment is accessed to the cloud end, the accessed equipment is identified through an electric signal, the event is reported to the cloud end and pushed to the APP to prompt a user that the equipment is accessed, the name and the model of the accessed equipment are selected, and the equipment searching process is started. In the identification process, the APP interface and the cloud electric valve screen display the identification step and the current progress, so that a user can make a best use of the identification step and the current progress, and long-time waiting is avoided.
Further, the loading the identification algorithm and the identification library of the access device received from the cloud, and performing device search based on the loaded identification algorithm and the loaded identification library of the access device includes: acquiring and loading an identification algorithm and an identification library of the access equipment issued by a cloud; modifying the bus parameters and the equipment address of the access equipment, and sending a data instruction for inquiring the address of the first register; and when a response result of the data instruction for inquiring the first register address is received, determining a device search result according to the response result.
In the embodiment of the invention, after the equipment is identified, the serial port parameters of the equipment are modified to be consistent, the equipment address is segmented according to the type/use of the equipment, the equipment address is modified by self-increment according to the segments to avoid conflict, and the equipment address is bound with the serial number of the main equipment (the cloud electric valve).
In the embodiment of the invention, bus parameters such as baud rate, check bits and the like are modified according to the algorithm and the weight, for example, the bus parameters are modified into 9600,8, n and 1. The query register data instruction is then sent to the first priority address (e.g., 0x 01). If the response is received, the serial port parameter and the address are correct, otherwise, the process of modifying the bus parameter and the address is returned, the bus parameter and the address are modified into the next value, and the inquiry instruction is continuously sent.
Further, after the modifying the bus parameter and the device address of the access device and sending the query register data instruction, the method further includes:
and when the response result of the data instruction for inquiring the first register address is not received, continuously modifying the bus parameters and the equipment address of the access equipment, and continuously sending the data instruction for inquiring the first register address until the response result of the data instruction for inquiring the first register data address is received.
Referring to fig. 2, fig. 2 is a flowchart of a method for searching for a device without selecting a device name model according to the present application:
s200, identifying equipment insertion;
s201, prompting that new equipment is inserted and whether to start searching;
s202, issuing an identification algorithm and an identification library to a cloud electric valve at a cloud end and carrying out initial work;
s203, modifying the check bit, the baud rate, the data bit and the stop bit of the RS485 serial port;
s204, modifying the address to addr;
s205, sending a query x register according to a standard Modbus protocol;
in the embodiment of the present invention, x may be 1,2,3,4,5,6 … …
S206, whether a response is made or not; if so, entering step S207; if no response is made, go to step S210;
s207, determining the model of the equipment according to the characteristics such as value range, type and the like; if the model is determined, go to step S212; if not, go to step S208;
s208, x > max (x); if x > max (x), proceeding to step S211, if not, proceeding to step S205;
s209, addr > max (addr); if addr > max (addr) is true, the step S212 is proceeded, if not, the step S204 is proceeded;
s210, whether the serial port parameters are traversed or not is finished; if the serial port parameter traversal is completed, the step S212 is entered; if not, the process proceeds to step S203.
And S211, ending and failing to search.
And S212, finishing and successfully searching.
In the embodiment of the invention, if the user does not select the name and the model, the cloud end issues all the recorded identification algorithms and identification libraries to the cloud electric valve, otherwise, the cloud end only issues the equipment identification algorithms and identification libraries. And then, carrying out an initialization process before searching on the cloud electric valve, and loading an identification algorithm and an identification library.
Referring to fig. 3, fig. 3 is a flow method for searching for a device with a selected device name model according to the present invention:
s300, identifying equipment insertion;
s301, prompting that new equipment is inserted, and guiding a user to select the name and the model of the equipment;
s302, issuing an identification algorithm and an identification library to a cloud electric valve by a cloud end and carrying out initial work;
s303, modifying the check bit, the baud rate, the data bit and the stop bit of the RS485 serial port;
s304, modifying the address to addr;
in this embodiment of the present invention, the addr may be an address name.
S305, sending a query instruction according to an equipment protocol;
s306, whether a response is made or not; if so, entering step S310; if no response is made, the step S307 is carried out;
s307, addr is greater than max (addr); if addr > max (addr) is true, go to step S308; if not, entering step S304;
s308, whether the serial port parameters are traversed or not is finished; if the serial port parameter traversal is completed, the step S309 is entered; if not, the step S303 is executed;
and S309, ending and failing to search.
And S310, finishing and finishing searching.
In the embodiment of the invention, when the response is received, if the user selects the name and the model of the equipment, the search is successful (the serial port parameters and the address data of the equipment are determined), and the process is ended; otherwise, analyzing the response data, judging whether the unique characteristics can be matched according to the type and the value range of the data, if so, successfully searching (determining the name, the model, the serial port parameters and the address data of the equipment), and ending the process; otherwise, continuing to send the instruction for inquiring the next register address.
103. After the access device is identified through the device search result, the serial port parameters of the access device are modified to be consistent with the bus setting parameters, and the address of the access device is modified according to a segment self-increment method.
In the embodiment of the invention, after the access equipment is identified through the equipment search result, the serial port parameters of the access equipment are modified to be consistent with the bus setting parameters, and the access equipment is modified according to a section self-increment method. Specifically, when the device parameter is modified, according to the principle of unified serial port parameter, address segment management and accumulation of multiple device addresses of the same model, if the device is replaced, the device address is changed into the address of the replaced device, and if the device is newly added, the device address is changed into the maximum value of the currently accessed device address plus 1.
Referring to fig. 4, fig. 4 is a method of a post-maintenance equipment replacement flow:
s400, searching equipment;
s401, remotely modifying the baud rate, the check bit, the data bit and the stop bit of the equipment;
s402, remotely modifying the equipment address into a replaced equipment address;
and S403, finishing and saving the log.
In the embodiment of the invention, the main station equipment is remotely controlled through a cloud algorithm and an identification library to quickly search and identify the substation equipment, the serial port parameters of the substation equipment are remotely modified through cloud configuration, and the serial number of the main station equipment and the new address information of the substation equipment are bound for later maintenance and replacement.
In the embodiment of the invention, when the access equipment is detected, an identification algorithm and an identification library of the access equipment are requested from a cloud end, wherein the identification library is used for supporting the identification algorithm; loading the identification algorithm and the identification library of the access equipment received from the cloud, and searching equipment based on the loaded identification algorithm and identification library of the access equipment; after the access equipment is identified through the equipment search result, the serial port parameters of the access equipment are modified to be consistent with the bus setting parameters, and the address of the access equipment is modified according to a segment self-increment method. According to the embodiment of the invention, the method for remotely modifying the serial port parameters of the substation equipment can be used, the processes of equipment identification, parameter modification, parameter maintenance and the like are realized by virtue of the cloud end and the cloud valve end of the Internet of things, the operation is automatic, the difficulty in installation and debugging and later maintenance of the equipment is greatly reduced, and the working efficiency is improved.
Referring to fig. 5, fig. 5 is a device for modifying device parameters provided by the present application, the device including:
a request module 501, configured to, when an access device is detected, request a cloud for an identification algorithm and an identification library of the access device, where the identification library is used to support the identification algorithm;
a searching module 502, configured to load the identification algorithm and the identification library of the access device received from the cloud, and perform device search based on the loaded identification algorithm and identification library of the access device;
a modifying module 503, configured to modify the serial port parameter of the access device to be consistent with the bus setting parameter after the access device is identified according to the device search result, and modify the address of the access device according to a segment self-increment method.
Further, before the requesting module 501, the apparatus further includes:
the statistical module is used for counting the distribution of the equipment parameters;
and the sequencing module is used for sequencing according to the equipment parameters to form a priority identification algorithm.
Furthermore, the device parameters include at least one of baud rate, check bits, data bits, stop bits, default addresses and register addresses, the device parameters of all the devices are counted, and the sorting module is further configured to count the baud rates, the check bits, the data bits, the stop bits, the default addresses and the register addresses of all the devices and sort according to a counting result to form a priority identification algorithm.
Further, the searching module 502 includes:
the acquisition unit is used for acquiring and loading the identification algorithm and the identification library of the access equipment transmitted by the cloud end;
the sending unit is used for modifying the bus parameters and the equipment address of the access equipment and sending a data instruction for inquiring the address of the first register;
and the determining unit is used for determining a device search result according to the response result when the response result of the data instruction for inquiring the first register address is received.
Further, after the sending unit, the searching module 502 further includes:
and the query unit is used for continuously modifying the bus parameters and the equipment address of the access equipment and continuously sending the data instruction for querying the first register address until the response result of the data instruction for querying the first register data address is received when the response result of the data instruction for querying the register data address is not received.
Further, the determination unit includes:
a determining subunit, configured to, when a response result of the query register data instruction is received, determine that the response result is an apparatus search result if the user selects the name and the model of the access apparatus;
the judging subunit is used for analyzing the response result if the user does not select the name and the model of the access equipment, and judging whether the unique feature can be matched according to the data type and the value range obtained by analysis;
and the query subunit is configured to determine that the response result is an apparatus search result if the unique feature can be matched, and otherwise, send a data instruction for querying the second register address until the response result for querying the data instruction for the second register address is received.
Further, the request module 501 is further configured to send a device access request to the cloud when detecting an access device, where the device access request includes a request for an identification algorithm and an identification library and a request for obtaining a name and a model of the access device, the request for obtaining the name and the model of the access device is used to request a user for the name and the model of the access device, and the name and the model of the access device are used to match the identification algorithm and the identification library of the access device.
In the embodiment of the invention, when the access equipment is detected, an identification algorithm and an identification library of the access equipment are requested from a cloud end, wherein the identification library is used for supporting the identification algorithm; loading the identification algorithm and the identification library of the access equipment received from the cloud, and searching equipment based on the loaded identification algorithm and identification library of the access equipment; after the access equipment is identified through the equipment search result, the serial port parameters of the access equipment are modified to be consistent with the bus setting parameters, and the address of the access equipment is modified according to a segment self-increment method. According to the embodiment of the invention, the method for remotely modifying the serial port parameters of the substation equipment can be used, the processes of equipment identification, parameter modification, parameter maintenance and the like are realized by virtue of the cloud end and the cloud valve end of the Internet of things, the operation is automatic, the difficulty in installation and debugging and later maintenance of the equipment is greatly reduced, and the working efficiency is improved.
An embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, and the computer program makes a computer execute part or all of the steps of any one of the device parameter modification methods described in the above method embodiments.
Embodiments of the present invention also provide an electronic device, which includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform part or all of the steps of any one of the device parameter modification methods described in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are exemplary embodiments and that the acts and modules illustrated are not necessarily required to practice the invention.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software program module.
The integrated units, if implemented in the form of software program modules and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a memory and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above embodiments of the present invention are described in detail, and the principle and the implementation of the present invention are explained by applying specific embodiments, and the above description of the embodiments is only used to help understanding the method of the present invention and the core idea thereof; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for modifying device parameters, the method comprising:
when the access equipment is detected, requesting an identification algorithm and an identification library of the access equipment from a cloud end, wherein the identification library is used for supporting the identification algorithm;
loading the identification algorithm and the identification library of the access equipment received from the cloud, and searching equipment based on the loaded identification algorithm and identification library of the access equipment;
after the access equipment is identified through the equipment search result, the serial port parameters of the access equipment are modified to be consistent with the set parameters of the central station, and the address of the access equipment is modified according to a segment self-increment method.
2. The method of claim 1, wherein prior to said requesting an identification algorithm and an identification library of an access device from a cloud when the access device is detected, the identification library being used to support the identification algorithm, the method further comprises:
counting the distribution condition of the equipment parameters in the current library;
and sequencing according to the equipment parameter distribution to form a priority identification algorithm.
3. The method of claim 2, wherein the device parameters include at least one of baud rate, check bits, data bits, stop bits, default addresses, and register addresses, the device parameter distributions of all the devices are counted, and the device parameter distributions are sorted according to the order to form a priority identification algorithm, including:
and counting baud rates, check bits, data bits, stop bits, default addresses and register addresses of all the devices, and sequencing according to the counting result to form a priority identification algorithm.
4. The method of claim 1, wherein the loading the identification algorithm and the identification library of the access device received from the cloud, and performing a device search based on the loaded identification algorithm and the identification library of the access device comprises:
acquiring and loading an identification algorithm and an identification library of the access equipment issued by a cloud;
modifying the bus parameters and the equipment address of the access equipment, and sending a data instruction for inquiring the address of the first register;
and when a response result of the data instruction for inquiring the first register address is received, determining a device search result according to the response result.
5. The method of claim 4, wherein after the modifying the bus parameters and device address of the access device and sending the query register data instruction, the method further comprises:
and when the response result of the data instruction for inquiring the register is not received, continuously modifying the bus parameters and the equipment address of the access equipment, and continuously sending the data instruction for inquiring the first register address until the response result of the data instruction for inquiring the first register data address is received.
6. The method of claim 4, wherein determining device search results from response results of the query register data instruction when the response results are received comprises:
when a response result of the register data query instruction is received, if the name and the model of the access equipment are selected by a user, determining the response result as an equipment search result;
if the user does not select the name and the model of the access equipment, analyzing the response result, and judging whether the unique feature can be matched according to the data type and the value range obtained by analysis;
and if the unique characteristics can be matched, determining that the response result is an equipment search result, otherwise, sending a data instruction for inquiring the second register address until receiving the response result of the data instruction for inquiring the second register address.
7. The method of claim 6, wherein requesting the identification algorithm and identification library of the access device from a cloud when the access device is detected comprises:
when detecting access equipment, sending an equipment access request to a cloud end, wherein the equipment access request comprises an identification algorithm and identification library request and a name and model acquisition request of the access equipment, the name and model acquisition request of the access equipment is used for requesting the name and model of the access equipment to a user, and the name and model of the access equipment are used for matching the identification algorithm and identification library of the access equipment.
8. An apparatus for modifying device parameters, the apparatus comprising:
the system comprises a request module, a recognition module and a recognition module, wherein the request module is used for requesting a recognition algorithm and a recognition library of an access device from a cloud when the access device is detected, and the recognition library is used for supporting the recognition algorithm;
the searching module is used for loading the identification algorithm and the identification library of the access equipment received from the cloud end and searching equipment based on the loaded identification algorithm and identification library of the access equipment;
and the modification module is used for modifying the serial port parameters of the access equipment to be consistent with the bus setting parameters and modifying the address of the access equipment according to a segment self-increment method after the access equipment is identified through the equipment search result.
9. An electronic device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps in the device parameter modification method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps in the device parameter modification method according to any one of claims 1 to 7.
CN202111237827.0A 2021-10-25 2021-10-25 Equipment parameter modification method and device, electronic equipment and storage medium Pending CN114039849A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111237827.0A CN114039849A (en) 2021-10-25 2021-10-25 Equipment parameter modification method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111237827.0A CN114039849A (en) 2021-10-25 2021-10-25 Equipment parameter modification method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114039849A true CN114039849A (en) 2022-02-11

Family

ID=80141794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111237827.0A Pending CN114039849A (en) 2021-10-25 2021-10-25 Equipment parameter modification method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114039849A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114690880A (en) * 2022-03-30 2022-07-01 广东源泉科技有限公司 Heat metering system control method and related equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19904090A1 (en) * 1999-02-02 2000-08-03 Wolf Gmbh Richard Means for automatic control and management of a number of medical devices or equipment placed in a number of theatres or wards around a hospital having a network and control computer, relates particularly to endoscopic devices
EP1134632A2 (en) * 2000-03-17 2001-09-19 Heidelberger Druckmaschinen Aktiengesellschaft Device for recognizing function units
CN105577496A (en) * 2016-03-03 2016-05-11 烽火通信科技股份有限公司 System of home gateway for identifying access device type via cloud platform
CN106713045A (en) * 2016-12-30 2017-05-24 上海浦东软件园汇智软件发展有限公司 Terminal device driving component configuration method and device
CN109905292A (en) * 2019-03-12 2019-06-18 北京奇虎科技有限公司 A kind of terminal device recognition methods, system and storage medium
CN111031562A (en) * 2019-12-11 2020-04-17 迈赫机器人自动化股份有限公司 Wireless terminal access and identification method and system based on ad hoc network
CN111131533A (en) * 2019-11-29 2020-05-08 中煤科工集团重庆研究院有限公司 Automatic address allocation method for serial communication system
CN112448850A (en) * 2020-11-13 2021-03-05 深圳市凯沃尔电子有限公司 Method for identifying and configuring network access equipment
CN113055501A (en) * 2019-12-28 2021-06-29 浙江宇视科技有限公司 Method and device for configuring IP address in series through network port
CN113301182A (en) * 2021-05-26 2021-08-24 绵阳市维博电子有限责任公司 Networking communication system based on PLC bus

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19904090A1 (en) * 1999-02-02 2000-08-03 Wolf Gmbh Richard Means for automatic control and management of a number of medical devices or equipment placed in a number of theatres or wards around a hospital having a network and control computer, relates particularly to endoscopic devices
EP1134632A2 (en) * 2000-03-17 2001-09-19 Heidelberger Druckmaschinen Aktiengesellschaft Device for recognizing function units
CN105577496A (en) * 2016-03-03 2016-05-11 烽火通信科技股份有限公司 System of home gateway for identifying access device type via cloud platform
CN106713045A (en) * 2016-12-30 2017-05-24 上海浦东软件园汇智软件发展有限公司 Terminal device driving component configuration method and device
CN109905292A (en) * 2019-03-12 2019-06-18 北京奇虎科技有限公司 A kind of terminal device recognition methods, system and storage medium
CN111131533A (en) * 2019-11-29 2020-05-08 中煤科工集团重庆研究院有限公司 Automatic address allocation method for serial communication system
CN111031562A (en) * 2019-12-11 2020-04-17 迈赫机器人自动化股份有限公司 Wireless terminal access and identification method and system based on ad hoc network
CN113055501A (en) * 2019-12-28 2021-06-29 浙江宇视科技有限公司 Method and device for configuring IP address in series through network port
CN112448850A (en) * 2020-11-13 2021-03-05 深圳市凯沃尔电子有限公司 Method for identifying and configuring network access equipment
CN113301182A (en) * 2021-05-26 2021-08-24 绵阳市维博电子有限责任公司 Networking communication system based on PLC bus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114690880A (en) * 2022-03-30 2022-07-01 广东源泉科技有限公司 Heat metering system control method and related equipment

Similar Documents

Publication Publication Date Title
CA2506417A1 (en) Host-based intelligent results related to a character stream
CN111737173B (en) I2C bus communication control method, device, system and readable storage medium
US20060058982A1 (en) Data relay device and data management system using the same
EP3594766A1 (en) Data collection system and data collection method
CN116521429B (en) Asset information reporting method and device, storage medium and electronic equipment
JP2008015629A (en) Card type peripheral equipment and host device
WO2020037753A1 (en) Log printing method and system, server
CN103324501A (en) Efficient remote updating method for node software of wireless sensor network
CN114039849A (en) Equipment parameter modification method and device, electronic equipment and storage medium
CN101877666A (en) Method and device for receiving multi-application program message based on zero copy mode
CN104134027A (en) Sequence flow recognition method and sequence flow recognition device
CN108877188A (en) A kind of environment protection digital concurrently acquires and Multi net voting dissemination method and device
CN107832074A (en) A kind of intelligent sound box data updating method and device
CN110730244A (en) Networking method and system of DHT (distributed hash table) system, network equipment and storage medium
US7143155B1 (en) Standardized method and apparatus for gathering device identification and/or configuration information via a physical interface
CN108228476B (en) Data acquisition method and device
CN106775818B (en) ECU (electronic control Unit) upgrading method and ECU upgrading equipment based on CAN (controller area network) bus
CN112306040A (en) Vehicle detection method, device, equipment and server
CN111049717A (en) Variable acquisition method and equipment
CN112347012B (en) NVMe controller and method supporting SR-IOV
CN108319565B (en) Bus-based instrument address searching method and device
CN111343101A (en) Server current limiting method and device, electronic equipment and readable storage medium
CN105659216A (en) Cache directory processing method and directory controller of multi-core processor system
CN112583616B (en) Internet of things equipment, Internet of things platform and method for accessing Internet of things platform
CN113476856B (en) Information acquisition method, device, equipment 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