CN109299223B - Method and device for inquiring instruction - Google Patents

Method and device for inquiring instruction Download PDF

Info

Publication number
CN109299223B
CN109299223B CN201811198911.4A CN201811198911A CN109299223B CN 109299223 B CN109299223 B CN 109299223B CN 201811198911 A CN201811198911 A CN 201811198911A CN 109299223 B CN109299223 B CN 109299223B
Authority
CN
China
Prior art keywords
instruction
query
description file
library
network
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
CN201811198911.4A
Other languages
Chinese (zh)
Other versions
CN109299223A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201811198911.4A priority Critical patent/CN109299223B/en
Publication of CN109299223A publication Critical patent/CN109299223A/en
Application granted granted Critical
Publication of CN109299223B publication Critical patent/CN109299223B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the application discloses a method and a device for inquiring an instruction. One embodiment of the method comprises: acquiring a first query instruction, and querying an instruction number corresponding to the first query instruction through an instruction library description file, wherein the instruction library description file identifies a query relationship among instructions in an instruction library through the instruction number; responding to the existence of at least one instruction number corresponding to the first query instruction, and displaying a page corresponding to the first query instruction, wherein the page comprises at least one instruction identifier corresponding to the at least one instruction number; and in response to the acquisition of a second query instruction corresponding to an instruction identifier in at least one instruction identifier in the page, querying an instruction corresponding to the instruction identifier through the instruction library description file. The implementation mode reduces the data processing amount in the instruction obtaining process and is beneficial to improving the data processing efficiency.

Description

Method and device for inquiring instruction
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method and a device for querying an instruction.
Background
An embedded system is a system for controlling or monitoring a large-scale device such as a machine, an apparatus, a factory, or the like. Typically, the embedded system may be an embedded processor control board with a control program stored in data storage. In practice, the data storage space of the embedded system is small, and a small amount of data is generally operated.
Disclosure of Invention
The embodiment of the application provides a method and a device for inquiring an instruction.
In a first aspect, an embodiment of the present application provides a method for querying an instruction, where the method includes: acquiring a first query instruction, and querying an instruction number corresponding to the first query instruction through an instruction library description file, wherein the instruction library description file identifies a query relation among instructions in an instruction library through the instruction number, and the instruction number corresponds to an actual instruction; responding to the existence of at least one instruction number corresponding to the first query instruction, and displaying a page corresponding to the first query instruction, wherein the page comprises at least one instruction identifier corresponding to the at least one instruction number; in response to the second query instruction corresponding to the instruction identifier in the at least one instruction identifier in the page is acquired, the instruction corresponding to the instruction identifier is queried through the instruction library description file, the target instruction number corresponding to the instruction identifier is queried through the instruction library description file, a final instruction network is queried, and the target instruction corresponding to the target instruction number is acquired, wherein the final instruction network comprises at least one instruction, and at least one instruction contained in the final instruction network is provided with a corresponding instruction number.
In some embodiments, the instruction library description file is constructed by: setting at least one instruction according to the structural relationship between files in a file library, wherein the files are displayed through pages, and the instruction is used for calling the files in the file library; constructing an initial instruction network according to the structural relationship and at least one instruction, wherein the initial instruction network comprises the at least one instruction and link data among the instructions in the at least one instruction, and the link data is used for inquiring the relationship among the instructions; and setting an instruction number for the instruction in the at least one instruction, and constructing an instruction library description file according to the instruction number and the query relation.
In some embodiments, the building the instruction library description file according to the instruction number and the query relationship includes: constructing an instruction table containing at least one instruction number; and for the instruction number in the at least one instruction number, determining other instruction numbers corresponding to the instruction number through the query relation, and marking the other instruction numbers behind the instruction number.
In some embodiments, the building the instruction library description file according to the instruction number and the query relationship further includes: and deleting the link data in the initial instruction network to obtain a final instruction network.
In some embodiments, the above method further comprises: and executing the instruction operation corresponding to the first query instruction in response to the absence of the instruction number corresponding to the first query instruction.
In a second aspect, an embodiment of the present application provides an apparatus for querying an instruction, where the apparatus includes: the query unit of the instruction number is configured to obtain a first query instruction, and query an instruction number corresponding to the first query instruction through an instruction library description file, wherein the instruction library description file identifies a query relation among instructions in an instruction library through the instruction number, and the instruction number corresponds to an actual instruction; the page display unit is used for responding to the existence of at least one instruction number corresponding to the first query instruction and is configured to display a page corresponding to the first query instruction, and the page comprises at least one instruction identification corresponding to the at least one instruction number; the instruction query unit, in response to acquiring a second query instruction corresponding to an instruction identifier in at least one instruction identifier in the page, includes a target instruction number query subunit and a target instruction query subunit, where the target instruction number query subunit is configured to query, through the instruction library description file, a target instruction number corresponding to the instruction identifier, and the target instruction query subunit is configured to query the final instruction network to obtain a target instruction corresponding to the target instruction number, where the final instruction network includes at least one instruction, and at least one instruction included in the final instruction network is provided with a corresponding instruction number.
In some embodiments, the apparatus includes an instruction library description file constructing unit configured to construct an instruction library description file, the instruction library description file constructing unit including: the instruction setting subunit is configured to set at least one instruction according to the structural relationship between the files in the file library, wherein the files are displayed through pages, and the instruction is used for calling between the files in the file library; an initial instruction network construction subunit, configured to construct an initial instruction network according to the structural relationship and at least one instruction, where the initial instruction network includes the at least one instruction and link data between instructions in the at least one instruction, and the link data is used for a query relationship between instructions; and the instruction library description file constructing subunit is configured to set an instruction number for the instruction in the at least one instruction, and construct an instruction library description file according to the instruction number and the query relation.
In some embodiments, the instruction library description file constructing subunit includes: an instruction table construction module configured to construct an instruction table including at least one instruction number; and the instruction library description file construction module is configured to determine other instruction numbers corresponding to the instruction number according to the query relation for the instruction number in the at least one instruction number, and mark the other instruction numbers behind the instruction number.
In some embodiments, the instruction library description file constructing subunit further includes: and the final instruction network acquisition module is configured to delete the link data in the initial instruction network to obtain a final instruction network.
In some embodiments, the instruction query unit includes: the target instruction number inquiry subunit is configured to inquire a target instruction number corresponding to the instruction identifier through the instruction library description file; and the target instruction inquiry subunit is configured to inquire the final instruction network to obtain a target instruction corresponding to the target instruction number.
In some embodiments, the above apparatus further comprises: and the instruction execution unit is used for responding to the absence of the instruction number corresponding to the first query instruction and executing the instruction operation corresponding to the first query instruction.
In a third aspect, an embodiment of the present application provides a server, including: one or more processors; memory having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to perform the method for querying instructions of the first aspect.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, where the computer program is used to implement the method for querying instructions of the first aspect when executed by a processor.
The method and the device for inquiring the instruction, provided by the embodiment of the application, firstly obtain a first inquiry instruction, inquire an instruction number corresponding to the first inquiry instruction through an instruction library description file, identify an inquiry relation between instructions in an instruction library through the instruction number by the instruction library description file, and use the instruction number for identifying the instruction having the inquiry relation with the inquiry instruction; then when the first query instruction corresponds to the instruction number, displaying a page corresponding to the first query instruction; and finally, after a second query instruction corresponding to the instruction identifier in the page is obtained, querying the instruction corresponding to the instruction identifier through an instruction library description file. Because the instruction library description file only records the instruction number and the query relation, the data processing amount in the instruction acquisition process is reduced, and the data processing efficiency is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flow diagram for one embodiment of a method for querying instructions, in accordance with the present application;
FIG. 3 is a schematic diagram of an application scenario of a method for querying instructions according to the present application;
FIG. 4 is a flow diagram for one embodiment of an instruction library description file construction method according to the present application;
FIG. 5 is a block diagram illustrating one embodiment of an apparatus for querying instructions according to the present application;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which a method for querying an instruction or an apparatus for querying an instruction of embodiments of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various client applications installed thereon, such as a web browser application, a shopping-like application, a search-like application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen and supporting instruction processing, including but not limited to a monitor, a controller, a smart phone, a tablet computer, an e-book reader, an MP3 player (Moving Picture Experts group Audio Layer III, motion Picture Experts group Audio Layer IV, motion Picture Experts group Audio Layer 4), an MP4 player, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as a plurality of software or software modules (for example, for providing distributed services), or as a single software or software module, which is not specifically limited herein.
The server 105 may be a server that provides various services, for example, a server that performs instruction processing according to an inquiry instruction sent from the terminal apparatuses 101, 102, 103. The server can inquire the corresponding instruction number according to the received inquiry instruction and inquire other instructions according to the instruction number.
It should be noted that the method for querying an instruction provided in the embodiment of the present application may be executed by the terminal devices 101, 102, and 103 individually, or may also be executed by the terminal devices 101, 102, and 103 and the server 105 together. Accordingly, the means for querying the instruction may be provided in the terminal devices 101, 102, 103, or in the server 105.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (for example, to provide distributed services), or may be implemented as a single software or software module, and is not limited specifically herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for querying an instruction in accordance with the present application is shown. The method for querying instructions comprises the following steps:
step 201, a first query instruction is obtained, and an instruction number corresponding to the first query instruction is queried through an instruction library description file.
In this embodiment, an execution subject of the method for querying an instruction (e.g., the terminal device 101, 102, 103 or the server 105 shown in fig. 1) may obtain the first query instruction by a wired connection manner or a wireless connection manner. The first query instruction may be an instruction obtained by the execution subject when the user performs a subject operation or performs an operation on the execution subject. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
With the development of technology, various intelligent data processing technologies (for example, a voice control technology) can also be applied to an embedded system. However, these intelligent data processing technologies usually include a large instruction library, and the instructions in the instruction library usually include characters and symbols with various characters, and require additional link data to realize the call between the instructions. And the link data may occupy more memory than the instructions themselves. Therefore, when the intelligent data processing technology is applied to the embedded system, a large amount of storage space is occupied, and the operation efficiency of the embedded system is reduced.
The method comprises the steps that after a first query instruction is obtained, an execution main body queries an instruction number corresponding to the first query instruction through an instruction library description file, wherein the first query instruction can not be an actual instruction of the execution main body but a spoken language which is frequently used by a user.
Step 202, in response to the existence of at least one instruction number corresponding to the first query instruction, displaying a page corresponding to the first query instruction, where the page includes at least one instruction identifier corresponding to the at least one instruction number.
When the execution main body finds that the first query instruction corresponds to at least one instruction number through the query instruction library description file, a page corresponding to the first query instruction can be displayed for further selection of a user. The page may include an instruction identifier corresponding to the instruction number. For example, a user sends a first query instruction "i want to entertain" in a voice manner, and after the first query instruction is received by the execution main body, the semantic recognition shows that the first query instruction is the same as the actual instruction "query multimedia" on the execution main body, and then queries a multimedia library on the execution main body. After the execution main body finds that a plurality of instruction numbers (the instruction numbers may correspond to selection instructions such as "song", "movie", "animation", "vocal", "return to the upper level", "next level", and the like) correspond to the first query instruction (i.e., the instruction "query multimedia"), through the instruction library description file, the execution main body indicates that the first query instruction can also perform subsequent operations. At this time, the execution subject may display the multimedia library page corresponding to the first query instruction. The multimedia library page can be provided with buttons with instruction identifications such as 'song', 'movie', 'animation', 'voice', 'return to the upper level' and 'next level', and the like, so that the user can further operate the multimedia library.
Step 203, in response to acquiring a second query instruction corresponding to an instruction identifier in at least one instruction identifier in the page, querying an instruction corresponding to the instruction identifier through the instruction library description file.
After displaying the page corresponding to the query instruction, the user may further issue a second query instruction according to the instruction identifier on the page. Similar to the first query instruction, the second query instruction may not be an actual instruction of the execution subject, but may be a spoken language more commonly used by the user. And the execution main body performs semantic recognition and other operations on the second query instruction, and finds that the second query instruction is closest to one of the instruction identifications. For example, the second query instruction may be "i want to watch movie", and the execution subject may determine by semantic recognition that the second query instruction is closest to the instruction identification "movie". Then, the execution subject can query the instruction corresponding to the instruction identification through the instruction library description file. Therefore, a third query instruction, a fourth query instruction and the like can be obtained, and the layer-by-layer search of the instructions is realized.
In some optional implementation manners of this embodiment, the querying, by using the instruction library description file, an instruction corresponding to the instruction identifier may include the following steps:
firstly, a target instruction number corresponding to the instruction identification is inquired through the instruction library description file.
As can be seen from the above description, the instruction ID also corresponds to the instruction number. Therefore, when the second query instruction corresponds to a certain instruction identifier, the execution main body can query the instruction number corresponding to the instruction identifier through the instruction library description file, and set the instruction number as the target instruction number.
And secondly, inquiring a final instruction network to obtain a target instruction corresponding to the target instruction number.
After the target instruction number is obtained, the execution main body can inquire an actual target instruction corresponding to the target instruction number through a final instruction network. The final instruction network comprises at least one instruction, and the at least one instruction contained in the final instruction network is provided with a corresponding instruction number.
In some optional implementations of this embodiment, the method may further include: and executing the instruction operation corresponding to the first query instruction in response to the absence of the instruction number corresponding to the first query instruction.
In practice, there are also situations where the execution entity cannot find the instruction number corresponding to the first search instruction. At this time, it may be considered that the first search instruction has no instruction of the next stage, and the execution subject may directly execute the instruction operation corresponding to the first search instruction. For example, if the first search instruction is "shutdown", the execution subject may directly perform a shutdown operation.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for querying an instruction according to the present embodiment. In the application scenario of fig. 3, the user issues a first query instruction "watch movie" to the terminal device 102 (execution subject). The terminal device 102 determines the corresponding instruction number through the instruction library description file, and finds that the first query instruction "watch movie" is the same as the instruction "query multimedia", and the instruction "query multimedia" corresponds to the instruction numbers of "song", "movie", "animation", "phase sound", and the like. That is, the "multimedia" page on the terminal device 102 contains subdivided categories of "songs", "movies", "animations", "voices", etc. At this time, the terminal device 102 may display a "multimedia" page, where the "multimedia" page includes instruction identifiers such as "song", "movie", "animation", and "vocal", and these instruction identifiers correspond to instruction numbers such as "song", "movie", "animation", and "vocal". After the user sees the multimedia page, the user further sends a second query instruction 'watch movie'. The terminal device 102 further queries the instruction corresponding to the "movie" instruction identifier through the instruction library description file.
The method provided by the embodiment of the application comprises the steps of firstly obtaining a first query instruction, querying an instruction number corresponding to the first query instruction through an instruction library description file, identifying a query relation between instructions in an instruction library through the instruction number by the instruction library description file, and identifying the instruction having the query relation with the query instruction through the instruction number; then when the first query instruction corresponds to the instruction number, displaying a page corresponding to the first query instruction; and finally, after a second query instruction corresponding to the instruction identifier in the page is obtained, querying the instruction corresponding to the instruction identifier through an instruction library description file. Because the instruction library description file only records the instruction number and the query relation, the data processing amount in the instruction acquisition process is reduced, and the data processing efficiency is improved.
With further reference to FIG. 4, a flow 400 of yet another embodiment of an instruction library description file build method is illustrated. The process 400 of the instruction library description file construction method includes the following steps:
step 401, setting at least one instruction according to the structural relationship between the files in the file library.
In the present embodiment, an execution subject (for example, the server 105 shown in fig. 1) on which the instruction library description file construction method is executed may set at least one instruction according to a structural relationship between files in the file library in a wired connection manner or a wireless connection manner.
The execution body usually contains a document library, and the document library can contain images, characters and other types of documents. And the files in the file library typically have corresponding file library structures (e.g., may be: XX family, XX order, XX book, XX chapter, XX section, etc.) for classification or query of the files. The execution body may set at least one instruction according to a structural relationship between files in the file library (i.e., a file library structure), so that a user can query between files according to the instruction. The files may be displayed via a page for easy presentation to the user. For example, a document such as an image, text, or the like is displayed on a page. The above instructions may be used for calls between files in a library of files.
And step 402, constructing an initial instruction network according to the structural relationship and the at least one instruction.
After the execution main body sets the instruction according to the structural relationship, an initial instruction network can be established according to the structural relationship and the instruction. As shown in step 401, the set instructions can realize mutual calling between files. And then, referring to the structural relationship of the files in the file library, the mutual association relationship among the instructions can be established, and further an initial instruction network is established. For example: the structure relationship of the files in the file library is as follows: the next level of the file A is a file B and a file C; the next level of file B is file D and file E. The execution agent may set instruction 1 for calling file B from file a, instruction 2 for calling file C from file a; instruction 3 for calling file D from file B; instruction 4 for calling file E from file B. Based on the structural relationships and instructions between the files, the initial network of instructions may then include: instruction 1 → instruction 3; instruction 1 → instruction 4; instruction 2. Wherein: "→" to link the data. For the actual structural relationship of the file library files, the initial instruction network may also be more complex, and is not described in detail here. As can be seen from the above description, the initial instruction network may include the at least one instruction and link data between instructions in the at least one instruction. The link data is used for query relation between instructions, and in practice, the larger and more complex the initial instruction network is, the larger and more complex the link data becomes. When the initial command network reaches a certain size, the memory space occupied by the link data can be much larger than the command itself.
And 403, setting an instruction number for the instruction in the at least one instruction, and constructing an instruction library description file according to the instruction number and the query relationship.
In order to increase the query speed of the instruction, the execution body may set an instruction number for the instruction. The instruction number is used for marking the instruction, and can be a symbol or a number, or can be a simple combination of a coincidence number and a number. Typically, instruction numbers occupy much less memory space than instructions. Then, the execution subject can build an instruction library description file according to the instruction number and the query relation.
In some optional implementation manners of this embodiment, building the instruction library description file according to the instruction number and the query relationship may include the following steps:
in a first step, an instruction table is constructed that includes at least one instruction number.
To enable fast querying of instruction numbers, the execution body may build an instruction table containing at least one instruction number. The instruction numbers in the initial instruction network may be sorted and filled into corresponding rows in the instruction table, i.e. each row of the instruction table contains only one instruction number. The instruction table can also be filled with instruction numbers in a column mode and the like, and the specific requirement is determined.
And secondly, determining other instruction numbers corresponding to the instruction number according to the query relation for the instruction number in the at least one instruction number, and marking the other instruction numbers behind the instruction number.
The above-described instruction 1, instruction 2, instruction 3, and instruction 4 are also taken as examples. Instruction 1 → instruction 3; instruction 1 → instruction 4. I.e. instruction 1 has link data with instruction 3 and instruction 4, respectively, then instruction 1 has a query relationship with instruction 3 and instruction 4, respectively. At this time, the execution subject may fill in the instruction number of instruction 3 and the instruction number of instruction 4 after the instruction number corresponding to instruction 1 in the instruction table, so as to represent that instruction 1 has a query relationship with instruction 3 and instruction 4. Similarly, the execution subject may fill in the corresponding instruction number after the other instruction numbers according to the query relationship. Therefore, according to the query relation, the instruction numbers in the instruction list are filled with other corresponding instruction numbers, and the instruction library description file is obtained. It can be seen that the instruction library description file only contains the instruction number. Because the storage space occupied by the instruction number is small, the storage space occupied by the corresponding instruction library description file is also small, the instruction library description file is convenient to call into the memory when the main execution body carries out instruction query, and the instruction is quickly searched according to the instruction library description file.
In some optional implementation manners of this embodiment, after constructing the instruction library description file according to the instruction number and the query relationship, the method may further include: and deleting the link data in the initial instruction network to obtain a final instruction network.
After the instruction library description file is obtained, the execution main body can quickly inquire the inquiry relation among the instructions according to the instruction library description file, and the instructions are inquired without the link data in the initial instruction network. Therefore, after obtaining the instruction library description file, the execution subject may delete the link data in the initial instruction network to obtain the final instruction network. Therefore, the final instruction network has no link data, the structural complexity of the final instruction network is greatly reduced, and the storage space of the final instruction network is also greatly reduced. At this time, the instruction in the final instruction network has the instruction number, and the corresponding instruction can be rapidly inquired according to the instruction number.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an apparatus for querying an instruction, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 5, the apparatus 500 for querying an instruction according to the present embodiment may include: an instruction number search unit 501, a page display unit 502, and an instruction search unit 503. The instruction number query unit 501 is configured to obtain a first query instruction, and query an instruction number corresponding to the first query instruction through an instruction library description file, where the instruction library description file identifies a query relationship between instructions in an instruction library through the instruction number; a page display unit 502, configured to display a page corresponding to the first query instruction in response to the existence of at least one instruction number corresponding to the first query instruction, where the page includes at least one instruction identifier corresponding to the at least one instruction number; the instruction query unit 503, in response to acquiring a second query instruction corresponding to an instruction identifier in at least one instruction identifier in the page, is configured to query an instruction corresponding to the instruction identifier through the instruction library description file.
In some optional implementations of this embodiment, the apparatus 500 for querying an instruction may include an instruction library description file constructing unit (not shown in the figure) configured to construct an instruction library description file, where the instruction library description file constructing unit may include: an instruction setting subunit (not shown in the figure), an initial instruction network construction subunit (not shown in the figure), and an instruction library profile construction subunit (not shown in the figure). The instruction setting subunit is configured to set at least one instruction according to a structural relationship between files in a file library, wherein the files are displayed through pages, and the instruction is used for calling between the files in the file library; the initial instruction network construction subunit is configured to construct an initial instruction network according to the structural relationship and at least one instruction, wherein the initial instruction network comprises the at least one instruction and link data between the instructions in the at least one instruction, and the link data is used for inquiring relationship between the instructions; the instruction library description file constructing subunit is configured to set an instruction number for an instruction in the at least one instruction, and construct an instruction library description file according to the instruction number and the query relationship.
In some optional implementations of this embodiment, the instruction library description file constructing subunit may include: an instruction list building module (not shown) and an instruction library description file building module (not shown). Wherein the instruction table construction module is configured to construct an instruction table containing at least one instruction number; and the instruction library description file construction module is configured to determine other instruction numbers corresponding to the instruction number according to the query relation for the instruction number in the at least one instruction number, and mark the other instruction numbers behind the instruction number.
In some optional implementation manners of this embodiment, the instruction library description file constructing subunit may further include: and a final instruction network obtaining module (not shown in the figure) configured to delete the link data in the initial instruction network to obtain a final instruction network.
In some optional implementations of this embodiment, the instruction querying unit 503 may include: a target instruction number query subunit (not shown) and a target instruction query subunit (not shown). The target instruction number inquiry subunit is configured to inquire a target instruction number corresponding to the instruction identifier through the instruction library description file; the target instruction inquiry subunit is configured to inquire the final instruction network to obtain a target instruction corresponding to the target instruction number.
In some optional implementations of this embodiment, the apparatus 500 for querying an instruction may further include: and an instruction execution unit (not shown in the figure) which is configured to execute the instruction operation corresponding to the first query instruction in response to the absence of the instruction number corresponding to the first query instruction.
The present embodiment further provides a server, including: one or more processors; a memory having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to perform the above-described method for querying instructions.
The present embodiment also provides a computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, carries out the above-mentioned method for querying instructions.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use in implementing a server (e.g., server 105 of FIG. 1) of an embodiment of the present application is shown. The server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium mentioned above in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an instruction number search unit, a page display unit, and an instruction search unit. The names of these units do not in some cases constitute a limitation to the unit itself, and for example, the instruction query unit may also be described as "a unit for querying an instruction by describing a file through an instruction library".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: acquiring a first query instruction, and querying an instruction number corresponding to the first query instruction through an instruction library description file, wherein the instruction library description file identifies a query relationship among instructions in an instruction library through the instruction number; responding to the existence of at least one instruction number corresponding to the first query instruction, and displaying a page corresponding to the first query instruction, wherein the page comprises at least one instruction identifier corresponding to the at least one instruction number; and in response to the acquisition of a second query instruction corresponding to an instruction identifier in at least one instruction identifier in the page, querying an instruction corresponding to the instruction identifier through the instruction library description file.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (12)

1. A method for querying an instruction, comprising:
acquiring a first query instruction, and querying an instruction number corresponding to the first query instruction through an instruction library description file, wherein the instruction library description file identifies a query relation among instructions in an instruction library through the instruction number, and the instruction number corresponds to an actual instruction;
responding to the existence of at least one instruction number corresponding to the first query instruction, and displaying a page corresponding to the first query instruction, wherein the page comprises at least one instruction identification corresponding to the at least one instruction number;
and in response to the acquisition of a second query instruction corresponding to an instruction identifier in at least one instruction identifier in the page, querying a target instruction number corresponding to the instruction identifier through the instruction library description file, and querying a final instruction network to obtain a target instruction corresponding to the target instruction number, wherein the final instruction network comprises at least one instruction, and at least one instruction contained in the final instruction network is provided with a corresponding instruction number.
2. The method of claim 1, wherein the instruction library description file is constructed by:
setting at least one instruction according to a structural relationship between files in a file library, wherein the files are displayed through a page, and the instruction is used for calling the files in the file library;
constructing an initial instruction network according to the structural relationship and at least one instruction, wherein the initial instruction network comprises the at least one instruction and link data between the instructions in the at least one instruction, and the link data is used for inquiring relationship between the instructions;
and setting an instruction number for the instruction in the at least one instruction, and constructing an instruction library description file according to the instruction number and the query relation.
3. The method of claim 2, wherein the building an instruction library description file according to instruction numbers and query relationships comprises:
constructing an instruction table containing at least one instruction number;
and for the instruction number in the at least one instruction number, determining other instruction numbers corresponding to the instruction number through the query relation, and marking the other instruction numbers behind the instruction number.
4. The method of claim 3, wherein the building the instruction library description file according to the instruction number and the query relationship further comprises:
and deleting the link data in the initial instruction network to obtain a final instruction network.
5. The method of any of claims 1 to 4, wherein the method further comprises:
and in response to the absence of the instruction number corresponding to the first query instruction, executing an instruction operation corresponding to the first query instruction.
6. An apparatus for querying instructions, comprising:
the query unit of the instruction number is configured to obtain a first query instruction, and query an instruction number corresponding to the first query instruction through an instruction library description file, wherein the instruction library description file identifies a query relation among instructions in an instruction library through the instruction number, and the instruction number corresponds to an actual instruction;
the page display unit is used for responding to the existence of at least one instruction number corresponding to the first query instruction and is configured to display a page corresponding to the first query instruction, and the page comprises at least one instruction identification corresponding to the at least one instruction number;
the instruction query unit, in response to acquiring a second query instruction corresponding to an instruction identifier in at least one instruction identifier in the page, includes a target instruction number query subunit and a target instruction query subunit, where the target instruction number query subunit is configured to query, through the instruction library description file, a target instruction number corresponding to the instruction identifier, and the target instruction query subunit is configured to query a final instruction network to obtain a target instruction corresponding to the target instruction number, where the final instruction network includes at least one instruction, and at least one instruction included in the final instruction network is provided with a corresponding instruction number.
7. The apparatus of claim 6, wherein the apparatus comprises an instruction library description file construction unit configured to construct an instruction library description file, the instruction library description file construction unit comprising:
the instruction setting subunit is configured to set at least one instruction according to a structural relationship between files in the file library, wherein the files are displayed through pages, and the instruction is used for calling between the files in the file library;
an initial instruction network construction subunit configured to construct an initial instruction network according to the structural relationship and at least one instruction, wherein the initial instruction network comprises the at least one instruction and link data between instructions in the at least one instruction, and the link data is used for query relationship between the instructions;
and the instruction library description file constructing subunit is configured to set an instruction number for the instruction in the at least one instruction, and construct an instruction library description file according to the instruction number and the query relation.
8. The apparatus of claim 7, wherein the instruction library description file building subunit comprises:
an instruction table construction module configured to construct an instruction table including at least one instruction number;
and the instruction library description file construction module is used for determining other instruction numbers corresponding to the instruction number according to the query relation for the instruction number in the at least one instruction number, and marking the other instruction numbers behind the instruction number.
9. The apparatus of claim 8, wherein the instruction library description file building subunit further comprises:
and the final instruction network acquisition module is configured to delete the link data in the initial instruction network to obtain a final instruction network.
10. The apparatus of any of claims 6 to 9, wherein the apparatus further comprises:
an instruction execution unit, responsive to an absence of an instruction number corresponding to the first query instruction, configured to perform an instruction operation corresponding to the first query instruction.
11. A server, comprising:
one or more processors;
a memory having one or more programs stored thereon,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-5.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
CN201811198911.4A 2018-10-15 2018-10-15 Method and device for inquiring instruction Active CN109299223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811198911.4A CN109299223B (en) 2018-10-15 2018-10-15 Method and device for inquiring instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811198911.4A CN109299223B (en) 2018-10-15 2018-10-15 Method and device for inquiring instruction

Publications (2)

Publication Number Publication Date
CN109299223A CN109299223A (en) 2019-02-01
CN109299223B true CN109299223B (en) 2020-05-15

Family

ID=65162586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811198911.4A Active CN109299223B (en) 2018-10-15 2018-10-15 Method and device for inquiring instruction

Country Status (1)

Country Link
CN (1) CN109299223B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110275754A (en) * 2019-06-28 2019-09-24 百度在线网络技术(北京)有限公司 Exchange method, device, equipment and the storage medium presented for user interface

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6182046B1 (en) * 1998-03-26 2001-01-30 International Business Machines Corp. Managing voice commands in speech applications
CN101753373A (en) * 2008-12-19 2010-06-23 中兴通讯股份有限公司 Mass alarm searching method and system
CN102075797A (en) * 2010-12-29 2011-05-25 深圳市同洲电子股份有限公司 Channel or program voice browsing method and digital television receiving terminal
CN102566961A (en) * 2010-12-31 2012-07-11 上海博泰悦臻电子设备制造有限公司 Voice executing method and voice executing device based on application program of vehicle-mounted device
CN103049571A (en) * 2013-01-04 2013-04-17 深圳市中兴移动通信有限公司 Method and device for indexing menus on basis of speech recognition, and terminal comprising device
CN103888833A (en) * 2014-03-11 2014-06-25 惠州Tcl移动通信有限公司 Method and system for having access to television programs and applications through intelligent television
CN106251863A (en) * 2016-07-26 2016-12-21 傲爱软件科技(上海)有限公司 A kind of instruction type speech control system based on smart machine and control method
CN108447478A (en) * 2018-01-31 2018-08-24 捷开通讯(深圳)有限公司 A kind of sound control method of terminal device, terminal device and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE60036486T2 (en) * 1999-10-28 2008-06-12 Canon K.K. METHOD AND APPARATUS FOR CHECKING PATTERN CONVERSATIONS
KR100490406B1 (en) * 2002-07-11 2005-05-17 삼성전자주식회사 Apparatus and method for processing voice command
US7840407B2 (en) * 2006-10-13 2010-11-23 Google Inc. Business listing search
CN103559296A (en) * 2013-11-04 2014-02-05 中国电子科技集团公司第四十一研究所 XML-based parsing method for SCPI (The Standard Commands for Programmable Instruments)
CN105681715B (en) * 2016-03-03 2019-11-15 腾讯科技(深圳)有限公司 A kind of audio/video processing method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6182046B1 (en) * 1998-03-26 2001-01-30 International Business Machines Corp. Managing voice commands in speech applications
CN101753373A (en) * 2008-12-19 2010-06-23 中兴通讯股份有限公司 Mass alarm searching method and system
CN102075797A (en) * 2010-12-29 2011-05-25 深圳市同洲电子股份有限公司 Channel or program voice browsing method and digital television receiving terminal
CN102566961A (en) * 2010-12-31 2012-07-11 上海博泰悦臻电子设备制造有限公司 Voice executing method and voice executing device based on application program of vehicle-mounted device
CN103049571A (en) * 2013-01-04 2013-04-17 深圳市中兴移动通信有限公司 Method and device for indexing menus on basis of speech recognition, and terminal comprising device
CN103888833A (en) * 2014-03-11 2014-06-25 惠州Tcl移动通信有限公司 Method and system for having access to television programs and applications through intelligent television
CN106251863A (en) * 2016-07-26 2016-12-21 傲爱软件科技(上海)有限公司 A kind of instruction type speech control system based on smart machine and control method
CN108447478A (en) * 2018-01-31 2018-08-24 捷开通讯(深圳)有限公司 A kind of sound control method of terminal device, terminal device and device

Also Published As

Publication number Publication date
CN109299223A (en) 2019-02-01

Similar Documents

Publication Publication Date Title
CN105787077B (en) Data synchronization method and device
CN107731229B (en) Method and apparatus for recognizing speech
US10936645B2 (en) Method and apparatus for generating to-be-played multimedia content
CN109446442B (en) Method and apparatus for processing information
US10755079B2 (en) Method and apparatus for acquiring facial information
KR102087807B1 (en) Character inputting method and apparatus
US11244153B2 (en) Method and apparatus for processing information
CN110321544B (en) Method and device for generating information
US11706172B2 (en) Method and device for sending information
CN110619078B (en) Method and device for pushing information
CN109413056B (en) Method and apparatus for processing information
CN112835904A (en) Data processing method and data processing device
CN113626223A (en) Interface calling method and device
CN113760488A (en) Method, device, equipment and computer readable medium for scheduling task
CN109165723B (en) Method and apparatus for processing data
CN112818654B (en) Message storage method, message generation method, device, electronic equipment and computer readable medium
CN109299223B (en) Method and device for inquiring instruction
CN111813685B (en) Automatic test method and device
CN110795328A (en) Interface testing method and device
CN107480269B (en) Object display method and system, medium and computing equipment
CN112966201B (en) Object processing method, device, electronic equipment and storage medium
CN115495658A (en) Data processing method and device
CN114239501A (en) Contract generation method, apparatus, device and medium
CN112947918A (en) Data display method and device
CN109840073B (en) Method and device for realizing business process

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