CN117707599A - Automatic thermal imaging module serial port parameter configuration method, device, equipment and medium - Google Patents

Automatic thermal imaging module serial port parameter configuration method, device, equipment and medium Download PDF

Info

Publication number
CN117707599A
CN117707599A CN202311731414.7A CN202311731414A CN117707599A CN 117707599 A CN117707599 A CN 117707599A CN 202311731414 A CN202311731414 A CN 202311731414A CN 117707599 A CN117707599 A CN 117707599A
Authority
CN
China
Prior art keywords
protocol
serial port
module
thermal imaging
data
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
CN202311731414.7A
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.)
Tvt Digital Technology Co ltd
Original Assignee
Tvt Digital 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 Tvt Digital Technology Co ltd filed Critical Tvt Digital Technology Co ltd
Priority to CN202311731414.7A priority Critical patent/CN117707599A/en
Publication of CN117707599A publication Critical patent/CN117707599A/en
Pending legal-status Critical Current

Links

Landscapes

  • Studio Devices (AREA)

Abstract

The invention discloses a method, a device, equipment and a medium for configuring serial port parameters of an automatic thermal imaging module, wherein the method comprises the following steps: acquiring authority information required by an API interface; generating a serial port protocol according to the content of the protocol document and the protocol format; integrating the generated serial port protocol with the acquired authority information required by the API interface to form an xml protocol meeting the API requirements; transmitting an xml protocol to a thermal imaging module of a thermal imaging camera through an API interface; and receiving and displaying a serial port protocol returned by the thermal imaging module. The invention reduces the complexity and error rate of manual operation and obviously improves the efficiency and reliability of the debugging process through automatic processing and information extraction.

Description

Automatic thermal imaging module serial port parameter configuration method, device, equipment and medium
Technical Field
The invention relates to an auxiliary device for jewelry product detection, in particular to a method, a device, equipment and a medium for configuring serial port parameters of an automatic thermal imaging module.
Background
At present, when the thermal imaging module is debugged in the early stage of the development of the whole machine, because the module is installed, besides the debugging of the disassembling module, only the web interface of the thermal imaging camera can trigger the issuing window, a protocol document needs to be inquired, a value combination protocol of a data bit and a check bit needs to be calculated manually, various webpages or calculation tools need to be switched, the efficiency is low, and deviation easily occurs.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, provides an automatic thermal imaging module serial port parameter configuration method, device, equipment and medium, and aims to solve the problems that the thermal imaging module serial port parameter configuration is low in efficiency and easy to deviate.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
in a first aspect, the present invention provides a method for configuring serial port parameters of an automated thermal imaging module, including:
acquiring authority information required by an API interface;
generating a serial port protocol according to the content of the protocol document and the protocol format;
integrating the generated serial port protocol with the acquired authority information required by the API interface to form an xml protocol meeting the API requirements;
transmitting an xml protocol to a thermal imaging module of a thermal imaging camera through an API interface;
and receiving and displaying a serial port protocol returned by the thermal imaging module.
The further technical scheme is as follows: the generating the serial port protocol according to the protocol document content and the protocol format comprises the following steps:
according to the content of the protocol document, converting the input parameter value into 16-system data;
inserting the converted 16-system data into data bits according to the sequence and the position defined by the protocol document;
calculating check bit data according to protocol format requirements;
and combining the data bit, the check bit, the frame header and the frame tail to generate a complete serial port protocol.
The further technical scheme is as follows: the step of combining the data bit, the check bit, the frame header and the frame tail to generate a complete serial port protocol comprises the following steps:
sequentially combining a frame header, a command byte, a data length, a data bit and a check bit;
calculating check bits of all bytes including command bytes, data length and data bits according to the requirements of the protocol;
adding the calculated check bit to the data position;
after the frame tail is added to the check bit, a complete serial port protocol is obtained;
the complete serial protocol is converted into byte streams.
The further technical scheme is as follows: the method for integrating the generated serial port protocol and the acquired authority information required by the API interface to form the xml protocol meeting the API requirement comprises the following steps:
creating an xml document according to the requirements of the API;
and adding authority information required by the serial port protocol and the API interface into the created xml document to generate an xml protocol meeting the API requirements.
In a second aspect, the invention also provides an automatic thermal imaging module serial port parameter configuration device, which comprises an acquisition unit, a generation unit, an integration unit, a sending unit and a display unit;
the acquisition unit is used for acquiring authority information required by the API interface;
the generating unit is used for generating a serial port protocol according to the protocol document content and the protocol format;
the integration unit is used for integrating the generated serial port protocol and the acquired authority information required by the API interface to form an xml protocol meeting the API requirement;
the sending unit is used for sending the xml protocol to a thermal imaging module of the thermal imaging camera through an API interface;
the display unit is used for receiving and displaying the serial port protocol returned by the thermal imaging module.
The further technical scheme is as follows: the generating unit comprises a conversion module, an inserting module, a calculating module and a combining module;
the conversion module is used for converting the input parameter value into 16-system data according to the content of the protocol document;
the inserting module is used for inserting the converted 16-system data into the data bits according to the sequence and the position defined by the protocol document;
the calculation module is used for calculating check bit data according to protocol format requirements;
the combination module is used for combining the data bit, the check bit, the frame header and the frame tail to generate a complete serial port protocol.
The further technical scheme is as follows: the combination module comprises a combination sub-module, a calculation sub-module, a first adding sub-module, a second adding sub-module and a conversion sub-module;
the combination sub-module is used for sequentially combining the frame header, the command byte, the data length, the data bit and the check bit;
the calculation submodule is used for calculating check bits of all bytes including command bytes, data length and data bits according to the requirements of the protocol;
the first adding submodule is used for adding the calculated check bit to the data position;
the second adding submodule is used for adding the frame tail to the check bit so as to obtain a complete serial port protocol;
the conversion submodule is used for converting the complete serial port protocol into byte streams.
The further technical scheme is as follows: the integration unit comprises a creation module and a joining module;
the creation module is used for creating an xml document according to the requirements of the API;
and the joining module is used for joining the authority information required by the serial port protocol and the API interface into the created xml document so as to generate the xml protocol meeting the API requirements.
In a third aspect, the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the method for configuring serial port parameters of an automated thermal imaging module as described above when the processor executes the computer program.
In a fourth aspect, the present invention also provides a computer readable storage medium storing a computer program, where the computer program includes program instructions, where the program instructions when executed by a processor cause the processor to execute the method for configuring serial port parameters of an automated thermal imaging module as described above.
Compared with the prior art, the invention has the beneficial effects that: the automatic thermal imaging module serial port parameter configuration method comprises the following steps: acquiring authority information required by an API interface; generating a serial port protocol according to the content of the protocol document and the protocol format; integrating the generated serial port protocol with the acquired authority information required by the API interface to form an xml protocol meeting the API requirements; transmitting an xml protocol to a thermal imaging module of a thermal imaging camera through an API interface; and receiving and displaying a serial port protocol returned by the thermal imaging module. The method has the advantages that the trouble of manual login and authority acquisition is avoided by automatically logging in equipment and acquiring the authority information required by the API, the parameter value is automatically converted into 16-system data, the check bit is calculated, the problem of errors of manual inquiry and calculation is avoided, the generated serial port protocol and the authority information are automatically combined to form an xml protocol meeting the API requirement and transmitted, the transmission flow is simplified, the important information is extracted and displayed through automatic receiving and processing of the returned xml format protocol, the complexity and possible errors of manual analysis are avoided, and the complexity and the error rate of manual operation are reduced and the efficiency and the reliability of the debugging process are remarkably improved through automatic processing and information extraction.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the present invention so that the same may be more clearly understood, as well as to provide a better understanding of the present invention with reference to the following detailed description of the preferred embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an automatic thermal imaging module serial port parameter configuration method according to an embodiment of the present invention;
FIG. 2 is a schematic block diagram of an automated thermal imaging module serial port parameter configuration apparatus according to an embodiment of the present invention;
fig. 3 is a schematic block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
First, some technical terms related to the present application are introduced.
Thermal imaging: the infrared imaging technology is to convert the detected radiation energy into a thermal image of the target object through system processing according to the detected radiation energy, and display the thermal image in gray level or pseudo color.
Thermal imaging module: the thermal imaging machine core consists of a thermal imaging detector, a thermal imaging lens and an image processing unit.
Serial port: the serial interface is abbreviated as serial interface, also called serial communication interface or serial communication interface (usually referred to as COM interface), and is an expansion interface adopting serial communication mode.
API: an application program interface (API: application Program Interface) is a set of definitions, programs, and protocols through which computer software communicates with each other.
The invention will now be described by way of specific examples.
As shown in fig. 1, an embodiment of the present invention provides an automatic thermal imaging module serial port parameter configuration method, which includes the following steps: S10-S50.
S10, acquiring authority information required by the API.
And acquiring authority information such as token and the like required by the API interface through the thermal imaging camera user name and password login equipment. The access and use of the authority information of the API interface is a precondition of avoiding information disclosure or unauthorized access, and meanwhile, ensuring that legal and compliant visitors can smoothly use the API function.
By automatically logging in the equipment and acquiring the authority information required by the API, the trouble of manual login and authority acquisition is avoided, and the efficiency is improved.
In one embodiment, the step S10 specifically includes the following steps: S101-S104.
S101, acquiring a user name and a password.
S102, constructing an HTTP POST request.
S103, waiting for the response of the equipment.
S104, extracting a token from the response and storing the token.
For steps S101-S104, the necessary user credentials, typically a user name and password, are obtained. Sending a login request: an HTTP POST request is constructed and login information containing the user name and password is sent to the API endpoint of the device. This request typically needs to be sent to a specific URL, e.g./api/login. Processing the login response: waiting for the device to respond, a successful login will return a response containing the token. This token is typically a JWT (JSON Web Token) or other form of token for later API request validation. Store and use Token: the token is extracted from the response and saved properly. In subsequent API calls, this token is typically added to the Header (Header) of the HTTP request, passed in an Authorization field, possibly in the format of an Authorization beer < token >.
S20, generating a serial port protocol according to the protocol document content and the protocol format.
In one embodiment, the step S20 specifically includes the following steps: S201-S204.
S201, according to the content of the protocol document, the input parameter value is converted into 16-system data.
The parameter values may be integers, floating point numbers, strings, or the like. For integers, the method provided by the programming language can be directly used for converting the integers into 16-system character strings. For example, in Python, conversion can be performed using the hex () function. For non-integer values, it is necessary to convert to binary representation and then to 16. The character string is required to be converted into ASCII code or UTF-8 code and the like, and then 16-system conversion is carried out.
S202, inserting the converted 16-system data into the data bits according to the sequence and the position defined by the protocol document.
Depending on the requirements of the protocol, the converted 16-ary data may require a specific format, e.g. a fixed length. This may require padding 0 (i.e., 0-padding) before the data to reach the required length.
S203, calculating check bit data according to the protocol format requirement.
The way the check bits are calculated depends on the check method used. Common are parity check, sum check, CRC check, etc. For example, if exclusive or (XOR) checking is used, you exclusive or all the data bytes, resulting in a single byte check value. If sum checking is used, you will add all data bytes and then possibly modulo (e.g., modulo 256) to ensure that the check bits are single bytes.
S204, combining the data bit, the check bit, the frame header and the frame tail to generate a complete serial port protocol.
In one embodiment, step S204 includes the steps of: S2041-S2045.
S2041, sequentially combining the frame header, command byte, data length, data bits, and check bits.
A header, a string of fixed 16-ary numbers, is used to identify the beginning of the message. Data bits: the data containing the actual transmission has been converted into 16-ary format and meets the data structure requirements of the protocol. Check bit: calculated by some algorithm (such as exclusive or check, accumulation and check, etc.), is used to detect the integrity of the data during transmission. End of frame: a string of fixed 16-ary numbers is used to identify the end of the message. The frame header, command byte, data length, data bits and check bits are combined in order.
S2042, calculating check bits of all bytes including command bytes, data length and data bits according to the requirements of the protocol.
S2043, the calculated check bit is appended to the data position.
S2044, after the frame tail is added to the check bit, the complete serial port protocol is obtained.
S2045, converting the complete serial port protocol into byte stream.
S30, integrating the generated serial port protocol with the acquired authority information required by the API interface to form an xml protocol meeting the API requirements.
And the generated serial port protocol and the authority information are automatically combined to form an xml protocol meeting the API requirement and transmitted, so that the transmission flow is simplified.
In one embodiment, the step S30 specifically includes the following steps: S301-S302.
S301, creating an xml document according to the requirements of the API.
S302, adding authority information required by the serial port protocol and the API interface into the created xml document to generate an xml protocol meeting the API requirements.
From the API document, the message is constructed using the correct xml format. This involves creating an xml root element and adding sub-elements and attributes as required. In xml, the rights information required to prepare the serial protocol and API interface is put into the correct xml element. An HTTP request is set, the content type of which is application/xml, and the request header contains an API key or token. An xml message is sent to the API endpoint of the thermal imaging module.
S40, transmitting the xml protocol to a thermal imaging module of the thermal imaging camera through an API interface.
S50, receiving and displaying a serial port protocol returned by the thermal imaging module.
By automatically receiving and processing the returned xml format protocol, the important information is extracted and displayed, and the complexity and possible errors of manual analysis are avoided.
Specifically, response data in XML format is obtained from the API request. And processing the response data by using an XML parsing library, extracting a part of serial port protocol returned by the serial port of the thermal imaging module, and formatting, displaying or storing the extracted information.
In summary, the invention reduces the complexity and error rate of manual operation and obviously improves the efficiency and reliability of the debugging process through automatic processing and information extraction.
FIG. 2 is a schematic block diagram of an automated thermal imaging module serial port parameter configuration device according to an embodiment of the present invention; corresponding to the above-mentioned method for configuring serial port parameters of an automated thermal imaging module, the embodiment of the invention further provides an apparatus 100 for configuring serial port parameters of an automated thermal imaging module.
As shown in fig. 2, the automatic thermal imaging module serial port parameter configuration device 100 includes an obtaining unit 110, a generating unit 120, an integrating unit 130, a sending unit 140, and a displaying unit 150. And an acquiring unit 110 for acquiring authority information required by the API interface. The generating unit 120 is configured to generate a serial port protocol according to the protocol document content and the protocol format. And the integrating unit 130 is configured to integrate the generated serial port protocol with the acquired authority information required by the API interface to form an xml protocol that meets the API requirement. And the sending unit 140 is used for sending the xml protocol to the thermal imaging module of the thermal imaging camera through the API interface. And the display unit 150 is used for receiving and displaying the serial port protocol returned by the thermal imaging module.
In an embodiment, the generating unit 120 includes a converting module, an inserting module, a calculating module, and a combining module. And the conversion module is used for converting the input parameter values into 16-system data according to the content of the protocol document. And the inserting module is used for inserting the converted 16-system data into the data bits according to the sequence and the position defined by the protocol document. And the calculation module is used for calculating check bit data according to the protocol format requirement. And the combination module is used for combining the data bit, the check bit, the frame header and the frame tail to generate a complete serial port protocol.
In one embodiment, the combination module includes a combination sub-module, a calculation sub-module, a first addition sub-module, a second addition sub-module, and a conversion sub-module.
And the combination sub-module is used for sequentially combining the frame header, the command byte, the data length, the data bit and the check bit.
And the calculation sub-module is used for calculating check bits of all bytes including command bytes, data length and data bits according to the requirements of the protocol. And the first adding submodule is used for adding the calculated check bit to the data position. And the second adding submodule is used for adding the frame tail to the check bit so as to obtain a complete serial port protocol. And the conversion sub-module is used for converting the complete serial port protocol into byte streams.
In one embodiment, the integration unit 130 includes a creation module and a joining module, wherein the creation module is used for creating an xml document according to the requirement of the API, and the joining module is used for joining authority information required by the serial port protocol and the API interface into the created xml document so as to generate the xml protocol meeting the requirement of the API.
The automated thermal imaging module serial parameter configuration method described above may be implemented in the form of a computer program that may be run on a computer device as shown in fig. 3.
Referring to fig. 3, fig. 3 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 700 may be a server, where the server may be a stand-alone server or may be a server cluster formed by a plurality of servers.
As shown in fig. 3, the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the method for configuring serial port parameters of the automated thermal imaging module as described above.
The computer device 700 may be a terminal or a server. The computer device 700 includes a processor 720, a memory, and a network interface 750, which are connected through a system bus 710, wherein the memory may include a non-volatile storage medium 730 and an internal memory 740.
The non-volatile storage medium 730 may store an operating system 731 and computer programs 732. The computer program 732, when executed, causes the processor 720 to perform any one of a number of automated thermal imaging module serial port parameter configuration methods.
The processor 720 is used to provide computing and control capabilities to support the operation of the overall computer device 700.
The internal memory 740 provides an environment for the execution of a computer program 732 in the non-volatile storage medium 730, which when executed by the processor 720, causes the processor 720 to perform any one of the automated thermal imaging module serial port parameter configuration methods.
The network interface 750 is used for network communications such as sending assigned tasks and the like. Those skilled in the art will appreciate that the structures shown in FIG. 3 are block diagrams only and do not constitute a limitation of the computer device 700 to which the present teachings apply, and that a particular computer device 700 may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components. Wherein the processor 720 is configured to execute the program code stored in the memory to implement the following steps:
the automatic thermal imaging module serial port parameter configuration method comprises the following steps:
acquiring authority information required by an API interface;
generating a serial port protocol according to the content of the protocol document and the protocol format;
integrating the generated serial port protocol with the acquired authority information required by the API interface to form an xml protocol meeting the API requirements;
transmitting an xml protocol to a thermal imaging module of a thermal imaging camera through an API interface;
and receiving and displaying a serial port protocol returned by the thermal imaging module.
Further, the generating a serial port protocol according to the protocol document content and the protocol format includes:
according to the content of the protocol document, converting the input parameter value into 16-system data;
inserting the converted 16-system data into data bits according to the sequence and the position defined by the protocol document;
calculating check bit data according to protocol format requirements;
and combining the data bit, the check bit, the frame header and the frame tail to generate a complete serial port protocol.
Further, the combining the data bit, the check bit, the frame header and the frame tail to generate a complete serial port protocol includes:
sequentially combining a frame header, a command byte, a data length, a data bit and a check bit;
calculating check bits of all bytes including command bytes, data length and data bits according to the requirements of the protocol;
adding the calculated check bit to the data position;
after the frame tail is added to the check bit, a complete serial port protocol is obtained;
the complete serial protocol is converted into byte streams.
Further, the integrating the generated serial port protocol with the authority information required by the acquired API interface to form an xml protocol meeting the API requirement includes:
creating an xml document according to the requirements of the API;
and adding authority information required by the serial port protocol and the API interface into the created xml document to generate an xml protocol meeting the API requirements.
It should be appreciated that in embodiments of the present application, the processor 720 may be a central processing unit (Central Processing Unit, CPU), the processor 720 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf Programmable gate arrays (FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that the computer device 700 structure shown in FIG. 3 is not limiting of the computer device 700 and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
In another embodiment of the present invention, a computer-readable storage medium is provided. The computer readable storage medium may be a non-volatile computer readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program realizes the automatic thermal imaging module serial port parameter configuration method disclosed by the embodiment of the invention when being executed by a processor.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus, device and unit described above may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein. Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the units is merely a logical function division, there may be another division manner in actual implementation, or units having the same function may be integrated into one unit, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices, or elements, or may be an electrical, mechanical, or other form of connection.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the embodiment of the present invention.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units may be stored in a storage medium if implemented in the form of software functional units and sold or used as stand-alone products. Based on such understanding, the technical solution of the present invention is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. The automatic thermal imaging module serial port parameter configuration method is characterized by comprising the following steps of:
acquiring authority information required by an API interface;
generating a serial port protocol according to the content of the protocol document and the protocol format;
integrating the generated serial port protocol with the acquired authority information required by the API interface to form an xml protocol meeting the API requirements;
transmitting an xml protocol to a thermal imaging module of a thermal imaging camera through an API interface;
and receiving and displaying a serial port protocol returned by the thermal imaging module.
2. The method for configuring serial port parameters of an automated thermal imaging module according to claim 1, wherein generating a serial port protocol according to protocol document content and protocol format comprises:
according to the content of the protocol document, converting the input parameter value into 16-system data;
inserting the converted 16-system data into data bits according to the sequence and the position defined by the protocol document;
calculating check bit data according to protocol format requirements;
and combining the data bit, the check bit, the frame header and the frame tail to generate a complete serial port protocol.
3. The method for configuring serial port parameters of an automated thermal imaging module according to claim 2, wherein the combining the data bits, the check bits, the frame header and the frame trailer to generate the complete serial port protocol comprises:
sequentially combining a frame header, a command byte, a data length, a data bit and a check bit;
calculating check bits of all bytes including command bytes, data length and data bits according to the requirements of the protocol;
adding the calculated check bit to the data position;
after the frame tail is added to the check bit, a complete serial port protocol is obtained;
the complete serial protocol is converted into byte streams.
4. The method for configuring serial port parameters of an automated thermal imaging module according to claim 1, wherein integrating the generated serial port protocol with the acquired authority information required by the API interface to form an xml protocol meeting the API requirements comprises:
creating an xml document according to the requirements of the API;
and adding authority information required by the serial port protocol and the API interface into the created xml document to generate an xml protocol meeting the API requirements.
5. The automatic thermal imaging module serial port parameter configuration device is characterized by comprising an acquisition unit, a generation unit, an integration unit, a sending unit and a display unit;
the acquisition unit is used for acquiring authority information required by the API interface;
the generating unit is used for generating a serial port protocol according to the protocol document content and the protocol format;
the integration unit is used for integrating the generated serial port protocol and the acquired authority information required by the API interface to form an xml protocol meeting the API requirement;
the sending unit is used for sending the xml protocol to a thermal imaging module of the thermal imaging camera through an API interface;
the display unit is used for receiving and displaying the serial port protocol returned by the thermal imaging module.
6. The automated thermal imaging module serial port parameter configuration device of claim 5, wherein the generation unit comprises a conversion module, an insertion module, a calculation module, and a combination module;
the conversion module is used for converting the input parameter value into 16-system data according to the content of the protocol document;
the inserting module is used for inserting the converted 16-system data into the data bits according to the sequence and the position defined by the protocol document;
the calculation module is used for calculating check bit data according to protocol format requirements;
the combination module is used for combining the data bit, the check bit, the frame header and the frame tail to generate a complete serial port protocol.
7. The automated thermal imaging module serial port parameter configuration device of claim 6, wherein the combination module comprises a combination sub-module, a calculation sub-module, a first addition sub-module, a second addition sub-module, and a conversion sub-module;
the combination sub-module is used for sequentially combining the frame header, the command byte, the data length, the data bit and the check bit;
the calculation submodule is used for calculating check bits of all bytes including command bytes, data length and data bits according to the requirements of the protocol;
the first adding submodule is used for adding the calculated check bit to the data position;
the second adding submodule is used for adding the frame tail to the check bit so as to obtain a complete serial port protocol;
the conversion submodule is used for converting the complete serial port protocol into byte streams.
8. The automated thermal imaging module serial port parameter configuration device of claim 5, wherein the integration unit comprises a creation module and a joining module;
the creation module is used for creating an xml document according to the requirements of the API;
and the joining module is used for joining the authority information required by the serial port protocol and the API interface into the created xml document so as to generate the xml protocol meeting the API requirements.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the automated thermal imaging module serial parameter configuration method of any one of claims 1 to 4 when the computer program is executed by the processor.
10. A computer readable storage medium, wherein the storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the automated thermal imaging module serial parameter configuration method of any one of claims 1 to 4.
CN202311731414.7A 2023-12-15 2023-12-15 Automatic thermal imaging module serial port parameter configuration method, device, equipment and medium Pending CN117707599A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311731414.7A CN117707599A (en) 2023-12-15 2023-12-15 Automatic thermal imaging module serial port parameter configuration method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311731414.7A CN117707599A (en) 2023-12-15 2023-12-15 Automatic thermal imaging module serial port parameter configuration method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117707599A true CN117707599A (en) 2024-03-15

Family

ID=90160187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311731414.7A Pending CN117707599A (en) 2023-12-15 2023-12-15 Automatic thermal imaging module serial port parameter configuration method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117707599A (en)

Similar Documents

Publication Publication Date Title
US8640096B2 (en) Configuration of componentized software applications
US10958615B2 (en) Communication message consolidation with content difference formatting
CN110647490B (en) Data transmission method, device, equipment and computer storage medium
JP2006244471A (en) Command-line data-type detection and conversion
CN111694828A (en) Data processing method, device, system and storage medium
KR102226463B1 (en) UI/UX solution providing server linked with process automation program, process automation method using the same, and computer program executing the same
CN115408169A (en) Remote procedure calling method, device, equipment and readable storage medium
CN111339051B (en) Log processing method, system, device and storage medium
US6901449B1 (en) System and method for encapsulating data with a formatted data protocol
US20040168064A1 (en) System of generating procedure for digital signature and encryption to XML
CN117707599A (en) Automatic thermal imaging module serial port parameter configuration method, device, equipment and medium
CN105808549B (en) Client method for automatically framing and analyzing frames based on mapping file
CN113438226B (en) Message generating and analyzing method, device and system based on hybrid transmission protocol
CN115827382A (en) Switch state information monitoring system, method, device and storage medium
CN110548285B (en) Game communication control method and device, medium and electronic equipment
CN111090578A (en) Project development joint debugging method and device, computer equipment and storage medium
CN117725609A (en) User authorization information storage method, device, electronic equipment and storage medium
CN116319763B (en) File uploading method and device based on WASM technology
CN115623070B (en) IDL message processing method and device, electronic equipment and storage medium
US20160179480A1 (en) Computer application development assistance
CN117389769B (en) Browser-end rich text copying method and system based on cloud service and cloud platform
CN117692498A (en) Configuration method and device of energy storage system and energy storage system
CN117880130A (en) Product detection method, device, equipment and storage medium
CN115982715A (en) Security vulnerability detection system and method based on rapid generation of data files
CN115499523A (en) Service interaction system, method, electronic 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