Data processing method and device
By sharing the configuration of keys and functions between different applications, the function of automatically matching the target keys is solved, and the problem of inconsistent shortcut keys in different applications is improved, and the operation efficiency is reduced and learning costs are reduced.
Patent Information
- Application Number
- CN202411975372.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-18
AI Technical Summary
The shortcut keys for the same function in different applications are different, which leads to users who need to be familiar with the shortcut key systems of different applications at the same time, which increases learning costs and reduces operational efficiency.
By obtaining the first input for the first application, if the first application does not configure the target key, the target function is executed, which is a function executed in response to the first input of the second application, and the second application configures the target key and the target function.
It realizes the automatic matching of the target key to the target key that meets the user's expectations when the user triggers the target key and the key configuration in the current application, solving the problem of easy confusion between keys between multiple applications, improving work efficiency, and reducing user learning costs.
Smart Images

Figure CN119847407A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of electronic equipment, and in particular to a data processing method and device. Background Art
[0002] At present, in different applications, different functions can be achieved through different shortcut keys. However, different applications use different shortcut keys for the same function. Users need to be familiar with the shortcut key systems of different applications at the same time, which leads to high learning costs and is not conducive to improving the operating efficiency of the application. Summary of the invention
[0003] In view of this, the present disclosure provides a data processing method and device.
[0004] According to the first aspect of the present disclosure, a data processing method is provided, including: obtaining a first input for a first application; the first input is generated based on a target key of an input device being triggered; if the first application is not configured with a target key, executing a target function for the first application; the target function is a function executed in response to the first input for a second application, and the second application is configured with a target key and a target function.
[0005] According to an embodiment of the present disclosure, if the first application is not configured with a target button, executing a target function for the first application includes: if the first application is not configured with a target button, determining a target function corresponding to the target button in the second application; if the first application is configured with a preset button for the target function, mapping the target button to the preset button; and executing the target function corresponding to the preset button for the first application.
[0006] According to an embodiment of the present disclosure, if the first application is not configured with a target button, executing a target function for the first application includes: if the first application is not configured with a target button, determining a target function corresponding to the target button in the second application; if the first application is not configured with a preset button for the target function, executing the target function corresponding to the target button for the first application.
[0007] According to an embodiment of the present disclosure, the method also includes: if the first application is configured with a target key, determining a predicted function corresponding to the target key, the first application is configured with a target key and candidate functions, the candidate function being a function executed in response to a first input to the first application; if the predicted function is the same as the candidate function, executing the candidate function corresponding to the target key for the first application; if the predicted function is the same as the target function, executing the target function corresponding to the target key for the first application.
[0008] According to an embodiment of the present disclosure, the method also includes: if the first application is configured with a target button, executing a candidate function corresponding to the target button for the first application, and the first application is configured with a target button and candidate functions; in response to revoking the candidate function, executing the target function corresponding to the target button for the first application.
[0009] According to an embodiment of the present disclosure, the usage frequency of the second application is greater than the usage frequency of the third application, and the third application includes the first application.
[0010] According to an embodiment of the present disclosure, if the first application is not configured with a target button, executing a target function for the first application includes: if the first application is not configured with a target button, determining a function corresponding to the target button from the target data based on target data, obtaining the target function, and executing the target function for the first application; wherein the target data includes at least buttons and corresponding functions configured for the first application and the second application.
[0011] According to an embodiment of the present disclosure, the target data also includes preference data, and the method also includes: obtaining first data and second data of multiple applications, the first data representing the frequency of use of each application, the second data including buttons configured for each application and corresponding functions, the multiple applications including at least the first application and the second application; determining the preference data based on the first data, the preference data including preference buttons and corresponding preference functions; determining the target data based on the preference data and the second data.
[0012] According to an embodiment of the present disclosure, the method also includes: in response to revoking the target function, updating the target data, adding a target button in the first application of the target data and mapping the target button to no function; and / or in response to confirming the target function, updating the target data, adding a target button in the first application of the target data and mapping the target button to the target function.
[0013] A second aspect of the present disclosure provides a data processing device, including: an acquisition module, configured to obtain a first input for a first application; the first input is generated based on a target key of an input device being triggered;
[0014] The execution module is used to execute a target function for the first application if the first application is not configured with a target button; the target function is a function executed in response to a first input to a second application, and the second application is configured with a target button and a target function.
[0015] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned data processing method.
[0016] The fourth aspect of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned data processing method.
[0017] The fifth aspect of the present disclosure also provides a computer program product, including a computer program, which implements the above-mentioned data processing method when executed by a processor.
[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0020] Figure 1 A flowchart schematically shows a data processing method according to an embodiment of the present disclosure;
[0021] Figure 2 A flowchart of a data processing method according to an embodiment of the present disclosure is schematically shown;
[0022] Figure 3 A flowchart schematically shows a data processing method according to another embodiment of the present disclosure;
[0023] Figure 4 A flowchart schematically shows a data processing method according to yet another embodiment of the present disclosure;
[0024] Figure 5 A structural block diagram schematically shows a data processing device according to an embodiment of the present disclosure; and
[0025] Figure 6 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0026] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0027] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0028] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0029] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0030] The embodiments of the present disclosure provide a data processing method and device. Before introducing the technical solutions provided by the embodiments of the present disclosure, the related technologies involved in the present disclosure are first described.
[0031] At present, in different applications, different functions can be achieved through different shortcut keys. However, different applications use different shortcut keys for the same function. Users need to be familiar with the shortcut key systems of different applications at the same time, which leads to high learning costs and is not conducive to improving the operating efficiency of the application.
[0032] For example, for the first application and the second application of the code editor, the shortcut key for the "delete current line" function in the first application is Ctrl + Shirt + K, while the shortcut key in the second application is Ctrl + Y. If the user is accustomed to the first application of the code editor, switching to the second application may cause shortcut key confusion or misuse, which brings a lot of inconvenience to the user.
[0033] Usually, in order to avoid confusion between the shortcut keys of the first application and the second application, the user needs to be familiar with the shortcut key system of the first application and the second application. However, as the number of applications increases, the learning cost of different applications increases, which is not conducive to improving the operating efficiency of the applications.
[0034] Before further describing the embodiments of the present disclosure in detail, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are subject to the following interpretations.
[0035] Shortcut keys can also be named as quick keys or hot keys, which refer to controlling the application to complete the operation corresponding to a shortcut function through certain specific keys, key sequences or key combinations.
[0036] An embodiment of the present disclosure provides a data processing method, including: obtaining a first input for a first application; the first input is generated based on a target button of an input device being triggered; if the first application is not configured with a target button, executing a target function for the first application; the target function is a function executed in response to the first input for a second application, and the second application is configured with a target button and a target function. By sharing the configuration of buttons and functions between different applications, when the user triggers a target button that is inconsistent with the button configuration in the current application, the target button can be automatically matched with a target function that meets the user's expectations. It can not only solve the problem of easy confusion of buttons between multiple applications and improve work efficiency; it can also reduce the need for users to learn the configuration of buttons and functions of each application one by one, thereby reducing the user's learning cost.
[0037] The following will be passed Figure 1~Figure 4 The data processing method of the disclosed embodiment is described in detail.
[0038] Figure 1 The flowchart of the data processing method according to the embodiment of the present disclosure is schematically shown.
[0039] like Figure 1 As shown, the data processing method of this embodiment includes operations S210 to S220.
[0040] In operation S210, a first input for a first application is obtained; the first input is generated based on a target key of an input device being triggered.
[0041] Exemplarily, the first application may be an application that currently interacts with the user. For example, a social application, a document application, a code editing application, etc. may be running simultaneously in a computer, and the user is currently using the code editing application to perform code editing operations, while the social application and the document application are running in the background.
[0042] An input device may be a device that a user interacts with an electronic device. For example, an input device may be a keyboard, a game console, etc.
[0043] The target key can be a certain key or key combination in the input device. Certain keys or key combinations can control the application to complete a function. For example, in social applications, the Alt+A key combination can be used to control the screenshot operation. In code editing applications, the Ctrl+Y key combination can be used to control the deletion of the current line. In the browser, the F5 key can be used to refresh the browsing interface.
[0044] The first input may be that the electronic device detects the user triggering the target key through the input device and generates corresponding input data. For example, when the user presses the "Enter" key on the keyboard, the system generates "Enter" as the first input, and this input will be processed by the application and perform the corresponding operation.
[0045] For example, the user is currently performing a code editing operation in a first code editing application, and the user presses the Ctrl+Y key combination on the keyboard to generate a first input for the first code editing application.
[0046] In operation S220, if the first application is not configured with a target button, a target function is executed for the first application; the target function is a function executed in response to a first input to a second application, and the second application is configured with a target button and a target function.
[0047] Exemplarily, the second application may be an application different from the first application. The second application may be an application with similar functions to the first application. For example, if the function of the first application is code editing, the function of the second application may also be code editing. The second application may also be an application with different functions from the first application. For example, if the function of the first application is code editing, the function of the second application may be document editing.
[0048] In the case where multiple applications have different functions for the target key, the application corresponding to the target key and the target function corresponding to the target key in the application can be determined according to the user's usage preference for the multiple applications. The application corresponding to the target key and the target function corresponding to the target key in the application can also be determined according to the similarity of functions between the multiple applications and the first application.
[0049] The second application is configured with a target key and a target function, and the second application can execute the target function in response to the first input. For example, the shortcut key configuration of the second code editing application includes: Ctrl+Y (target key)---delete the current line (target function). If the user is currently performing a code editing operation in the second code editing application, the user presses the Ctrl+Y combination key on the keyboard, and the second application can execute the operation of deleting the current line.
[0050] In one example, the user is currently performing a code editing operation in a first code editing application. The user presses the Ctrl+Y key combination on the keyboard to generate a first input for the first code editing application. However, there is no Ctrl+Y in the shortcut key configuration of the first code editing application. At this time, the shortcut key configuration of other applications is searched, and the function corresponding to Ctrl+Y is queried. It is found that there is a function corresponding to Ctrl+Y (delete current line) in the shortcut key configuration of the second application. Then, the function of deleting the current line can be executed in the first code editing application.
[0051] It is understandable that by sharing the configuration of buttons and functions between different applications, when the user triggers a target button that is inconsistent with the button configuration in the current application, the target button can be automatically matched with the target function that meets the user's expectations. This can not only solve the problem of easy confusion of buttons between multiple applications and improve work efficiency; it can also reduce the need for users to learn the configuration of buttons and functions of each application one by one, reducing the user's learning cost.
[0052] In an embodiment of the present disclosure, when the first application is not configured with a target button, the target function may be determined by the following method.
[0053] As described above, in operation S220, if the first application is not configured with a target button, the target function is executed for the first application. In one achievable manner, the operation may further include: if the first application is not configured with a target button, determining a target function corresponding to the target button in the second application. If the first application is configured with a preset button for the target function, mapping the target button to the preset button. Executing the target function corresponding to the preset button for the first application.
[0054] Exemplarily, the preset key may be a key corresponding to the target function in the first application. For example, the target key is Ctrl+Y, and in the second application, the function corresponding to Ctrl+Y is to delete the current line. There is no Ctrl+Y configuration in the first application, but the key corresponding to deleting the current line is Ctrl+Shift+K.
[0055] In one example, the user is currently performing a code editing operation in a first code editing application, and the user presses the Ctrl+Y key combination on the keyboard to generate a first input for the first code editing application. However, there is no Ctrl+Y in the shortcut key configuration of the first code editing application. At this time, the shortcut key configuration of other applications is searched, and the function corresponding to Ctrl+Y is queried to obtain a function corresponding to Ctrl+Y (delete current line) in the shortcut key configuration of the second application. You can then search in the first code editing application to see if there is a key corresponding to "delete current line". If the key corresponding to "delete current line" in the first code editing application is Ctrl+Shift+K, then the Ctrl+Y function can be mapped to the simulated pressing of Ctrl+Shift+K that implements the "delete current line" function in the first code editing application to implement the operation of deleting the current line in the first code editing application.
[0056] It is understandable that when switching between different applications, it is possible to realize the conversion between different keys of the same function between different applications, and convert the target key into a key operation adapted to the first application. This can not only solve the problem of shortcut key confusion and improve work efficiency, but also reduce the user's learning cost.
[0057] As described above, in operation S220, if the first application is not configured with a target button, the target function is executed for the first application. In another achievable manner, the operation may further include: if the first application is not configured with a target button, determining a target function corresponding to the target button in the second application; if the first application is not configured with a preset button for the target function, executing the target function corresponding to the target button for the first application.
[0058] In one example, the user is currently performing a code editing operation in a first code editing application, and the user presses the Ctrl+Y key combination on the keyboard to generate a first input for the first code editing application. However, there is no Ctrl+Y in the shortcut key configuration of the first code editing application. At this time, the shortcut key configuration of other applications is searched, and the function corresponding to Ctrl+Y is queried to obtain a function corresponding to Ctrl+Y (delete current row) in the shortcut key configuration of the second application. You can then search in the first code editing application to see if there is a key corresponding to "delete current row". If there is no key corresponding to "delete current row" in the first code editing application, you can directly execute the "delete current row" function in the first code editing application to implement the operation of deleting the current row in the first code editing application.
[0059] In an embodiment of the present disclosure, when the first application configures a target button, the target function may be determined by the following method.
[0060] As described above, in the case where the first application is configured with a target button, in one achievable manner, a method for determining a target function may include: if the first application is configured with a target button, determining a predicted function corresponding to the target button, the first application is configured with a target button and candidate functions, the candidate function being a function executed in response to a first input to the first application; if the predicted function is the same as the candidate function, executing the candidate function corresponding to the target button for the first application; if the predicted function is the same as the target function, executing the target function corresponding to the target button for the first application.
[0061] For example, the candidate function may be a function corresponding to a target button in a first application. The target function may be a function corresponding to a target button in a second application. For example, the first application is configured with "Ctrl+Y→Copy current line", and the second application is configured with "Ctrl+Y→Delete current line". That is, multiple applications use different keystrokes for the same function.
[0062] The prediction function can predict the function that the user may want to execute for the target key according to the user's historical input data through the intelligent prediction module. For example, when the user is using the first code editing application, usually after pressing Ctrl+Y, if the first code editing application does not respond, the user manually deletes the current line. The intelligent prediction module is trained using historical input data. When the intelligent prediction module is loaded in the first code editing application, if the user presses Ctrl+Y again in the first code editing application, the intelligent prediction module predicts that the user wants to execute the "delete current line" function for Ctrl+Y.
[0063] If multiple applications use different keystrokes for the same function, but the user is familiar with the keys and functions of the first application, but not the keys and functions of the second application. If the user enters a familiar key in the second application, but does not want to execute the function corresponding to the key in the second application, but wants to execute the function corresponding to the key in the first application. However, it is also possible that the user remembers the function corresponding to the key in the second application and wants to execute the function corresponding to the key in the second application. Therefore, key confusion is likely to occur.
[0064] In one example, if the first code editing application is configured with a “copy current line” function for Ctrl+Y.
[0065] The user is currently performing a code editing operation in the first code editing application. The user presses the Ctrl+Y key combination on the keyboard to generate a first input for the first code editing application. If the intelligent prediction module predicts that the predicted function corresponding to the target key is "copy current line", it indicates that the user wants to execute the "copy current line" function through Ctrl+Y, and this function is the same as the candidate function configured by Ctrl+Y in the first application. Then, the "copy current line" function can be executed in the first code editing application to implement the operation of copying the current line in the first code editing application.
[0066] If the intelligent prediction module predicts that the predicted function corresponding to the target key is "delete current row", it indicates that the user wants to execute the "delete current row" function through Ctrl+Y, which is different from the candidate function configured by Ctrl+Y in the first application, but is the same as the candidate function configured by Ctrl+Y in the second application. Then, the "delete current row" function can be executed in the first code editing application to implement the operation of deleting the current row in the first code editing application.
[0067] It is understandable that by intelligently predicting the different functions corresponding to the target buttons to adapt to the user's operating habits, the troubles caused by different button settings for different applications can be avoided. This can not only improve the user's work efficiency, but also bring a smoother and more convenient user experience.
[0068] As described above, in the case where the first application is configured with a target button, in another achievable manner, the method for determining the target function may include: if the first application is configured with a target button, executing a candidate function corresponding to the target button for the first application, and the first application is configured with the target button and the candidate function; in response to revoking the candidate function, executing the target function corresponding to the target button for the first application.
[0069] In one example, if the first code editing application is configured with a “copy current line” function for Ctrl+Y.
[0070] The user is currently performing a code editing operation in the first code editing application. The user presses the Ctrl+Y key combination on the keyboard to generate a first input for the first code editing application. Since the first code editing application is configured with a "copy current line" function for Ctrl+Y, the "copy current line" function can be executed in the first code editing application. However, after the first code editing application executes the "copy current line" function, if the user cancels the "copy current line" operation. This indicates that the user did not intend to execute the "copy current line" operation through Ctrl+Y. The "delete current line" function corresponding to Ctrl+Y in the second code editing application can be executed in the first code editing application.
[0071] It is understandable that if the user is not satisfied with the candidate function matching the target key in the first application, the target function matching the target key in other applications can be automatically switched, which can improve the interaction efficiency between different applications and bring a smoother and more convenient user experience.
[0072] In the embodiments of the present disclosure, the target function corresponding to the target key can be predicted. Figure 2 Taking the example, a process of determining the target function of a target key in a data processing method is described.
[0073] Figure 2 The flowchart schematically shows a data processing method according to an embodiment of the present disclosure.
[0074] In one example, if Figure 2 As shown, the data processing method of the embodiment of the present disclosure may include operations S310 to S390.
[0075] In operation S310 , a first input for a first application is obtained.
[0076] In operation S320, it is determined whether the first application is configured with a target button.
[0077] In operation S330, when the first application is not configured with a target button, a target function corresponding to the target button in the second application is determined.
[0078] In operation S340 , it is determined whether the first application is configured with a preset button for the target function.
[0079] In operation S350, if the first application is configured with a preset key for the target function, the target key is mapped to the preset key.
[0080] In operation S360, a target function corresponding to the preset key is executed for the first application.
[0081] In operation S370, if the first application is not configured with a preset key for the target function, the target function corresponding to the target key is executed for the first application.
[0082] In operation S380, in a case where the first application configures the target key, a predicted function corresponding to the target key is determined.
[0083] In operation S390, if the predicted function is the same as the candidate function, the candidate function corresponding to the target key is executed for the first application.
[0084] If the predicted function is not the same as the candidate function, the above operation S370 is performed.
[0085] Exemplarily, the user is currently performing a code editing operation in a first code editing application, and the user presses the Ctrl+Y key combination on the keyboard to generate a first input for the first code editing application.
[0086] If there is no configuration function for Ctrl+Y in the first code editing application.
[0087] At this time, search for the shortcut key configuration of other applications, query the function corresponding to Ctrl+Y, and obtain the function corresponding to Ctrl+Y (delete current line) in the shortcut key configuration of the second application. Then, you can search in the first code editing application whether there is a key corresponding to "delete current line".
[0088] If the key corresponding to "delete current line" in the first code editing application is Ctrl+Shift+K, the Ctrl+Y function can be mapped to simulate pressing Ctrl+Shift+K that implements the "delete current line" function in the first code editing application to implement the operation of deleting the current line in the first code editing application.
[0089] If there is no button corresponding to "delete current row" in the first code editing application, the function of "delete current row" can be directly executed in the first code editing application to implement the operation of deleting the current row in the first code editing application.
[0090] If the first code editing application is configured with a "copy current line" function for Ctrl+Y.
[0091] If the intelligent prediction module predicts that the predicted function corresponding to the target key is "copy current line", it indicates that the user wants to execute the "copy current line" function through Ctrl+Y, and the function is the same as the candidate function configured by Ctrl+Y in the first application. Then, the "copy current line" function can be executed in the first code editing application to implement the operation of copying the current line in the first code editing application.
[0092] If the intelligent prediction module predicts that the predicted function corresponding to the target key is "delete current row", it indicates that the user wants to execute the "delete current row" function through Ctrl+Y, which is different from the candidate function configured by Ctrl+Y in the first application, but is the same as the candidate function configured by Ctrl+Y in the second application. Then, the "delete current row" function can be executed in the first code editing application to implement the operation of deleting the current row in the first code editing application.
[0093] In the embodiments of the present disclosure, the target function corresponding to the target key can be predicted. Figure 3 Taking the example, another process of determining the target function of the target key in the data processing method is described.
[0094] Figure 3 The flowchart schematically shows a data processing method according to another embodiment of the present disclosure.
[0095] In one example, if Figure 3 As shown, the data processing method of the embodiment of the present disclosure may include operations S410 to S480.
[0096] In operation S410 , a first input for a first application is obtained.
[0097] In operation S420, it is determined whether the first application is configured with a target button.
[0098] In operation S430, when the first application is not configured with a target button, a target function corresponding to the target button in the second application is determined.
[0099] In operation S440 , it is determined whether the first application is configured with a preset button for the target function.
[0100] In operation S450, if the first application is configured with a preset key for the target function, the target key is mapped to the preset key.
[0101] In operation S460, a target function corresponding to the preset key is executed for the first application.
[0102] In operation S470, if the first application is not configured with a preset key for the target function, a candidate function corresponding to the target key is executed for the first application.
[0103] In operation S480, in a case where the first application configures the target key, a candidate function corresponding to the target key is executed for the first application.
[0104] In response to canceling the candidate function, the target function corresponding to the target key is executed for the first application.
[0105] Exemplarily, the user is currently performing a code editing operation in a first code editing application, and the user presses the Ctrl+Y key combination on the keyboard to generate a first input for the first code editing application.
[0106] If there is no configuration function for Ctrl+Y in the first code editing application.
[0107] At this time, search for the shortcut key configuration of other applications, query the function corresponding to Ctrl+Y, and obtain the function corresponding to Ctrl+Y (delete current line) in the shortcut key configuration of the second application. Then, you can search in the first code editing application whether there is a key corresponding to "delete current line".
[0108] If the key corresponding to "delete current line" in the first code editing application is Ctrl+Shift+K, the Ctrl+Y function can be mapped to simulate pressing Ctrl+Shift+K that implements the "delete current line" function in the first code editing application to implement the operation of deleting the current line in the first code editing application.
[0109] If there is no button corresponding to "delete current row" in the first code editing application, the function of "delete current row" can be directly executed in the first code editing application to implement the operation of deleting the current row in the first code editing application.
[0110] If the first code editing application is configured with a "copy current line" function for Ctrl+Y.
[0111] The user is currently performing a code editing operation in the first code editing application. The user presses the Ctrl+Y key combination on the keyboard to generate a first input for the first code editing application. Since the first code editing application is configured with a "copy current line" function for Ctrl+Y, the "copy current line" function can be executed in the first code editing application. However, after the first code editing application executes the "copy current line" function, if the user cancels the "copy current line" operation. This indicates that the user did not intend to execute the "copy current line" operation through Ctrl+Y. The "delete current line" function corresponding to Ctrl+Y in the second code editing application can be executed in the first code editing application.
[0112] According to an embodiment of the present disclosure, the usage frequency of the second application is greater than the usage frequency of the third application, and the third application includes the first application.
[0113] For example, when multiple applications have corresponding functions for the target key, the application corresponding to the target key and the target function corresponding to the target key in the application can be determined according to the frequency of use of the multiple applications by the user. For example, the second application and the third application both have functions corresponding to Ctrl+Y, but the user's frequency of use of the second application and the third application is greater than the frequency of use of the third application, the second application is often used, and the third application is occasionally used, then the second application with a higher frequency of use can be prioritized as the application matching the target key to determine the target function.
[0114] As described above, in operation S220, if the first application is not configured with a target button, the target function is executed for the first application. In another possible implementation, the operation may further include: if the first application is not configured with a target button, according to the target data, determining a function corresponding to the target button from the target data, obtaining the target function, and executing the target function for the first application; wherein the target data at least includes buttons and corresponding functions configured for the first application and the second application.
[0115] The target data may be a key-function mapping table of multiple applications. The functions corresponding to the shortcut keys of multiple applications in the system are sorted out to obtain the target data, as shown in Table 1.
[0116] Table 1 Target data
[0117]
[0118] In one example, the user is currently performing a code editing operation in a first code editing application. The user presses the Ctrl+Y key combination on the keyboard to generate a first input for the first code editing application. However, there is no Ctrl+Y in the shortcut key configuration of the first code editing application. At this time, the shortcut key configuration of other applications is searched, and the function corresponding to Ctrl+Y is queried. It is found that there is a function corresponding to Ctrl+Y (delete current line) in the shortcut key configuration of the second application. Then, the function of deleting the current line can be executed in the first code editing application.
[0119] In some embodiments, the target data also includes preference data, and the method also includes: obtaining first data and second data of multiple applications, the first data represents the usage frequency of each application, the second data includes buttons configured for each application and corresponding functions, and the multiple applications include at least the first application and the second application; determining the preference data based on the first data, the preference data includes preference buttons and corresponding preference functions; determining the target data based on the preference data and the second data.
[0120] For example, the preference data may be a mapping table of buttons and functions in applications that are frequently used by the user.
[0121] The target data may include a key-function mapping table of multiple applications and a key-function mapping table of applications that are frequently used by users.
[0122] In an example, the first data may be: functions corresponding to shortcut keys of multiple applications in the system, as shown in Table 1. The second data may be usage frequencies of multiple applications, as shown in Table 2.
[0123] Table 2 Preference data
[0124]
[0125] The shortcut keys and corresponding functions of the applications most frequently used by the user are used as the user's preference data. And according to the first data and the preference data, the target data is determined, as shown in Table 3.
[0126] Table 3 Target data
[0127]
[0128] In one example, the user is currently performing a code editing operation in a first code editing application. The user presses the Ctrl+Y key combination on the keyboard to generate a first input for the first code editing application. However, there is no Ctrl+Y in the shortcut key configuration of the first code editing application. At this time, the preference data in the target data can be searched first to query the function corresponding to Ctrl+Y, and the function corresponding to Ctrl+Y (delete current line) can be obtained in the preference data. Then, the function of deleting the current line can be executed in the first code editing application.
[0129] According to an embodiment of the present disclosure, the data processing method may further include: in response to revoking a target function, updating the target data, adding a target button in the first application of the target data and mapping the target button to no function; in response to confirming the target function, updating the target data, adding a target button in the first application of the target data and mapping the target button to the target function.
[0130] In one example, the user is currently performing a code editing operation in a first code editing application. The user presses the Ctrl+Y key combination on the keyboard to generate a first input for the first code editing application. However, there is no Ctrl+Y in the shortcut key configuration of the first code editing application. At this time, the shortcut key configuration of other applications is searched, and the function corresponding to Ctrl+Y is queried. It is found that there is a function corresponding to Ctrl+Y (delete current line) in the shortcut key configuration of the second application. Then, the function of deleting the current line can be executed in the first code editing application.
[0131] After executing "delete current row", if the user cancels the "delete current row" operation, it indicates that the user does not want to execute the "delete current row" function for Ctrl+Y in the first code editing application. Then, a mapping relationship between Ctrl+Y and no function can be added to the target data, so that next time the user presses Ctrl+Y for the first code editing application, no function is executed.
[0132] After executing "delete current row", if the user does not cancel the "delete current row" operation, it indicates that the user wants to execute the "delete current row" function for Ctrl+Y in the first code editing application. Then, a mapping relationship between Ctrl+Y and the "delete current row" function can be added to the target data, so that the next time the user presses Ctrl+Y on the first code editing application, the function corresponding to Ctrl+Y in the first application is found to be "delete current row", and the "delete current row" function is directly executed.
[0133] According to an embodiment of the present disclosure, if the operating system is configured with third data, the third data represents the buttons configured in the operating system and the corresponding functions.
[0134] If the user is currently performing a code editing operation in the first code editing application, the user presses the Ctrl+Y key combination on the keyboard to generate the first input for the first code editing application. However, there is no Ctrl+Y in the shortcut key configuration of the first code editing application. At this time, the shortcut key configuration of the operating system is prioritized, and the function corresponding to Ctrl+Y is queried. If the operating system can obtain a "copy" function corresponding to Ctrl+Y, the "copy" function can be executed in the first code editing application. If there is no function corresponding to Ctrl+Y in the operating system, then the preference data and other applications are searched in turn.
[0135] In order to facilitate the understanding of the data processing method of the embodiment of the present disclosure, Figure 4 This data processing method will be described.
[0136] Figure 4 The flowchart of a data processing method according to yet another embodiment of the present disclosure is schematically shown.
[0137] In one implementation, the data processing method may include operations S510 to S560.
[0138] In operation S510, a smart shortcut key service is run, and the smart shortcut key service may be a software program applied in a terminal.
[0139] In operation S520, keyboard scanning / monitoring is performed.
[0140] In operation S530, the system responds.
[0141] In operation S540, the smart shortcut key service performs shortcut key mapping.
[0142] In operation S550, the function is executed.
[0143] In operation S560, the feedback is corrected.
[0144] In one example, the smart shortcut key service is loaded and run in the terminal. The smart shortcut key service scans the operating system shortcut key registry and the shortcut key registry of each application, and forms initial data, which includes shortcut keys and corresponding function information of different applications and operating systems. The smart shortcut key service generates a contact table for shortcut keys that implement the same function in different applications, as shown in Table 1 above. At the same time, the smart shortcut key service collects the frequency of users using different applications and obtains the user's preference data, as shown in Table 2 above. The target data is obtained by sorting the contact table and preference data.
[0145] The keyboard monitor detects that the user opens the first application and enters Ctrl+Y, then the system responds: the Ctrl+Y key combination is monitored, and the response is shortcut key processing. If Ctrl+Y does not conflict with the system shortcut key, and the first application does not have a Ctrl+Y shortcut key. It is judged that the user prefers to use Ctrl1+Y to delete the current row in the second application, and it is predicted that the user also wants to use the delete current row function here. Therefore, Ctrl+Y is mapped to Ctrl + Shift +K of the first application and passed to the first application. The first application executes the Ctrl+ Shift +K function of deleting the current row. The "delete current row" operation is canceled, indicating that the user does not want to execute the "delete current row" function for Ctrl+Y in the first code editing application. Then, a mapping relationship between Ctrl+Y and no function can be added to the target data, so that no function is executed the next time the user presses Ctrl+Y for the first code editing application. After executing "delete current row", if the user does not cancel the "delete current row" operation, it indicates that the user wants to execute the "delete current row" function for Ctrl+Y in the first code editing application. A mapping relationship between Ctrl+Y and the "Delete Current Row" function can be added to the target data, so that the next time the user presses Ctrl+Y for the first code editing application, the function corresponding to Ctrl+Y in the first application is found to be "Delete Current Row", and the "Delete Current Row" function is directly executed.
[0146] Based on the above data processing method, the present disclosure also provides a data processing device. Figure 5 The device is described in detail.
[0147] Figure 5 The structure block diagram of a data processing device according to an embodiment of the present disclosure is schematically shown.
[0148] like Figure 5 As shown, the data processing device 600 of this embodiment includes an acquisition module 610 and an execution module 620 .
[0149] The acquisition module 610 is used to obtain a first input for the first application; the first input is generated based on the target key of the input device being triggered. In one embodiment, the acquisition module 610 can be used to perform the operation S210 described above, which will not be repeated here.
[0150] The execution module 620 is used to execute the target function for the first application if the first application is not configured with the target button; the target function is a function executed in response to the first input for the second application, and the second application is configured with the target button and the target function. In one embodiment, the execution module 620 can be used to execute the operation S220 described above, which will not be repeated here.
[0151] According to an embodiment of the present disclosure, any multiple modules in the acquisition module 610 and the execution module 620 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 610 and the execution module 620 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the acquisition module 610 and the execution module 620 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0152] Figure 6 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of the present disclosure is schematically shown.
[0153] like Figure 6 As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 to a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0154] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.
[0155] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.
[0156] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0157] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.
[0158] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the data processing method provided by the embodiment of the present disclosure.
[0159] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 701. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0160] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0161] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0162] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0163] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0164] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0165] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A data processing method, comprising: Obtaining a first input for a first application; The first input is generated based on a target key of the input device being triggered; If the first application is not configured with the target button, a target function is executed for the first application; the target function is a function executed in response to a first input to a second application, and the second application is configured with a target button and a target function.
2. The method according to claim 1, if the first application is not configured with the target button, executing the target function for the first application comprises: If the first application is not configured with the target button, determining a target function corresponding to the target button in the second application; If the first application is configured with a preset button for the target function, mapping the target button to the preset button; A target function corresponding to the preset button is executed for the first application.
3. The method according to claim 1, if the first application is not configured with the target button, executing the target function for the first application comprises: If the first application is not configured with the target button, determining a target function corresponding to the target button in the second application; If the first application does not configure a preset button for the target function, the target function corresponding to the target button is executed for the first application.
4. The method according to claim 1, further comprising: If the first application is configured with the target key, determining a predicted function corresponding to the target key, the first application being configured with the target key and candidate functions, the candidate functions being functions executed in response to a first input to the first application; If the predicted function is the same as the candidate function, executing the candidate function corresponding to the target key for the first application; If the predicted function is the same as the target function, the target function corresponding to the target key is executed for the first application.
5. The method according to claim 1, further comprising: If the first application is configured with the target button, executing the candidate function corresponding to the target button for the first application, the first application is configured with the target button and the candidate function; In response to revoking the candidate function, executing a target function corresponding to the target key for the first application. 6 . The method according to claim 1 , wherein the usage frequency of the second application is greater than the usage frequency of a third application, and the third application includes the first application.
7. The method according to any one of claims 1 to 6, if the first application is not configured with the target button, executing the target function for the first application comprises: If the first application is not configured with the target button, according to the target data, determining a function corresponding to the target button from the target data, obtaining a target function, and executing the target function for the first application; The target data at least includes buttons and corresponding functions configured by the first application and the second application.
8. The method according to claim 7, wherein the target data further comprises preference data, and the method further comprises: Acquire first data and second data of a plurality of applications, wherein the first data represents the usage frequency of each application, and the second data includes buttons configured for each application and corresponding functions, and the plurality of applications includes at least the first application and the second application; determining preference data based on the first data, the preference data including preference keys and corresponding preference functions; The target data is determined according to the preference data and the second data.
9. The method according to claim 8, further comprising: In response to revoking the target function, updating the target data, adding the target button in the first application of the target data and mapping the target button to have no function; and / or In response to confirming the target function, the target data is updated, the target button is added to the first application of the target data, and the mapping of the target button is the target function.
10. A data processing device, comprising: An acquisition module, configured to obtain a first input for a first application; The first input is generated based on a target key of the input device being triggered; An execution module is used to execute a target function for the first application if the first application is not configured with the target button; the target function is a function executed in response to a first input to a second application, and the second application is configured with a target button and a target function.