CN107273254B - System and method for screening text under windows - Google Patents
System and method for screening text under windows Download PDFInfo
- Publication number
- CN107273254B CN107273254B CN201710457531.7A CN201710457531A CN107273254B CN 107273254 B CN107273254 B CN 107273254B CN 201710457531 A CN201710457531 A CN 201710457531A CN 107273254 B CN107273254 B CN 107273254B
- Authority
- CN
- China
- Prior art keywords
- keyword
- module
- screening
- under
- condition
- 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
Links
- 238000012216 screening Methods 0.000 title claims abstract description 57
- 238000000034 method Methods 0.000 title claims description 10
- 230000009191 jumping Effects 0.000 claims description 9
- 238000012360 testing method Methods 0.000 description 9
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2205—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
- G06F11/2236—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test CPU or processors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
- G06F16/334—Query execution
- G06F16/3344—Query execution using natural language analysis
Abstract
The invention discloses a system for screening texts under windows, which is characterized by comprising a file selection module, a keyword judgment module, a screening module and a result output module, wherein the file selection module is used for copying and creating a temporary file according to an absolute path of a selected file; the keyword judging module judges the number of input keywords, and sends prompt information to the result output module under the condition that the first keyword is null; calling a screening module according to an input result of the keyword under the condition that the first keyword is not null; the screening module screens the keyword character strings sent by the keyword judgment module, selects the text to be displayed according to the screening result and sends the selected text to the result output module; the result output module sends prompt information to the display terminal under the condition that the first keyword is null; and under the condition that the first keyword is not null, transmitting the text to be displayed to the display terminal according to the screening module.
Description
Technical Field
The invention relates to the technical field of server testing, in particular to a system and a method for screening texts under windows.
Background
At present, the types of servers on the market are various, the configuration which can be matched with each type of server is also various, in the testing process, each type of memory is matched with a CPU to carry out RMT testing, the content of the tested data result is large, the processing is complex, and the working flow is complicated. In the prior art, test results are only screened according to a single keyword, if a document has a keyword which is repeatedly inquired, a result expected by a user cannot be located at the first time, and the test time of a tester is prolonged.
Disclosure of Invention
The invention aims to provide a system and a method for screening texts under windows, which can reduce the repetition rate of keyword screening, directly position the expected result of a client through a plurality of keywords and shorten the testing time of testers.
In order to achieve the purpose, the invention adopts the following technical scheme:
a system for screening texts under windows comprises a file selection module, a keyword judgment module, a screening module and a result output module, wherein the file selection module is used for copying and creating a temporary file according to an absolute path of a selected file;
the keyword judging module judges the number of input keywords, and sends prompt information to the result output module under the condition that the first keyword is null; calling a screening module according to an input result of the keyword under the condition that the first keyword is not null;
the screening module screens the keyword character strings sent by the keyword judgment module, selects the text to be displayed according to the screening result and sends the selected text to the result output module;
the result output module sends prompt information to the display terminal under the condition that the first keyword is null; and under the condition that the first keyword is not null, transmitting the text to be displayed to the display terminal according to the screening module.
Further, the keyword judgment module comprises a first keyword judgment unit, a second keyword judgment unit and a character sending unit, wherein the character sending unit sends prompt information to the result output module when the first keyword is empty, and converts the input character string into an isometric character string meeting the format requirement when the first keyword is not empty; the second keyword judging unit only sends the character string of the first keyword to the screening module under the condition that the second keyword is not effectively input, the second keyword judging unit converts the input character of the second keyword into an isometric character string meeting the format requirement under the condition that the second keyword is effectively input, and the character sending unit sends the character string of the first keyword and the character string of the second keyword to the screening module.
Further, the screening module selects the first occurrence position of the first keyword and a plurality of lines of texts to form a first paragraph when the first keyword is input and the second keyword is not input; the screening module selects the first occurrence position and the next lines of the first keyword under the condition that the first keyword and the second keyword are input simultaneously, selects the first occurrence position and the next lines of the second keyword simultaneously to form a second paragraph, and sends the first paragraph or the second paragraph to the result display module.
Furthermore, the result display module displays the received prompt information and the text information on the display terminal, and comprises a prompt information display unit and a text information display unit, wherein the prompt information display unit reads the prompt information sent by the character sending unit and displays the prompt information on the display terminal; and the text information display unit receives the content of the first section or the second section sent by the screening module and displays the content on the display terminal.
A method for screening texts under windows comprises the following steps:
s1, file selection: the file selection module obtains an absolute path of the selected file and copies the absolute path of the selected file to create a temporary file;
s2, keyword judgment: judging whether the first keyword is null, and if the first keyword is null, jumping to step S3; if the first keyword is not null, judging the input condition of the second keyword, and jumping to the step S4;
s3, prompt information display step: outputting prompt information that the first keyword cannot be empty, emptying the input field, and jumping to the step S2;
s4, keyword screening: text screening is carried out according to the keyword character string sent by the keyword judgment module, and only under the condition that a first keyword is input, the first keyword first appearance position and a plurality of lines later are selected to form a first paragraph; under the condition that a first keyword and a second keyword have input at the same time, selecting the first appearance position and a few lines after the first keyword, and simultaneously selecting the first appearance position and a few lines after the second keyword to form a second paragraph;
s5, text display step: and displaying the text content of the first paragraph or the second paragraph on the display terminal, clearing the temporary file and releasing the storage space.
The beneficial effect of the invention is that,
according to the method, based on a GUI (graphical user interface) written by JAVA language, a file selection module selects a file server test result file, then inputs a first keyword and a second keyword, screens and outputs the result to a screen of software, the test result file has low repetition rate of double keywords, and if double keyword repetition fields exist, the double keyword repetition fields can be displayed on the screen at the same time, so that the defects that the screening is only carried out according to a single keyword and the keywords repeatedly inquired by a system can not be accurately positioned in the prior art are overcome, the repetition rate of keyword screening is reduced, the expected result of a client is determined by converting a plurality of keywords, the operation is simple, and the test time is shortened.
Drawings
FIG. 1 is a schematic diagram of the system architecture of the present invention;
FIG. 2 is a flow chart of the method steps of the present invention.
Detailed Description
As shown in fig. 1, a system for screening a text in windows includes a file selection module, a keyword judgment module, a screening module, and a result output module, where the file selection module performs copying according to an absolute path of a selected file to create a temporary file; the keyword judging module judges the number of input keywords, and sends prompt information to the result output module under the condition that the first keyword is null; calling a screening module according to an input result of the keyword under the condition that the first keyword is not null; the screening module screens the keyword character strings sent by the keyword judgment module, selects the text to be displayed according to the screening result and sends the selected text to the result output module; the result output module sends prompt information to the display terminal under the condition that the first keyword is null; and under the condition that the first keyword is not null, transmitting the text to be displayed to the display terminal according to the screening module.
The keyword judging module comprises a first keyword judging unit, a second keyword judging unit and a character sending unit, wherein the first keyword judging unit judges the condition of a first keyword according to the numerical value of a first keyword zone bit, the character sending unit sends prompt information to the result output module under the condition that the first keyword is empty, and the character sending unit converts an input character string into an isometric character string meeting format requirements under the condition that the first keyword is not empty; .
The keyword judgment unit judges the input condition of the second keyword according to the condition of the flag bit of the second keyword, the flag bit second _ flag of the second keyword sets two flag bits of 0 and 1, if the second keyword is empty, the flag bit second _ flag of the second keyword is set to 1, otherwise, the flag bit second _ flag of the second keyword is set to 0, if the user does not input the second keyword, null is returned by default, if one or more null is input, null is also returned, if the user inputs other characters in the blank, the characters are converted into character strings with equal length, and the background program can call the program according to the flag bit of the second keyword to perform screening. The character sending unit only sends the character string of the first keyword to the screening module under the condition that the second keyword is not effectively input, the second keyword judging unit converts the character input of the second keyword into the character string with the same length according with the format requirement under the condition that the second keyword is effectively input, and the character sending unit sends the character string of the first keyword and the character string of the second keyword to the screening module.
The screening module selects the first occurrence position of the first keyword and a plurality of lines of texts to form a first paragraph under the condition that the first keyword is input and the second keyword is not input; the screening module selects the first occurrence position and the next lines of the first keyword under the condition that the first keyword and the second keyword are input simultaneously, selects the first occurrence position and the next lines of the second keyword simultaneously to form a second paragraph, and sends the first paragraph or the second paragraph to the result display module.
The result display module displays the received prompt information and the text information on the display terminal, and comprises a prompt information display unit and a text information display unit, and the prompt information display unit reads the prompt information sent by the character sending unit and displays the prompt information on the display terminal; and the text information display unit receives the content of the first section or the second section sent by the screening module and displays the content on the display terminal.
As shown in fig. 2, a method for screening text under windows includes the following steps:
s1, file selection: the file selection module obtains an absolute path of the selected file and copies the absolute path of the selected file to create a temporary file;
s2, keyword judgment: judging whether the first keyword is null, and if the first keyword is null, jumping to step S3; if the first keyword is not null, judging the input condition of the second keyword, and jumping to the step S4;
s3, prompt information display step: outputting prompt information that the first keyword cannot be empty, emptying the input field, and jumping to the step S2;
s4, keyword screening: text screening is carried out according to the keyword character string sent by the keyword judgment module, and only under the condition that a first keyword is input, the first keyword first appearance position and a plurality of lines later are selected to form a first paragraph; under the condition that a first keyword and a second keyword have input at the same time, selecting the first appearance position and a few lines after the first keyword, and simultaneously selecting the first appearance position and a few lines after the second keyword to form a second paragraph;
s5, text display step: and displaying the text content of the first paragraph or the second paragraph on the display terminal, clearing the temporary file and releasing the storage space.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.
Claims (3)
1. A system for screening texts under windows is characterized by comprising a file selection module, a keyword judgment module, a screening module and a result output module, wherein the file selection module is used for copying and creating a temporary file according to an absolute path of a selected file;
the keyword judging module judges the number of input keywords, and sends prompt information to the result output module under the condition that the first keyword is null; calling a screening module according to an input result of the keyword under the condition that the first keyword is not null; the keyword judging module comprises a first keyword judging unit, a second keyword judging unit and a character sending unit, wherein the character sending unit sends prompt information to the result output module when the first keyword is empty, and converts an input character string into an isometric character string meeting format requirements when the first keyword is not empty; the second keyword judging unit only sends the character string of the first keyword to the screening module under the condition that the second keyword is not effectively input, the second keyword judging unit converts the input character of the second keyword into an isometric character string meeting the format requirement under the condition that the second keyword is effectively input, and the character sending unit sends the character string of the first keyword and the character string of the second keyword to the screening module;
the screening module screens the keyword character strings sent by the keyword judgment module, selects the text to be displayed according to the screening result and sends the selected text to the result output module; the screening module selects the first occurrence position of the first keyword and a plurality of lines of texts to form a first paragraph under the condition that the first keyword is input and the second keyword is not input; the screening module selects the first occurrence position and the next lines of the first keyword under the condition that the first keyword and the second keyword are input simultaneously, selects the first occurrence position and the next lines of the second keyword simultaneously to form a second paragraph, and sends the first paragraph or the second paragraph to the result display module;
the result output module sends prompt information to the display terminal under the condition that the first keyword is null; and under the condition that the first keyword is not null, transmitting the text to be displayed to the display terminal according to the screening module.
2. The system for screening texts under windows according to claim 1, wherein the result display module displays the received prompt information and the text information on the display terminal, the result display module includes a prompt information display unit and a text information display unit, and the prompt information display unit reads the prompt information sent by the character sending unit and displays the prompt information on the display terminal; and the text information display unit receives the content of the first paragraph or the second paragraph sent by the screening module and displays the content on the display terminal.
3. A method for screening text under windows according to the system of any of claims 1 to 2, comprising the steps of:
s1, file selection: the file selection module obtains an absolute path of the selected file and copies the absolute path of the selected file to create a temporary file;
s2, keyword judgment: judging whether the first keyword is null, and if the first keyword is null, jumping to step S3; if the first keyword is not null, judging the input condition of the second keyword, and jumping to the step S4;
s3, prompt information display step: outputting prompt information that the first keyword cannot be empty, emptying the input field, and jumping to the step S2;
s4, keyword screening: text screening is carried out according to the keyword character string sent by the keyword judgment module, and only under the condition that a first keyword is input, the first keyword first appearance position and a plurality of lines later are selected to form a first paragraph; under the condition that a first keyword and a second keyword have input at the same time, selecting the first appearance position and a few lines after the first keyword, and simultaneously selecting the first appearance position and a few lines after the second keyword to form a second paragraph;
s5, text display step: and displaying the text content of the first paragraph or the second paragraph on the display terminal, clearing the temporary file and releasing the storage space.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710457531.7A CN107273254B (en) | 2017-06-16 | 2017-06-16 | System and method for screening text under windows |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710457531.7A CN107273254B (en) | 2017-06-16 | 2017-06-16 | System and method for screening text under windows |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107273254A CN107273254A (en) | 2017-10-20 |
CN107273254B true CN107273254B (en) | 2021-03-12 |
Family
ID=60067645
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710457531.7A Active CN107273254B (en) | 2017-06-16 | 2017-06-16 | System and method for screening text under windows |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107273254B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1936894A (en) * | 2006-10-12 | 2007-03-28 | 魏新成 | Method for searching key word and inputting in turn search service character symbol on address search column |
CN102902688A (en) * | 2011-07-27 | 2013-01-30 | 汉王科技股份有限公司 | Method and device for displaying results of keyword search |
CN105005562A (en) * | 2014-04-15 | 2015-10-28 | 索意互动(北京)信息技术有限公司 | Retrieval result display processing method and apparatus |
CN106095779A (en) * | 2016-05-26 | 2016-11-09 | 达而观信息科技(上海)有限公司 | A kind of search method based on key word position and device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101989221B (en) * | 2009-08-07 | 2014-04-30 | 鸿富锦精密工业(深圳)有限公司 | Printed circuit board test document generating system and method |
CN107194007A (en) * | 2017-06-20 | 2017-09-22 | 哈尔滨工业大学 | A kind of integrated management system of spacecraft isomery test data |
-
2017
- 2017-06-16 CN CN201710457531.7A patent/CN107273254B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1936894A (en) * | 2006-10-12 | 2007-03-28 | 魏新成 | Method for searching key word and inputting in turn search service character symbol on address search column |
CN102902688A (en) * | 2011-07-27 | 2013-01-30 | 汉王科技股份有限公司 | Method and device for displaying results of keyword search |
CN105005562A (en) * | 2014-04-15 | 2015-10-28 | 索意互动(北京)信息技术有限公司 | Retrieval result display processing method and apparatus |
CN106095779A (en) * | 2016-05-26 | 2016-11-09 | 达而观信息科技(上海)有限公司 | A kind of search method based on key word position and device |
Also Published As
Publication number | Publication date |
---|---|
CN107273254A (en) | 2017-10-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9189377B1 (en) | Automation testing using descriptive maps | |
US10175954B2 (en) | Method of processing big data, including arranging icons in a workflow GUI by a user, checking process availability and syntax, converting the workflow into execution code, monitoring the workflow, and displaying associated information | |
CN104199767B (en) | Test method and device | |
US20240111697A1 (en) | System and method for building and implementing automated workflows | |
CN103793224A (en) | Window display method and device | |
CN110990269A (en) | Interface testing method, device and system | |
US20220350857A1 (en) | Methods and systems for browser extension used to generate relative xpath, absolute xpath and/or css selectors | |
US10951486B2 (en) | Terminal device, UI expansion method, and UI expansion program | |
CN109324956B (en) | System testing method, apparatus and computer readable storage medium | |
CN111831542A (en) | API application debugging method and device and storage medium | |
KR20220013947A (en) | Method and apparatus for continuous integration testing | |
CN112835579A (en) | Method and device for determining interface code, electronic equipment and storage medium | |
CN110515514B (en) | Data processing method, device and storage medium | |
CN107273254B (en) | System and method for screening text under windows | |
CN109614592B (en) | Text processing method and device, storage medium and electronic equipment | |
CN111382051B (en) | API automatic test method and test device | |
CN111124924A (en) | API (application program interface) deployment method and device, electronic equipment and storage medium | |
US20090049379A1 (en) | User interface to browse syndication data mixing module configurations | |
CN115495362A (en) | Method, device, storage medium and computer equipment for generating test code | |
CN113138760B (en) | Page generation method and device, electronic equipment and medium | |
CN111125605B (en) | Page element acquisition method and device | |
CN108170557B (en) | Method and apparatus for outputting information | |
CN113656443B (en) | Data disassembling method and device, electronic equipment and storage medium | |
CN109165049A (en) | Module data processing method and processing device | |
US9146801B2 (en) | Application information specifiable by users and third parties |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20210209 Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd. Address before: Room 1601, floor 16, 278 Xinyi Road, Zhengdong New District, Zhengzhou City, Henan Province Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |