Method and system for rapid file processing
By monitoring mouse events and calculating the shortcut menu display position, we provide a method to quickly process vocabulary or statements in the file, solving the problem of inefficiency in the existing technology, realizing the function of quickly querying relevant information and responsible personnel, and improving office efficiency.
Patent Information
- Application Number
- CN202110654426.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-11
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2041-06-11
AI Technical Summary
The inability to quickly process vocabulary or statements in documents in the prior art, resulting in inefficiency, especially when professionals need to explain, which may cause unanswered questions due to the resignation of the person in charge.
By listening to mouse events, get the starting point, starting time, termination time and termination point of the selected text, and calculate the display position of the shortcut menu in combination with the display area, provide copy, search, and marking operations, and directly link to the internal retrieval system for query.
It realizes the rapid processing of vocabulary or sentences in the file, simplifies the operation process, improves the user experience, and can quickly find information and responsible personnel related to selected texts, improving office efficiency.
Smart Images

Figure CN113297143B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a method and system for rapid file processing. Background Art
[0002] Each company stores files with company personnel information and department business data. When carrying out business work, relevant existing files will be read, consulted, and understood. There will be a large amount of file data to read and process, especially when reading relevant files, when some unknown nouns or words related to other business within the company are found, relevant professionals or colleagues in relevant departments need to be answered, so that quickly finding relevant personnel or information becomes a means to improve efficiency.
[0003] Conventional systems only provide file browsing functions on web pages. To search for certain words or sentences, you need to right-click and copy the text words or sentences by clicking the mouse, and then enter the third-party search platform to find the relevant word explanations, or find the specific person in charge of the relevant documents within the company. When professionals are needed to interpret relevant documents, there will be many uncertain factors that cause inefficiency. For example, the relevant person in charge has left and cannot be contacted, so other relevant colleagues need to be arranged to explain. These will reduce efficiency.
[0004] Currently, no effective solution has been proposed for the technical problem that related technologies cannot perform fast operations on words or sentences. Summary of the invention
[0005] The embodiments of the present application provide a method and system for rapid file processing, so as to at least solve the problem in the related art that rapid processing of words or sentences is impossible.
[0006] In a first aspect, an embodiment of the present application provides a method for quickly processing a file, comprising the following steps:
[0007] The step of obtaining the selected area information includes monitoring a first trigger event when the user presses the mouse, and monitoring a second trigger event when the user releases the mouse. When the first trigger event is monitored, the starting point and starting time of the selected text are obtained, and when the second trigger event is monitored, the ending point and ending time of the selected text are obtained;
[0008] The step of obtaining the display position of the shortcut menu is to determine the pop-up time of the shortcut menu according to the start time and the end time, and to obtain the display position of the shortcut menu that triggers the pop-up according to the position information of the end point and the start point;
[0009] Processing steps: The user makes operation selections based on the shortcut menu and triggers the corresponding event.
[0010] In some embodiments, the specific steps of obtaining the display position of the shortcut menu include:
[0011] Determine whether there is a horizontal scroll bar in the display area of the file.
[0012] When there is a horizontal scroll bar, determine whether the y-axis coordinates of the starting point and the end point are equal. If they are equal, it is determined that the selected text does not cross lines, and the location of the shortcut menu is on the right side of the x-axis coordinate of the end point. If they are not equal, it is determined that the selected text is multi-line selected, and the location of the shortcut menu is on the far right of the display area of the Excel table;
[0013] When there is no horizontal scroll bar, compare the width of the selected content and the width of the display area. When the width of the selected content is smaller than the width of the display area, the shortcut menu is set to the right of the end point of the selected text. When the width of the selected area is larger than the width of the display area, the shortcut menu is located at the far right of the display area.
[0014] In some embodiments, the corresponding operation includes one or a combination of copying, searching, and marking, wherein:
[0015] Copy step: When the corresponding copy button is selected, the window.oncopy event is triggered to obtain the selected content and provide it to the third-party platform for operation;
[0016] Search step: when the corresponding search button is selected, it directly links to the internal search system, performs a search based on the selected text, and obtains the materials and / or responsible persons related to the selected text;
[0017] Marking step: when the corresponding key of the mark is selected, the selected text is highlighted.
[0018] In some embodiments, the step of obtaining the selected area information further includes:
[0019] When the first trigger event is triggered, the position and start time of the starting point are recorded through the onmousedown event. When the second trigger event is triggered, the position and end time of the ending point are recorded through the onmouseup event, and the selected text and the position of the selected text in the entire page are obtained through window.getSelection().
[0020] In a second aspect, an embodiment of the present application provides a file rapid processing system, which applies the file processing method of the first aspect, including:
[0021] The selected area information acquisition module monitors the first trigger event of the user pressing the mouse, and monitors the second trigger event of the user releasing the mouse. When the first trigger event is monitored, the starting point and starting time of the selected text are obtained, and when the second trigger event is monitored, the ending point and ending time of the selected text are obtained;
[0022] The shortcut menu display position acquisition module determines the pop-up time of the shortcut menu according to the start time and the end time, and obtains the display position of the shortcut menu that triggers the pop-up according to the position information of the end point and the start point;
[0023] Processing module: users make operation selections based on shortcut menus and trigger corresponding events.
[0024] In some embodiments, the shortcut menu display position acquisition module determines whether there is a horizontal scroll bar in the display area of the file.
[0025] When there is a horizontal scroll bar, determine whether the y-axis coordinates of the start point and the end point are equal. If they are equal, it is determined that the selected text does not cross lines, and the shortcut menu is located to the right of the x-axis coordinate of the end point. If they are not equal, it is determined that the selected text is multi-line selected, and the shortcut menu is located at the far right of the display area.
[0026] When there is no horizontal scroll bar, compare the width of the selected content and the width of the display area. When the width of the selected content is smaller than the width of the display area, the shortcut menu is set to the right of the end point of the selected text. When the width of the selected area is larger than the width of the display area, the shortcut menu is located at the far right of the display area.
[0027] In some embodiments, the processing module includes:
[0028] Copy unit, when the corresponding copy button is selected, the window.oncopy event is triggered to obtain the selected content and provide it to the third-party platform for operation;
[0029] Search unit, when the corresponding search button is selected, it directly links to the internal search system, performs a search based on the selected text and obtains the materials and / or responsible persons related to the selected text;
[0030] Marking unit, when the key corresponding to the mark is selected, the selected text is highlighted.
[0031] In some of the embodiments, the selected area information acquisition module monitors mouse events. When the first trigger event is triggered, the position of the starting point and the starting time are recorded through the onmousedown event. When the second trigger event is triggered, the position of the ending point and the ending time are recorded through the onmouseup event, and the selected text and the position of the selected text in the entire page are obtained through window.getSelection().
[0032] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for rapid file processing as described in the first aspect above is implemented.
[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for rapid file processing as described in the first aspect above.
[0034] Compared with the related art, the fast file processing method provided by the embodiment of the present application can be applied to the field of data capability technology and the field of data service technology. By monitoring the mouse event, the starting point, starting time, ending time and ending point of the selected text are obtained, and the display event and position of the shortcut menu are obtained based on the display area, so as to provide the user with operation selection, thereby solving the problem that the text cannot be processed quickly.
[0035] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0037] Figure 1 is a flowchart of a method for rapid file processing according to an embodiment of the present application;
[0038] Figure 2 is a flowchart of a method for quickly processing Excel files according to an embodiment of the present application;
[0039] Figure 3 is a structural block diagram of a file rapid processing system according to an embodiment of the present application;
[0040] Figure 4 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present application. Description of the drawings:
[0042] Select the area information acquisition module 1; the shortcut menu displays the location acquisition module 2;
[0043] Processing module 3; copying unit 31; searching unit 32; marking unit 33;
[0044] Processor 81; memory 82; communication interface 83; bus 80. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0046] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0047] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0048] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0049] This embodiment provides a method for quickly processing files. Figure 1 is a flowchart of a method for rapid file processing according to an embodiment of the present application. Figure 1 As shown, the process includes the following steps:
[0050] The step S1 of obtaining the selected area information includes monitoring a first trigger event when the user presses the mouse, and monitoring a second trigger event when the user releases the mouse. When the first trigger event is monitored, the starting point and starting time of the selected text are obtained. When the second trigger event is monitored, the ending point and ending time of the selected text are obtained.
[0051] The shortcut menu display position acquisition step S2 is to determine the pop-up time of the shortcut menu according to the start time and the end time, and to obtain the display position of the shortcut menu that triggers the pop-up according to the position information of the end point and the start point;
[0052] In processing step S3, the user makes an operation selection according to the shortcut menu, and a corresponding event is triggered.
[0053] The start time of the selected text can be obtained through the first trigger event, and the end time of the selected text can be obtained through the second trigger event, and the pop-up time of the shortcut menu can be obtained accordingly, so as to prevent the shortcut menu from popping up randomly and causing obstruction, affecting user vision and reducing user experience.
[0054] It should be noted that the present invention can be applied to application front ends such as html, css and javascript. The above shortcut menu refers to a menu with operation buttons triggered by a user selecting text, which is used to provide an interface for the next operation.
[0055] Through the above steps, the mouse events triggered by the user are monitored, and the position of the selected text, that is, the position of the starting point and the end point, is obtained, and the display position of the pop-up shortcut menu is determined according to the relationship between the starting point, the end point and the display area, so that the user can select the next operation conveniently, and the user can directly perform the corresponding operation by selecting the text, thereby simplifying the operation process. At the same time, the display position of the shortcut menu is calculated to avoid affecting the user's line of sight, thereby improving the user's experience.
[0056] For text operations, other corresponding related data can be quickly found. In the large data pool within the company, relevant information and personnel of the selected vocabulary or words can be quickly discovered to facilitate subsequent work and improve office efficiency.
[0057] In some embodiments, the specific steps of obtaining the display position of the shortcut menu include:
[0058] Determine whether there is a horizontal scroll bar in the display area of the file.
[0059] When there is a horizontal scroll bar, determine whether the y-axis coordinates of the start point and the end point are equal. If they are equal, it is determined that the selected text does not cross lines, and the shortcut menu is located to the right of the x-axis coordinate of the end point. If they are not equal, it is determined that the selected text is multi-line selected, and the shortcut menu is located at the far right of the display area.
[0060] When there is no horizontal scroll bar, compare the width of the selected content and the width of the display area. When the width of the selected content is smaller than the width of the display area, the shortcut menu is set to the right of the end point of the selected text. When the width of the selected area is larger than the width of the display area, the shortcut menu is located at the far right of the display area.
[0061] Through the above steps, the display position of the shortcut menu is calculated according to the selected text and the display interface, ensuring that the shortcut menu is always displayed on the right side of the selected content, avoiding blocking the selected content and affecting the user's visual effect, thereby affecting the user's usage experience.
[0062] In actual applications, there are many columns of data in Excel tables, and the browser screen cannot display them all. It is necessary to scroll horizontally to view the contents of other columns, determine whether the width of the table content exceeds the width of the display area, and recalculate the position of the shortcut menu to ensure that the menu is always displayed on the right side of the selected content.
[0063] This method effectively solves the problem that when multiple tables are switched in Excel data display, the number of rows and columns of each table data is unknown, and the location of the shortcut menu cannot be determined.
[0064] In some embodiments, the corresponding operation includes one or a combination of copying, searching, and marking, wherein:
[0065] Copy step S31, when the corresponding copy button is selected, the window.oncopy event is triggered to obtain the selected content and provide it to the third-party platform for operation;
[0066] Search step S32, when the corresponding search button is selected, it is directly linked to the internal search system, and the selected text is searched and the information and / or responsible personnel related to the selected text are obtained;
[0067] Marking step S33, when the key corresponding to the mark is selected, the selected text is highlighted.
[0068] The shortcut menu provides the user with an interface for the next operation. The user triggers the function button in the shortcut menu to trigger the corresponding function to meet the user's different needs.
[0069] Through the above steps, the rapid retrieval function and copy function based on the internal retrieval system can be realized.
[0070] After selecting the text, a shortcut menu pops up to copy and search the selected word, providing an entry to the next step. The copy operation can provide the selected word / sentence to other platforms; the search can directly enter the internal search system to find information and people related to the word / sentence. The shortcut entry provides the ability to search for the selected word / sentence, directly enter the internal search and search carefully, and return other information or relevant persons related to the selected word / sentence, further enhancing the effectiveness of individuals solving problems independently online.
[0071] In some embodiments, the selected area information acquisition step S1 further includes:
[0072] When the first trigger event is triggered, the position and start time of the starting point are recorded through the onmousedown event. When the second trigger event is triggered, the position and end time of the ending point are recorded through the onmouseup event, and the selected text and the position of the selected text in the entire page are obtained through window.getSelection().
[0073] It should be noted that this method for rapid file processing can be applied to editable files such as PDF files and Excel files. The following description will be made using Excel files as an example.
[0074] Figure 2is a flowchart of a method for quickly processing Excel files according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0075] S201, monitor trigger events
[0076] By using the window.getSelection() provided by the browser, you can get the text data selected on the page; the browser mouse events onmousedown and onmouseup trigger the time point of the selected start point, the time point of the end point, and the time point when the shortcut menu pops up;
[0077] When monitoring the user's mouse operation, press the left mouse button (onmousedown) to record the time when the text is selected and the position of the starting point in the entire web page. Release the mouse after selection (onmouseup), and use window.getSelection() to get the time point of the selected text and the end point, as well as the position of the end point in the entire web page.
[0078] S202, display shortcut menu
[0079] The position of the pop-up shortcut menu is calculated by the difference between the position information of the end point and the position information of the start point. The specific calculation method is as follows:
[0080] Determine whether there is a horizontal scroll bar in the current table data.
[0081] If there is an Excel table with a horizontal scroll bar and the amount of data exceeds the range that can be displayed on one screen, if the selected content belongs to multiple lines, it is necessary to determine the starting position of the selected text on the y-axis. The x-axis coordinates and y-axis coordinates of the starting point and the x-axis coordinates and y-axis coordinates of the ending point of the selected content can be determined by starting and ending selections.
[0082] Determine whether the y-axis coordinates of the starting point and the ending point are equal to determine whether multiple rows are selected;
[0083] When they are equal, they are in the same row and no text is selected across rows. In this case, you only need to locate the shortcut menu based on the x-axis coordinate of the end point, that is, locate the shortcut menu to the x-axis coordinate position of the end point.
[0084] When they are not equal, it is a cross-row selection, and the shortcut menu can be directly positioned to the rightmost side of the width of the displayable area of the entire Excel table.
[0085] If there is no horizontal scroll bar, it means that the table display area is not filled with table data. At this time, whether you select a single row or multiple rows, you need to determine the width of the selected content and the width of the entire Excel table data content;
[0086] When the width of the selected content is smaller than the width of the Excel table data content, the shortcut menu is positioned at the end point;
[0087] When the width of the selected content is greater than the width of the Excel table data content, the shortcut menu is positioned to the far right of the Excel table content.
[0088] S203, select function according to shortcut menu
[0089] The user selects the shortcut menu according to the needs, including one or a combination of copy, search and mark.
[0090] When the copy operation is selected, the window.oncopy event is used to listen to the copied content to facilitate operations on other platforms;
[0091] When a search operation is selected, when the corresponding search button is selected, a direct link is made to the internal search system, and a query is performed based on the selected text to obtain information and / or responsible personnel related to the selected text;
[0092] When the button corresponding to the mark is selected, the selected text is highlighted.
[0093] Through the above steps, the user can directly search on the internal file system after completing the text selection, which simplifies the work difficulty, reduces the communication cost and improves the work efficiency.
[0094] At the same time, by calculating the position of the shortcut unit, the shortcut menu is ensured to always appear on the right side of the selected content, avoiding blocking the user and improving the user experience.
[0095] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0096] This embodiment also provides a file rapid processing system, which is used to implement the above embodiments and preferred implementations, and will not be repeated here. As used below, the terms "module", "unit", "subunit", etc. can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0097] Figure 3 is a structural block diagram of a file rapid processing system according to an embodiment of the present application, such as Figure 3As shown, the system includes:
[0098] The selected area information acquisition module 1 monitors the first trigger event of the user pressing the mouse, and monitors the second trigger event of the user releasing the mouse. When the first trigger event is monitored, the starting point and start time of the selected text are obtained, and when the second trigger event is monitored, the end point and end time of the selected text are obtained;
[0099] The shortcut menu display position acquisition module 2 determines the pop-up time of the shortcut menu according to the start time and the end time, and obtains the display position of the shortcut menu that triggers the pop-up according to the position information of the end point and the start point;
[0100] Processing module 3: The user makes an operation selection according to the shortcut menu and triggers a corresponding event.
[0101] The above shortcut menu is a shortcut selection menu triggered after the user selects text.
[0102] The start time of the selected text can be obtained through the first trigger event, and the end time of the selected text can be obtained through the second trigger event, and the pop-up time of the shortcut menu can be obtained accordingly, so as to prevent the shortcut menu from popping up randomly and causing obstruction, affecting user vision and reducing user experience.
[0103] In some embodiments, the shortcut menu display position acquisition module determines whether there is a horizontal scroll bar in the display area of the file.
[0104] When there is a horizontal scroll bar, determine whether the y-axis coordinates of the start point and the end point are equal. If they are equal, it is determined that the selected text does not cross lines, and the shortcut menu is located to the right of the x-axis coordinate of the end point. If they are not equal, it is determined that the selected text is multi-line selected, and the shortcut menu is located at the far right of the display area.
[0105] When there is no horizontal scroll bar, compare the width of the selected content and the width of the display area. When the width of the selected content is smaller than the width of the display area, the shortcut menu is set to the right of the end point of the selected text. When the width of the selected area is larger than the width of the display area, the shortcut menu is located at the far right of the display area.
[0106] By judging whether there is a scroll bar, whether it spans lines, and comparing the size of the selected content and the display area, it is ensured that the shortcut menu is always displayed on the right side of the selected content to avoid blocking the selected content and affecting the user's visual effect, thereby affecting the user's usage experience.
[0107] In some embodiments, the processing module 3 includes:
[0108] The copy unit 31, when the corresponding copy button is selected, triggers the window.oncopy event to obtain the selected content and provides it to the third-party platform for operation;
[0109] A search unit 32, when a search corresponding button is selected, directly links to an internal search system, performs a search based on the selected text and obtains information and / or responsible personnel related to the selected text;
[0110] The marking unit 33 highlights the selected text when the key corresponding to the mark is selected.
[0111] In some of the embodiments, the selected area information acquisition module monitors mouse events. When the first trigger event is triggered, the position of the starting point and the starting time are recorded through the onmousedown event. When the second trigger event is triggered, the position of the ending point and the ending time are recorded through the onmouseup event, and the selected text and the position of the selected text in the entire page are obtained through window.getSelection().
[0112] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0113] In addition, combined Figure 1 The method for quickly processing files described in the embodiment of the present application can be implemented by a computer device. Figure 4 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present application.
[0114] The computer device may include a processor 81 and a memory 82 storing computer program instructions.
[0115] Specifically, the processor 81 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0116] Among them, the memory 82 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 82 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 82 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 82 may be inside or outside the data processing system. In a specific embodiment, the memory 82 is a non-volatile memory. In a specific embodiment, the memory 82 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable Programmable Read-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0117] The memory 82 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 81 .
[0118] The processor 81 implements any one of the file fast processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 82 .
[0119] In some of these embodiments, the computer device may further include a communication interface 83 and a bus 80. Figure 4 As shown, the processor 81, the memory 82, and the communication interface 83 are connected via a bus 80 and communicate with each other.
[0120] The communication interface 83 is used to implement communication between the modules, systems, units and / or devices in the embodiment of the present application. The communication interface 83 can also implement data communication with other components such as: external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.
[0121] The bus 80 includes hardware, software or both, and couples the components of the computer device to each other. The bus 80 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 80 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 80 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0122] The computer device can execute the file fast processing method in the embodiment of the present application based on the positions of the starting point and the ending point of the selected content obtained, thereby realizing the combination of Figure 1 Describes the method for quickly processing files.
[0123] In addition, in combination with the file fast processing method in the above embodiment, the embodiment of the present application can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the file fast processing methods in the above embodiment is implemented.
[0124] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0125] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for rapid file processing, characterized in that: The following steps are involved: The step of obtaining the selected area information includes monitoring a first trigger event when the user presses the mouse, and monitoring a second trigger event when the user releases the mouse. When the first trigger event is monitored, the starting point and starting time of the selected text are obtained, and when the second trigger event is monitored, the ending point and ending time of the selected text are obtained; a shortcut menu display position acquisition step, determining a pop-up time of the shortcut menu according to the start time and the end time, and obtaining a display position of the shortcut menu that triggers the pop-up according to the position information of the end point and the start point; The specific steps of obtaining the display position of the shortcut menu include: determining whether there is a horizontal scroll bar in the display area of the file; when the horizontal scroll bar exists, determining whether the y-axis coordinates of the starting point and the end point are equal; if they are equal, determining that the selected text does not cross lines, and the position of the shortcut menu is to the right of the x-axis coordinate of the end point; if they are not equal, determining that the selected text is multi-line selected, and the position of the shortcut menu is at the rightmost side of the display area; when the horizontal scroll bar does not exist, comparing the width of the selected text with the width of the display area; when the width of the selected text is less than the width of the display area, the shortcut menu is set to the right of the end point of the selected text; when the width of the selected text is greater than the width of the display area, the position of the shortcut menu is at the rightmost side of the display area; In the processing step, the user makes an operation selection according to the shortcut menu, and a corresponding event is triggered.
2. The method for rapid file processing according to claim 1, characterized in that: The user makes an operation selection according to the shortcut menu, and the operation selection includes one or a combination of copy, search and mark, wherein: The copying step, when the corresponding copy button is selected, triggers the window.oncopy event to obtain the selected text and provides it to the third-party platform for operation; Search step, when the search corresponding button is selected, directly linking to the internal search system, querying according to the selected text and obtaining the information and / or responsible personnel related to the selected text; Marking step: when the key corresponding to the mark is selected, the selected text is highlighted.
3. The method for rapid file processing according to claim 1, characterized in that: The step of obtaining the selected area information further comprises: When the first trigger event is triggered, the position and start time of the starting point are recorded through the onmousedown event. When the second trigger event is triggered, the position and end time of the ending point are recorded through the onmouseup event. The selected text and the position of the selected text in the entire page are obtained through window.getSelection().
4. A file rapid processing system, applying the file processing method according to any one of claims 1 to 3, characterized in that: include The selected area information acquisition module monitors a first trigger event when the user presses the mouse, and monitors a second trigger event when the user releases the mouse. When the first trigger event is monitored, the starting point and starting time of the selected text are obtained, and when the second trigger event is monitored, the ending point and ending time of the selected text are obtained; A shortcut menu display position acquisition module determines the pop-up time of the shortcut menu according to the start time and the end time, and obtains the display position of the shortcut menu that is triggered to pop up according to the position information of the end point and the start point; the shortcut menu display position acquisition module determines whether there is a horizontal scroll bar in the display area of the file, and when the horizontal scroll bar exists, determines whether the y-axis coordinates of the start point and the end point are equal. If they are equal, it is determined that the selected text does not cross lines, and the position of the shortcut menu is on the right side of the x-axis coordinate of the end point. If they are not equal, it is determined that the selected text is multi-line selected, and the position of the shortcut menu is on the far right of the display area; when the horizontal scroll bar does not exist, compares the width of the selected text area with the width of the display area. When the width of the selected text area is smaller than the width of the display area, the shortcut menu is set to the right side of the end point of the selected text area. When the width of the selected text area is larger than the width of the display area, the shortcut menu is located at the far right of the display area. In the processing module, the user makes an operation selection according to the shortcut menu and triggers a corresponding event.
5. The file rapid processing system according to claim 4, characterized in that: The processing module comprises: A copy unit, when the corresponding copy button is selected, triggers a window.oncopy event to obtain the selected text and provide it to a third-party platform for operation; A search unit, when the search corresponding button is selected, directly links to the internal search system, performs a query based on the selected text and obtains information and / or responsible personnel related to the selected text; A marking unit, when the key corresponding to the mark is selected, highlights the selected text.
6. The file rapid processing system according to claim 4, characterized in that: The selected area information acquisition module monitors mouse events. When the first trigger event is triggered, the position and start time of the starting point are recorded through the onmousedown event. When the second trigger event is triggered, the position and end time of the ending point are recorded through the onmouseup event, and the selected text and the position of the selected text in the entire page are obtained through window.getSelection().
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for fast file processing according to any one of claims 1 to 3 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for quickly processing files as claimed in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Method and system for rapidly and conveniently controlling previewing channel of hard disk video recorder
CN102541449A