Patentable/Patents/US-20260052006-A1
US-20260052006-A1

Method for Command Communication, Device for Command Communication and Storage Medium

PublishedFebruary 19, 2026
Assigneenot available in USPTO data we have
Technical Abstract

A method for command communication includes: determining whether a command to parse conforms to a preset rule, wherein the preset rule includes: the command starts by a preset starting byte and terminates by a preset terminating byte, and each of the other bytes in the command except the preset starting byte and the preset terminating byte is a valid byte with a correct position; if determining that the command conforms to the preset rule, performing calculation on the index of each byte in the command by a preset calculation method to generate corresponding data; when determining that the command exists in a command set, parsing the command by translating the data.

Patent Claims

Legal claims defining the scope of protection, as filed with the USPTO.

1

determining whether a command to parse conforms to a preset rule to generate a determination result, wherein the preset rule comprises: starting the command by a preset starting byte and terminating the command by a preset terminating byte, and each of the other bytes in the command except the preset starting byte and the preset terminating byte is a valid byte with a correct position; if the determination result is that the command conforms to the preset rule, performing calculation on an index of each byte in the command by a preset calculation method to generate corresponding data; and when determining that the command exists in a command set, parsing the command by translating the data. . A method for command communication comprising:

2

claim 1 . The method for command communication according to, further comprising, if the determination result is that the command does not conform to the preset rule, deleting the command which is not determined to conform to the preset rule.

3

claim 1 . The method for the command communication according to, wherein the calculation is a hash calculation.

4

claim 1 determining whether a starting byte of the command in the command set is the preset starting byte; and if determining that the starting byte of the command in the command set is the preset starting byte, sequentially determining whether each of bytes of the command in the command set after the starting byte is valid and is located on the correct position. . The method for command communication according to, wherein said determining whether the command in the command set conforms to the preset rule comprises:

5

a determination module configured to determine whether a command to parse conforms to a preset rule to generate a determination result, wherein the preset rule comprises: starting the command by a preset starting byte and terminating the command by a preset terminating byte, and each of other bytes in the command except the preset starting byte and the preset terminating byte is a valid byte with a correct position; a calculation module configured to perform calculation on an index of each byte in the command by a preset calculation method to generate corresponding data if the determination result of the determination module is that the command conforms to the preset rule; and a translation module configured to parse the command by translating the data when determining that the command exists in a command set. . A device for command communication comprising:

6

claim 5 . The device for command communication according to, further comprising a deletion module configured to delete the command which is not determined to conform to the preset rule if the determination result of the determination module is that the command does not conform to the preset rule.

7

claim 5 . The device for command communication according to, wherein the calculation is a hash calculation.

8

claim 5 . The device for command communication according to, wherein the determination module is configured to determine whether a starting byte of the command in the command set is the preset starting byte, and if determining that the starting byte of the command in the command set is the preset starting byte, the determination module is configured to sequentially determine whether each of bytes of the command in the command set after the starting byte is valid and is located on the correct position.

9

claim 1 . A non-transitory, computer-readable storage medium storing a program, wherein the program is performed to implement the method for the command communication according to.

Detailed Description

Complete technical specification and implementation details from the patent document.

The present disclosure is related to a method for command communication, a device for command communication and a storage medium.

In the communication between two assemblies, some commands are usually used to perform handshaking or transfer information with each other. Performing command parsing is time-consuming and is limited by the computing ability of a processor.

In order to reduce computing time or the processes in codes, if command sets are designed to be simple, command words/strings are usually long (represented in hexadecimal numbers or decimal numbers). Thus, although the command sets are designed to be simple to be easily implemented or run, the command sets are hard to read and maintain so that programmers have difficulty in reading and maintaining the commands. If the commands are designed to be easily read, parsing and translating would become time-consuming.

In light of the aforementioned problems in the prior art, the present disclosure provides a method for command communication, a device for command communication and a storage medium to be able to handle and parse the command efficiently.

The technical solutions of the present disclosure are implemented as follows:

According to one aspect of the present disclosure, the method for command communication is provided and includes: determining whether a command to parse conforms to a preset rule to generate a determination result, wherein the preset rule comprises: the command starts by a preset starting byte and terminates by a preset terminating byte, and each of the other bytes in the command except the preset starting byte and the preset terminating byte is a valid byte with a correct position; if the determination result is that the command conforms to the preset rule, performing calculation on the index of each byte in the command by a preset calculation method to generate corresponding data; when determining that the command exists in a command set, parsing the command by translating the data

According to the embodiments of the present disclosure, the method for command communication further includes: if the determination result is that the command does not conform to the preset rule, deleting the command which is not determined to conform to the preset rule.

According to the embodiments of the present disclosure, the calculation is hash calculation.

According to the embodiments of the present disclosure, determining whether the command in command sets conforms to the preset rule includes: determining whether the starting byte of the command in the command set is the preset starting byte; if determining that the starting byte of the command in the command set is the preset starting byte, sequentially determining whether each of bytes of the command in the command set after the starting byte is valid and is located on the correct position.

According to another aspect of the present disclosure, the device for command communication is provided and includes a determination module, a calculation module, and a translation module. The determination module is configured to determine whether a command to parse conforms to a preset rule to generate a determination result, wherein the preset rule include: the command starts by a preset starting byte and terminates by a preset terminating byte, and each of the other bytes in the command except the preset starting byte and the preset terminating byte is a valid byte with a correct position. The calculation module is configured to perform calculation on the index of each byte in the command by a preset calculation method to generate corresponding data if the determination result of the determination module is that the command conforms to the preset rule. The translation module is configured to parse the command by translating the data when determining that the command exists in a command set.

According to the embodiments of the present disclosure, the device for command communication further includes a deletion module. The deletion module is configured to delete the command which is not determined to conform to the preset rule if the determination result of the determination module is that the command does not conform to the preset rule.

According to the embodiments of the present disclosure, the calculation is hash calculation.

According to the embodiments of the present disclosure, the determination module is configured to determine whether the starting byte of the command in the command set is the preset starting byte, and if determining that the starting byte of the command in the command set is the preset starting byte, the determination module is configured to sequentially determine whether each of bytes of the command in the command set after the starting byte is valid and is located on the correct position.

According to yet another aspect of the present disclosure, the storage medium is provided and stores a program, and the program is performed to implement the aforementioned method for the command communication. then performs the command parsing on

The present disclosure performs selection on the command by the preset rule before parsing the command and then utilizes the data generated by the index to perform the command parsing in order to substitute the method of the current command parsing by comparing the strings. In comparison with the method of the current command parsing by comparing the strings, the method provided by the present disclosure does not require any comparison mechanism and only takes the time of determining the validity of the bytes and performing the calculation and may therefore avoid the time of comparing the strings and extremely decrease the size of a buffer area to handle and parse the command efficiently.

The specific embodiments of the present disclosure given herein below is used to clearly and completely explain the technical solution of the present disclosure. Apparently, the described embodiments are merely one part of the embodiments of the present disclosure and not all embodiments of the present disclosure. Based on the embodiments of the present disclosure, all of the other embodiments obtained by the person skilled in the art shall fall within the scope of protection of the present disclosure.

1 FIG. 12 Step S: before parsing a command, determining whether the command to parse conforms to a preset rule. The preset rule is set as follows: the command starts by a preset starting byte and terminates by a preset terminating byte, and each of the other bytes in the command except the preset starting byte and the preset terminating byte is a valid byte with a correct position. As shown in, a method for command communication according to the embodiments of the present disclosure includes:

12 14 If the determination result at step Sis that the command conforms to the preset rule, step Sis performed. Because each word/byte has a corresponding index disposed on the position thereof, the index of each byte in the command may be calculated by a preset calculation method to generate corresponding data. In one embodiment, hash calculation may be performed on the indexes of bytes to generate hash data. In the other embodiments, the other proper calculation methods may be adopted to encrypt the index of each byte to generate the corresponding data.

16 Step S: when determining that the command exists in a command set, parsing the command by translating the data generated by the aforementioned calculation. In the embodiment of adopting the hash calculation to generate the hash data, the corresponding hash data are translated to parse the command in this step.

In the aforementioned technical solution of the present disclosure, the selection is performed on the command by the preset rule before the command is parsed, and then the data generated by the index is utilized to perform the command parsing in order to substitute the method of the current command parsing by comparing the strings. In comparison with the method of the current command parsing by comparing the strings, the method provided by the present disclosure does not require any comparison mechanism and only takes the time of determining the validity of the bytes and performing the calculation and may therefore avoid the time of comparing the strings and extremely decrease the size of a buffer area to handle and parse the command efficiently.

12 12 In addition, in step S, if the determination result is that the command does not conform to the preset rule, the command which is not determined to conform to the preset rule is deleted, and the step Sis restarted over.

2 FIG. 3 FIG. 2 FIG. 3 FIG. 3 FIG. 201 202 203 203 204 1 1 1 204 depicts a flowchart of a method for command communication according to another embodiment of the present disclosure.depicts a schematic diagram of a command set according to one embodiment of the present disclosure. Combiningwith, the method for command communication starts from step S, and afterwards the determination is performed on the starting byte at step S. If the starting byte is determined as the predefined starting byte, step Sis performed. At the step S, the parsing of the next byte is performed. Thereafter, at step S, the validity and the position of the byte are determined. Specifically, as shown in, the command set (known as a command digit set) includes a plurality of commands respectively located on a plurality of positions (position, . . . , position x), and each of the plurality of commands includes a plurality of bytes (digit, . . . , digit n, . . . , digit, . . . , digit p). At the step S, the byte is determined whether to be located on the valid digit of the correct position or is determined whether to be located on the predefined terminating byte of the correct position. For example, the correct position is the position of the command in the command set corresponding to the byte and /or the position of the byte in the corresponding command.

204 205 205 203 3 FIG. If the determination result at step Sis that the byte is the valid byte, step Sis performed. At the step S, the hash data calculation is performed on the index (e.g., ID) of the byte and the corresponding data (e.g., hash_id in) are generated accordingly, and then, the step Sis returned to perform the parsing of the next byte.

204 206 206 201 202 206 201 If the determination result at step Sis that the byte is the invalid byte, step Sis performed. At the step S, the entire bytes of the command are dropped, and the step Sis returned to restart over the process of parsing the command. In addition, if the starting byte is not determined as the predefined starting byte at step S, and the step Sis performed in the same way, and the entire bytes of the command are dropped, and the step Sis returned to restart over the process of parsing the command.

204 205 203 204 207 207 208 2 FIG. In the loop of the step S, with reference to, the step Sand the step S, when the bytes between the starting byte and the terminating byte are all the valid bytes and are located on the correct positions, the determination is performed on the terminating byte at the step Sto determine whether the terminating byte is located on the predefined terminating byte of the correct position. If the terminating byte is determined to be located on the predefined terminating byte of the correct position, step Sis performed. At the step S, the hash data generated by the hash calculation are translated into the command. Afterwards, the command is performed at step S.

4 FIG. 400 401 402 403 As shown in, a devicefor command communication according to the embodiments of the present disclosure is provided and includes a determination module, a calculation module, and a translation module.

401 The determination moduleis configured to determine whether the command to parse conforms to the preset rule to generate the determination result, wherein the preset rule include: the command starts by the preset starting byte and terminates by the preset terminating byte, and each of the other bytes in the command except the preset starting byte and the preset terminating byte is the valid byte with the correct position.

402 401 The calculation moduleis configured to perform calculation on the index of each byte in the command by the preset calculation method to generate corresponding data if the determination result of the determination moduleis that the command conforms to the preset rule. In one embodiment, the calculation is the hash calculation.

403 The translation moduleis configured to parse the command by translating the data when determining that the command exists in a command set.

400 404 404 401 In one embodiment, the devicefor command communication further includes a deletion module. The deletion moduleis configured to delete the command which is not determined to conform to the preset rule if the determination result of the determination moduleis that the command does not conform to the preset rule.

401 401 In one embodiment, the determination moduleis configured to determine whether the starting byte of the command in the command set is the preset starting byte, and if determining that the starting byte of the command in the command set is the preset starting byte, the determination moduleis configured to sequentially determine whether each of bytes of the command in the command set after the starting byte is valid and is located on the correct position.

According to the embodiments of the present disclosure, a storage medium is further provided and stores a program, and the program may be performed to implement the aforementioned method for the command communication.

The aforementioned description are the preferred embodiments of the present disclosure and is not used to limit the present disclosure. The variation, equivalent modification, improvement and so on according to the idea and the spirit of the present disclosure should be included within the scope of the protection of the present disclosure.

Classification Codes (CPC)

Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.

Patent Metadata

Filing Date

August 14, 2024

Publication Date

February 19, 2026

Inventors

Sheng-Pin WANG

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “METHOD FOR COMMAND COMMUNICATION, DEVICE FOR COMMAND COMMUNICATION AND STORAGE MEDIUM” (US-20260052006-A1). https://patentable.app/patents/US-20260052006-A1

© 2026 Patentable. All rights reserved.

Patentable is a research and drafting-assistant tool, not a law firm, and does not provide legal advice. Documents we generate are drafts for review by a licensed patent attorney.

METHOD FOR COMMAND COMMUNICATION, DEVICE FOR COMMAND COMMUNICATION AND STORAGE MEDIUM — Sheng-Pin WANG | Patentable