CN114915549B - Instruction query method, device, equipment and storage medium - Google Patents

Instruction query method, device, equipment and storage medium Download PDF

Info

Publication number
CN114915549B
CN114915549B CN202210511941.6A CN202210511941A CN114915549B CN 114915549 B CN114915549 B CN 114915549B CN 202210511941 A CN202210511941 A CN 202210511941A CN 114915549 B CN114915549 B CN 114915549B
Authority
CN
China
Prior art keywords
code value
instruction
instruction code
test data
target
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.)
Active
Application number
CN202210511941.6A
Other languages
Chinese (zh)
Other versions
CN114915549A (en
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.)
Shenzhen Skyworth RGB Electronics Co Ltd
Original Assignee
Shenzhen Skyworth RGB Electronics 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 Shenzhen Skyworth RGB Electronics Co Ltd filed Critical Shenzhen Skyworth RGB Electronics Co Ltd
Priority to CN202210511941.6A priority Critical patent/CN114915549B/en
Publication of CN114915549A publication Critical patent/CN114915549A/en
Application granted granted Critical
Publication of CN114915549B publication Critical patent/CN114915549B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control

Abstract

The invention discloses an instruction query method, an instruction query device and a storage medium, wherein the method comprises the following steps: the method comprises the steps of storing a preset standard instruction code value and a processing method in an associated mode through a preset mapping relation; receiving test data sent by an upper computer, and checking the test data; if the test data passes the verification, analyzing the test data to obtain a test instruction code value corresponding to the test data; and determining a target instruction code value matched with the test instruction code value in the standard instruction code value, and inquiring a target processing method associated with the target instruction code value according to the mapping relation and the target instruction code value. According to the invention, the instructions are stored and queried through the preset mapping relation, so that the query efficiency of the instructions is improved.

Description

Instruction query method, device, equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a storage medium for querying instructions.
Background
With the popularization of automatic testing, in the production process of many electrical equipment, an automatic testing mode based on serial port instructions is mostly adopted for performing functional testing. The serial communication mode uses less data lines, and can save communication cost in long-distance communication. However, the conventional serial port instruction message query module performs query of the instruction processing method in a traversal manner, and as the number of instructions increases, the conventional manner has a problem of low query efficiency.
Disclosure of Invention
The invention mainly aims to provide an instruction query method, an instruction query device and a storage medium, and aims to solve the problem of low instruction query efficiency when the number of instructions is huge.
In order to achieve the above object, the present invention provides an instruction query method, which includes:
the method comprises the steps of storing a preset standard instruction code value and a processing method in an associated mode through a preset mapping relation;
receiving test data sent by an upper computer, and checking the test data;
if the test data passes the verification, analyzing the test data to obtain a test instruction code value corresponding to the test data;
and determining a target instruction code value matched with the test instruction code value in the standard instruction code value, and inquiring a target processing method associated with the target instruction code value according to the mapping relation and the target instruction code value.
Optionally, the step of storing the preset standard instruction code value and the processing method in an associated manner through the preset mapping relation includes:
defining a preset standard instruction code value as a preset data format, and defining a preset processing method as a preset function class;
and using a storage method adapted to the mapping relation to associate and store the defined standard instruction code value and the processing method.
Optionally, the step of verifying the test data includes:
acquiring instruction data in the test data, and processing the instruction data by using a preset verification algorithm to obtain a receiving verification value;
and comparing the receiving check value with the sending check value in the test data.
Optionally, after the step of receiving the test data sent by the upper computer and verifying the test data, the method further includes:
if the test data is not checked, generating a failure code;
and monitoring whether a preset data receiving node receives new test data according to the failure code.
Optionally, the step of analyzing the test data to obtain a test instruction code value corresponding to the test data includes:
and converting the data format of the test data into the preset data format, and taking the converted test data as the test instruction code value.
Optionally, the step of querying the target processing method associated with the target instruction code value according to the mapping relation and the target instruction code value includes:
instantiating an object of at least one of the mapping relationship classes to provide an acquisition method adapted to the mapping relationship;
and calling the acquisition method to acquire a target processing method associated with the target instruction code value.
Optionally, the determining a target instruction code value matched with the test instruction code value in the standard instruction code values, and after querying a processing method associated with the target instruction code value according to the mapping relation and the target instruction code value, further includes:
acquiring an instruction testing method in the target processing method, and executing the instruction testing method;
and if the instruction testing method is successfully executed, generating a success code.
In addition, to achieve the above object, the present invention also provides an instruction inquiry apparatus, including:
the storage module is used for storing a preset standard instruction code value and a processing method in an associated mode through a preset mapping relation;
the testing module is used for receiving the test data sent by the upper computer and checking the test data;
the analysis module is used for analyzing the test data to obtain a test instruction code value corresponding to the test data if the test data passes the verification;
and the acquisition module is used for determining a target instruction code value matched with the test instruction code value in the standard instruction code value, and inquiring a target processing method associated with the target instruction code value according to the mapping relation and the target instruction code value.
In addition, to achieve the above object, the present invention also provides an electronic device, including: a memory, a processor, and an instruction query program stored on the memory and executable on the processor, the instruction query program configured to implement the steps of the instruction query method as described above.
In addition, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon an instruction inquiry program which, when executed by a processor, implements the steps of the instruction inquiry method as described above.
The invention stores the preset standard instruction code value and the processing method in an associated way through the preset mapping relation; receiving test data sent by an upper computer, and checking the test data; if the test data passes the verification, analyzing the test data to obtain a test instruction code value corresponding to the test data; determining a target instruction code value matched with the test instruction code value in the standard instruction code value, inquiring a target processing method associated with the target instruction code value according to the mapping relation and the target instruction code value, storing the instruction code value and the processing method in a first associated mode, directly inquiring the processing method corresponding to the instruction through the mapping relation without traversing when inquiring the instruction, improving the instruction inquiring efficiency, carrying out data verification before inquiring the instruction, and improving the effectiveness of data transmission.
Drawings
FIG. 1 is a schematic diagram of an electronic device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart of a first embodiment of an instruction query method according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of the method for querying an instruction according to the present invention;
FIG. 4 is a flowchart of a third embodiment of the method for querying instructions according to the present invention;
FIG. 5 is a schematic diagram of an instruction query device according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The main technical scheme of the invention is as follows: the method comprises the steps of storing a preset standard instruction code value and a processing method in an associated mode through a preset mapping relation; receiving test data sent by an upper computer, and checking the test data; if the test data passes the verification, analyzing the test data to obtain a test instruction code value corresponding to the test data; and determining a target instruction code value matched with the test instruction code value in the standard instruction code value, and inquiring a target processing method associated with the target instruction code value according to the mapping relation and the target instruction code value.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device in a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the electronic device may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the structure shown in fig. 1 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components.
As shown in fig. 1, an operating system, a data storage module, a network communication module, a user interface module, and an instruction inquiry program may be included in the memory 1005 as one type of storage medium.
In the electronic device shown in fig. 1, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the electronic device of the present invention may be provided in an electronic device, and the electronic device calls an instruction inquiry program stored in the memory 1005 through the processor 1001 and performs the following steps:
the method comprises the steps of storing a preset standard instruction code value and a processing method in an associated mode through a preset mapping relation;
receiving test data sent by an upper computer, and checking the test data;
if the test data passes the verification, analyzing the test data to obtain a test instruction code value corresponding to the test data;
and determining a target instruction code value matched with the test instruction code value in the standard instruction code value, and inquiring a target processing method associated with the target instruction code value according to the mapping relation and the target instruction code value.
Optionally, the processor 1001 invokes an instruction query program stored in the memory 1005, and may further execute the following steps:
defining a preset standard instruction code value as a preset data format, and defining a preset processing method as a preset function class;
and using a storage method adapted to the mapping relation to associate and store the defined standard instruction code value and the processing method.
Optionally, the processor 1001 invokes an instruction query program stored in the memory 1005, and may further execute the following steps:
acquiring instruction data in the test data, and processing the instruction data by using a preset verification algorithm to obtain a receiving verification value;
and comparing the receiving check value with the sending check value in the test data.
Optionally, the processor 1001 invokes an instruction query program stored in the memory 1005, and may further execute the following steps:
if the test data is not checked, generating a failure code;
and monitoring whether a preset data receiving node receives new test data according to the failure code.
Optionally, the processor 1001 invokes an instruction query program stored in the memory 1005, and may further execute the following steps:
and converting the data format of the test data into the preset data format, and taking the converted test data as the test instruction code value.
Optionally, the processor 1001 invokes an instruction query program stored in the memory 1005, and may further execute the following steps:
instantiating an object of at least one of the mapping relationship classes to provide an acquisition method adapted to the mapping relationship;
and calling the acquisition method to acquire a target processing method associated with the target instruction code value.
Optionally, the processor 1001 invokes an instruction query program stored in the memory 1005, and may further execute the following steps:
acquiring an instruction testing method in the target processing method, and executing the instruction testing method;
and if the instruction testing method is successfully executed, generating a success code.
An embodiment of the present invention provides an instruction query method, referring to fig. 2, fig. 2 is a flow chart of a first embodiment of the instruction query method of the present invention.
In this embodiment, the instruction query method includes:
step S10, a preset standard instruction code value and a processing method are stored in an associated mode through a preset mapping relation;
the present embodiment is described by taking an instruction query in a television function test process as an example. During testing, a serial port communication mode can be adopted between the upper testing computer and the tested television. The process of inquiring the instruction can be regarded as the process of inquiring the instruction processing method corresponding to the instruction, and after the inquiry is successful, the television can realize the corresponding test function according to the instruction processing method.
The instruction code value may be considered to be data containing instructions, including the index and check bits of the instructions. The index of the instruction may be used to query a particular type of instruction. Before the television function test is performed, the instruction code values containing different instructions and the processing methods of the instruction code values can be stored in the memory of the television in an associated mode, and after the television receives the instruction code values, the processing methods corresponding to the instruction code values can be quickly inquired.
The standard instruction code value can be formed according to each test function of the television, wherein the standard instruction code value contains data required by the television for performing the function test, and different standard instruction code values can correspond to different function test items. In the process of inquiring the instruction, the specific content of the instruction can be obtained by means of the index. The preset processing method corresponds to the preset standard instruction code value, and the preset processing method comprises various testing functions of the television.
As an example, step S10, the step of storing the preset standard instruction code value and the processing method in association with the preset mapping relationship may include:
and A1, defining a preset standard instruction code value as a preset data format, and defining a preset processing method as a preset function class. The preset mapping relation can be Hashmap (Hash mapping), which is a Map interface implementation based on a Hash table, and provides all optional mapping operations, and data is stored in a key-value (key value pair) manner. When defining the standard instruction code value, the standard instruction code value can be defined into a data format which is convenient to process according to the specification of the television, such as types of int (integer), byte (byte type), string (string type) and the like. In defining the processing method, the test function item of the television can be abstractly defined as a function class, wherein the function class comprises a run method.
And step A2, using a storage method adapted to the mapping relation to associate and store the defined standard instruction code value and the processing method. The storage method adapted to Hashmap may be Hashmap. And when the association is stored, taking the defined standard instruction code value as a key of the key value pair, and taking the defined processing method as a value of the key value pair. When specific processing logic is added, a run method of the function instance can be rewritten, and corresponding test functions are realized according to the test cases.
The code readability is improved, the development complexity is reduced, and the development and version control are convenient by storing standard instruction code values and processing methods through key value pairs.
Step S20, receiving test data sent by an upper computer, and checking the test data;
in the testing process, the upper computer can send testing data to the tested television through the RS232 protocol. In order to protect the integrity of the data, the television can check the test data to ensure that the data is received correctly.
As an example, step S20, receiving test data sent by the host computer, and verifying the test data may include:
and step B1, acquiring instruction data in the test data, and processing the instruction data by using a preset verification algorithm to obtain a receiving verification value. The preset checking algorithm may be a CRC (Cyclic Redundancy Check ) algorithm, where CRC is a channel coding technique that generates a short fixed bit check code according to data such as a network data packet or a computer file, and may detect or check errors that may occur after data transmission or storage. When the upper computer transmits test data, a sending check value can be calculated for the instruction data, and the test data comprises the instruction data and the sending check value when the upper computer is attached to the tail part of the instruction data in the data packet. After the television receives the test data, the same CRC algorithm is used for calculating the instruction data, and a receiving check value is obtained.
And step B2, comparing the receiving check value with the sending check value in the test data. If the received check value is consistent with the transmitted check value, the check can be indicated to pass; if the received check value is inconsistent with the transmitted check value, the check is not passed.
After receiving the test data, the data verification is carried out, so that the effectiveness of data transmission can be improved, and the incomplete test data caused by errors in the transmission process is avoided, so that the process of subsequent instruction inquiry is influenced.
Step S30, if the test data passes the verification, analyzing the test data to obtain a test instruction code value corresponding to the test data;
and checking the test data to be passed, which means that the test data received by the television is correct, and the step of inquiring the instruction can be started. In serial communication, data is generally transmitted in binary form, and standard instruction code values stored in a television have predefined data formats, so that test data can be analyzed first, and the data formats of the test data are converted into the same data formats as predefined data formats.
As an example, step S30, if the test data passes the verification, the step of analyzing the test data to obtain the test instruction code value corresponding to the test data may include:
and step C1, converting the data format of the test data into the preset data format, and taking the converted test data as the test instruction code value. In the parsing process, the binary test data sent by the upper computer is converted into a data format identical to the data format of the standard instruction code value, for example, if the data format of the standard instruction code value is byte, the test data is also converted into the byte format. The test instruction code value is the instruction code value sent by the upper computer and used for carrying out the current test function item. After the analysis of the test data is completed, the message processing module of the television can further process the test instruction code value. Analyzing the test data can be regarded as a test data preprocessing process, and the subsequent instruction query process is more facilitated through data format conversion.
And S40, determining a target instruction code value matched with the test instruction code value in the standard instruction code value, and inquiring a target processing method associated with the target instruction code value according to the mapping relation and the target instruction code value.
The standard instruction code value contains the instruction code value of each test function, the test instruction code value is the instruction code value of a specific test function in each test, and the test instruction code value is contained in the standard instruction code value, so that the target instruction code value in the standard instruction code value can be determined through the test instruction code value. The target instruction code value has the same data content as the test instruction code value. Based on the standard instruction code value and the processing method which are stored in an associated way, the target processing method which is associated with the target instruction code value can be inquired through the mapping relation. The target processing method is a processing method associated with the target instruction code value among the preset processing methods.
As an example, step S40, determining a target instruction code value matching the test instruction code value from the standard instruction code values, and querying a target processing method associated with the target instruction code value according to the mapping relationship and the target instruction code value may include:
and D1, instantiating the object of at least one mapping relation class to provide an acquisition method adapted to the mapping relation. When the data is stored through the Hashmap, hashmap objects stored in keys and values can be instantiated in the instruction processing service when the query is performed. The Hashmap-adapted acquisition method may be the Hashmap.
And D2, calling the acquisition method to acquire a target processing method associated with the target instruction code value. And calling a hashmap-get method to acquire a function object corresponding to a key (target instruction code value), namely a target processing method. After the target processing method is successfully obtained, the instruction query can be considered as successful. In the actual television function test process, after the instruction inquiry is successful, the corresponding function test can be performed according to the test data. The hashmap-get method uses a pointer mode to call the function, improves the encapsulation of codes, reduces the coupling degree and redundancy between functions, and is more beneficial to development and maintenance.
In the traditional serial port instruction inquiry mode, an inquiry process of traversing is needed, and the instruction code values are matched one by one until the matching is successful. The number of times of query traversing the query mode is at least one and in most cases is more than one, and after the instructions are stored through the Hashmap, the Hashmap. Get method is equivalent to the fact that the query process can be completed only once, and the instruction query efficiency is greatly improved.
In this embodiment, a preset standard instruction code value and a processing method are stored in an associated manner through a preset mapping relation; receiving test data sent by an upper computer, and checking the test data; if the test data passes the verification, analyzing the test data to obtain a test instruction code value corresponding to the test data; determining a target instruction code value matched with the test instruction code value in the standard instruction code value, inquiring a target processing method associated with the target instruction code value according to the mapping relation and the target instruction code value, storing the instruction code value and the processing method in a first associated mode, directly inquiring the processing method corresponding to the instruction through the mapping relation without traversing when inquiring the instruction, improving the instruction inquiring efficiency, carrying out data verification before inquiring the instruction, and improving the effectiveness of data transmission.
Further, in a second embodiment of the instruction query method of the present invention, referring to fig. 3, the method includes:
step S11, if the test data is not checked, generating a failure code;
the present embodiment is described by taking an instruction query in a television function test process as an example. And the sending check value in the test data is inconsistent with the receiving check value obtained by CRC algorithm processing, which indicates that the test data is not checked. The serial port communication mode is adopted between the television and the upper computer, and the television comprises serial port communication ports for serial port communication. After the test data is not checked, a failure code indicating that the check is not passed can be generated, the failure code is returned to the serial port, and the received test data does not need to be subjected to the subsequent instruction inquiry step.
Step S12, monitoring whether a preset data receiving node receives new test data or not according to the failure code.
The upper computer is connected with the television through the serial port, and the television can be regarded as serial port equipment of the upper computer. The serial port corresponds to the device name of/dev/tts/0 (or/dev/ttyS 0),/dev/tts/1 (or/dev/ttyS 1), etc., corresponding to COM1, COM2, etc. under DOS (Disk Operating System ), respectively. After the failure code is returned, the television can monitor the ttyS1 node through serial ports to detect whether new test data is received.
In one possible implementation, the step of listening to the ttyS1 node may also be performed before verifying the test data. After the serial port communication between the upper computer and the television is established, the serial port of the television monitors the ttyS1 node, and when the upper computer sends test data to the serial port, the television can respond quickly to check the test data.
In this embodiment, if the test data is not checked, a failure code is returned, the validity of the received test data can be ensured through data check, and the monitoring serial service node can perform quick response on the received test data.
Further, in a third embodiment of the instruction query method of the present invention, referring to fig. 4, the method includes:
step S21, an instruction testing method in the target processing method is obtained, and the instruction testing method is executed;
the present embodiment is described by taking an instruction query in a television function test process as an example. And carrying out data storage through the Hashmap, abstractly defining a processing method as a function class, wherein an instance of the function class can be stored in a memory of the television by using the hashmap.put method as a value of a key value pair. The function class may contain run methods. After the function object corresponding to the target instruction code value is obtained through the hashmap. Get method, the function object can be regarded as the process of completing the instruction inquiry. Further, a run method in the function class can be called, an instruction test method corresponding to the function of the television is executed, and the instruction test method comprises service processing logic to test whether the function of the television is normal.
Specific business processing logic may also be added to the instruction testing method. When the step of adding business processing logic is carried out, the run method of the function instance is rewritten, and the corresponding test function can be realized according to the test case. The method uses the rewriting mode to define the functions, improves the abstract and the conciseness of the functions, and is more beneficial to later development and maintenance.
Step S22, if the instruction testing method is successfully executed, a success code is generated.
The television successfully executes the instruction testing method, can generate a success code which indicates that the instruction code value in the testing data is queried and executed successfully, continuously receives new testing data, and completes the testing process of each function of the television. The instruction test method may fail to execute, or may generate a failure code indicating that the instruction test method fails to execute.
In this embodiment, after the processing method associated with the target instruction code value is successfully queried, the instruction testing method is executed, so that the efficiency of function testing can be improved while the instruction querying efficiency is improved, and the abstract and conciseness of the testing function can be improved by adding the service processing logic into the instruction testing method in a rewriting manner, thereby being beneficial to later development and maintenance.
The embodiment of the invention also provides an instruction query device, as shown in fig. 5, which comprises:
a storage module 101, configured to store a preset standard instruction code value and a processing method in association with each other through a preset mapping relationship;
the verification module 102 is configured to receive test data sent by the upper computer, and verify the test data;
the parsing module 103 is configured to parse the test data if the test data passes the verification, so as to obtain a test instruction code value corresponding to the test data;
and the obtaining module 104 is configured to determine a target instruction code value matched with the test instruction code value from the standard instruction code values, and query a target processing method associated with the target instruction code value according to the mapping relationship and the target instruction code value.
Optionally, the storage module 101 is further configured to:
defining a preset standard instruction code value as a preset data format, and defining a preset processing method as a preset function class;
and using a storage method adapted to the mapping relation to associate and store the defined standard instruction code value and the processing method.
Optionally, the verification module 102 is further configured to:
acquiring instruction data in the test data, and processing the instruction data by using a preset verification algorithm to obtain a receiving verification value;
and comparing the receiving check value with the sending check value in the test data.
Optionally, the instruction query device further includes a monitoring module, where the monitoring module is configured to:
if the test data is not checked, generating a failure code;
and monitoring whether a preset data receiving node receives new test data according to the failure code.
Optionally, the parsing module 103 is further configured to:
and converting the data format of the test data into the preset data format, and taking the converted test data as the test instruction code value.
Optionally, the obtaining module 104 is further configured to:
instantiating an object of at least one of the mapping relationship classes to provide an acquisition method adapted to the mapping relationship;
and calling the acquisition method to acquire a target processing method associated with the target instruction code value.
Optionally, the obtaining module 104 is further configured to:
acquiring an instruction testing method in the target processing method, and executing the instruction testing method;
and if the instruction testing method is successfully executed, generating a success code.
The embodiment of the invention also provides electronic equipment, which comprises: a memory, a processor, and an instruction query program stored on the memory and executable on the processor, the instruction query program configured to implement the steps of the instruction query method as described above. The specific embodiments of the electronic device of the present invention refer to various embodiments of the instruction query method, and are not described herein again.
Embodiments of the present invention also provide a computer-readable storage medium having stored thereon an instruction inquiry program which, when executed by a processor, implements the steps of the instruction inquiry method as described above. The specific embodiments of the computer readable storage medium of the present invention refer to various embodiments of the instruction query method, and are not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (9)

1. An instruction query method, characterized in that the instruction query method comprises the following steps:
the method comprises the steps of storing a preset standard instruction code value and a processing method in an associated mode through a preset mapping relation;
receiving test data sent by an upper computer, and checking the test data;
if the test data passes the verification, converting the data format of the test data into the data format which is the same as the standard instruction code value, and taking the converted test data as the test instruction code value;
and determining a target instruction code value matched with the test instruction code value in the standard instruction code value, and inquiring a target processing method associated with the target instruction code value according to the mapping relation and the target instruction code value.
2. The method for querying an instruction according to claim 1, wherein the step of storing the preset standard instruction code value and the processing method in association with each other by a preset mapping relation comprises the steps of:
defining a preset standard instruction code value as a preset data format, and defining a preset processing method as a preset function class;
and using a storage method adapted to the mapping relation to associate and store the defined standard instruction code value and the processing method.
3. The method of claim 1, wherein the step of verifying the test data comprises:
acquiring instruction data in the test data, and processing the instruction data by using a preset verification algorithm to obtain a receiving verification value;
and comparing the receiving check value with the sending check value in the test data.
4. The method of claim 1, further comprising, after said step of receiving test data sent by the host computer and verifying said test data:
if the test data is not checked, generating a failure code;
and monitoring whether a preset data receiving node receives new test data according to the failure code.
5. The instruction query method according to claim 1, wherein the step of querying the target processing method associated with the target instruction code value according to the mapping relation and the target instruction code value comprises:
instantiating an object of at least one of the mapping relationship classes to provide an acquisition method adapted to the mapping relationship;
and calling the acquisition method to acquire a target processing method associated with the target instruction code value.
6. An instruction query method as claimed in any one of claims 1 to 5, wherein said determining a target instruction code value in said standard instruction code values that matches said test instruction code value, after said querying a processing method associated with said target instruction code value according to said mapping relationship and said target instruction code value, further comprises:
acquiring an instruction testing method in the target processing method, and executing the instruction testing method;
and if the instruction testing method is successfully executed, generating a success code.
7. An instruction inquiry apparatus, characterized in that the instruction inquiry apparatus includes:
the storage module is used for storing a preset standard instruction code value and a processing method in an associated mode through a preset mapping relation;
the verification module is used for receiving the test data sent by the upper computer and verifying the test data;
the analysis module is used for converting the data format of the test data into the data format identical to the standard instruction code value if the test data passes the verification, and the converted test data is used as the test instruction code value;
and the acquisition module is used for determining a target instruction code value matched with the test instruction code value in the standard instruction code value, and inquiring a target processing method associated with the target instruction code value according to the mapping relation and the target instruction code value.
8. An electronic device, the electronic device comprising: a memory, a processor and an instruction query program stored on the memory and executable on the processor, the instruction query program being configured to implement the steps of the instruction query method of any of claims 1 to 6.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon an instruction inquiry program which, when executed by a processor, implements the steps of the instruction inquiry method according to any one of claims 1 to 6.
CN202210511941.6A 2022-05-11 2022-05-11 Instruction query method, device, equipment and storage medium Active CN114915549B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210511941.6A CN114915549B (en) 2022-05-11 2022-05-11 Instruction query method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210511941.6A CN114915549B (en) 2022-05-11 2022-05-11 Instruction query method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114915549A CN114915549A (en) 2022-08-16
CN114915549B true CN114915549B (en) 2024-03-22

Family

ID=82766700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210511941.6A Active CN114915549B (en) 2022-05-11 2022-05-11 Instruction query method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114915549B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106792031A (en) * 2017-01-06 2017-05-31 深圳创维-Rgb电子有限公司 A kind of method and apparatus for controlling peripheral equipment of television
CN207884797U (en) * 2018-02-28 2018-09-18 深圳市金锐显数码科技有限公司 A kind of television set board testing host and equipment
CN108965072A (en) * 2018-07-06 2018-12-07 南京苏博曼纳软件科技有限公司 A kind of intelligent gateway external equipment association control method
CN111367943A (en) * 2018-12-26 2020-07-03 中兴通讯股份有限公司 Data transmission verification method, system, computer equipment and storage medium
WO2021003975A1 (en) * 2019-07-11 2021-01-14 深圳壹账通智能科技有限公司 Gateway interface test method, terminal device, storage medium and apparatus
CN114265865A (en) * 2021-12-24 2022-04-01 北京天融信网络安全技术有限公司 Data query method, system, electronic device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106792031A (en) * 2017-01-06 2017-05-31 深圳创维-Rgb电子有限公司 A kind of method and apparatus for controlling peripheral equipment of television
CN207884797U (en) * 2018-02-28 2018-09-18 深圳市金锐显数码科技有限公司 A kind of television set board testing host and equipment
CN108965072A (en) * 2018-07-06 2018-12-07 南京苏博曼纳软件科技有限公司 A kind of intelligent gateway external equipment association control method
CN111367943A (en) * 2018-12-26 2020-07-03 中兴通讯股份有限公司 Data transmission verification method, system, computer equipment and storage medium
WO2021003975A1 (en) * 2019-07-11 2021-01-14 深圳壹账通智能科技有限公司 Gateway interface test method, terminal device, storage medium and apparatus
CN114265865A (en) * 2021-12-24 2022-04-01 北京天融信网络安全技术有限公司 Data query method, system, electronic device and storage medium

Also Published As

Publication number Publication date
CN114915549A (en) 2022-08-16

Similar Documents

Publication Publication Date Title
CN110287109B (en) Protocol interface testing method and device, computer equipment and storage medium thereof
CN111813701B (en) HTTP-based interface testing method and device, computer equipment and storage medium
CN110888838B (en) Request processing method, device, equipment and storage medium based on object storage
US20210303454A1 (en) Method, device, and program product for evaluating application program interface
CN114500690B (en) Interface data processing method and device, electronic equipment and storage medium
CN112187558B (en) Data verification method and device and electronic equipment
CN112380046B (en) Calculation result verification method, system, device, equipment and storage medium
CN111782526A (en) Interface testing method and device, electronic equipment and storage medium
CN114185808A (en) Automatic testing method and device, electronic equipment and computer readable storage medium
CN114915549B (en) Instruction query method, device, equipment and storage medium
CN112737942B (en) Service route switching method, device, equipment and medium
CN115599683A (en) Automatic testing method, device, equipment and storage medium
CN114936227A (en) Data verification method, data verification system, electronic device and storage medium
CN114374745A (en) Protocol format processing method and system
CN112433709A (en) JSON-based data processing method, device, equipment and medium
CN113438225A (en) Vehicle-mounted terminal vulnerability detection method, system, equipment and storage medium
CN115695504B (en) Internet of things platform communication method, device, equipment and storage medium
CN115795488B (en) Code detection system and code detection method
CN115065540B (en) Method and device for detecting web vulnerability attack and electronic equipment
CN117707653B (en) Parameter monitoring method, device, electronic equipment and computer readable storage medium
CN113141366B (en) Message submitting method and device, storage medium and electronic equipment
CN110099096B (en) Application program configuration method, device, computer equipment and storage medium
CN117194259A (en) Interface testing method, system, electronic equipment and storage medium
CN117544616A (en) Vehicle-end OTA upgrading method and device, electronic equipment and readable storage medium
CN114817064A (en) Automatic judgment method and device for safety test result

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
GR01 Patent grant
GR01 Patent grant