Data processing method, device and storage medium

By configuring a preset conversion rule set in the terminal, the clipboard data is automatically converted into a type supported by the edit box, which solves the paste complexity problem caused by the inconsistency between the clipboard and edit box types and improves data processing efficiency.

CN116185653BActive Publication Date: 2025-09-16CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211615502.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-15
Publication Date
2025-09-16
Estimated Expiration
2042-12-15

AI Technical Summary

Technical Problem

In the prior art, when the data type cut from the clipboard is inconsistent with the edit box, the pasting process becomes complicated and inefficient, and usually relies on manual conversion processing.

Method used

The terminal is configured with a preset conversion rule set to automatically identify the type of data to be pasted and convert it into a type supported by the edit box through the target conversion rule, and display it in the target edit box.

Benefits of technology

It realizes automatic data conversion in the case of data type mismatch, simplifies the pasting process, improves efficiency, and avoids the complexity caused by manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116185653B_ABST
    Figure CN116185653B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, device, and storage medium, relating to the field of computer technology, and is used to solve the technical problem of low efficiency in processing data of a type not supported by an edit box in general technology. The method includes: in response to a paste operation performed by a user in a target edit box, obtaining the data type of the data to be pasted and the target data type supported by the target edit box; in response to a failure to match the data type of the data to be pasted and the presence of a target conversion rule in a preset conversion rule set, converting the data to be pasted based on the target conversion rule to obtain converted data to be pasted; the target conversion rule is used to convert the data type of the data to be pasted into the target data type; and displaying the converted data to be pasted in the target edit box.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device, and storage medium. Background Art

[0002] Currently, the clipboard can simultaneously support cutting processing for multiple types of data (such as text type data, image type data, and audio type data, etc.). Some edit boxes only support editing processing for one or two types of data (such as a plain text edit box and a plain image edit box, etc.).

[0003] If the data type of the data cut from the clipboard is inconsistent with the data type supported by the edit box, it is easy to encounter the problem that the data cut from the clipboard cannot be pasted into the edit box. Common technology generally relies on manual conversion before entering it into the edit box, which easily makes the pasting process too complicated and inefficient. Summary of the Invention

[0004] The present application provides a data processing method, device and storage medium for solving the technical problem of low efficiency in processing unsupported data of a type in an edit box in the general technology.

[0005] To achieve the above objectives, this application adopts the following technical solutions:

[0006] In a first aspect, a data processing method is provided, comprising: in response to a paste operation performed by a user in a target edit box, obtaining a data type of the data to be pasted and a target data type supported by the target edit box; in response to a failure in matching the data type of the data to be pasted and a target conversion rule existing in a preset conversion rule set, converting the data to be pasted based on the target conversion rule to obtain converted data to be pasted; the target conversion rule is used to convert the data type of the data to be pasted into the target data type; the preset conversion rule set includes a plurality of conversion rules and a plurality of data type subsets corresponding one-to-one to the plurality of conversion rules; the data type subset includes a plurality of data types matching the conversion rules; and displaying the converted data to be pasted in the target edit box.

[0007] Optionally, after converting the data to be pasted based on the target conversion rule, the method further includes: identifying the data to be pasted to obtain feature information of the data to be pasted; and displaying the feature information of the data to be pasted in the target edit box.

[0008] Optionally, the method for identifying and processing the data to be pasted to obtain characteristic information of the data to be pasted specifically includes: sending an identification request message for identifying and processing the data to be pasted to a server; and receiving an identification response message carrying the characteristic information sent by the server.

[0009] Optionally, the data processing method further includes: in response to a successful match between the data type of the to-be-pasted data and the target data type, displaying the to-be-pasted data in the target edit box.

[0010] In a second aspect, a data processing device is provided, comprising: an acquisition unit, a processing unit, and a display unit;

[0011] an acquiring unit, configured to acquire, in response to a paste operation performed by a user in a target edit box, a data type of the to-be-pasted data and a target data type supported by the target edit box;

[0012] a processing unit configured to, in response to a failure of matching between the data type of the to-be-pasted data and the target data type and the presence of a target conversion rule in a preset conversion rule set, convert the to-be-pasted data based on the target conversion rule to obtain converted to-be-pasted data; the target conversion rule being configured to convert the data type of the to-be-pasted data into the target data type; the preset conversion rule set comprising a plurality of conversion rules and a plurality of data type subsets corresponding one-to-one to the plurality of conversion rules; the data type subsets comprising a plurality of data types matching the conversion rules;

[0013] The display unit is used to display the converted data to be pasted in the target edit box.

[0014] Optionally, the processing unit is further configured to perform identification processing on the data to be pasted to obtain feature information of the data to be pasted;

[0015] The display unit is used to display the characteristic information of the data to be pasted in the target editing box.

[0016] Optionally, the processing unit is specifically configured to:

[0017] Sending an identification request message to the server for identifying the pasted data;

[0018] Receive the identification response message carrying feature information sent by the server.

[0019] Optionally, the display unit is further configured to display the data to be pasted in the target edit box in response to a successful match between the data type of the data to be pasted and the target data type.

[0020] In a third aspect, a data processing device is provided, comprising a memory and a processor; the memory is used to store computer-executable instructions, and the processor is connected to the memory via a bus; when the data processing device is running, the processor executes the computer-executable instructions stored in the memory, so that the data processing device performs the data processing method as in the first aspect.

[0021] The data processing device may be a network device, or a portion of a network device, such as a chip system in the network device. The chip system is used to support the network device in implementing the functions involved in the first aspect and any possible implementation thereof, such as receiving, determining, and diverting the data and / or information involved in the above-mentioned data processing method. The chip system includes a chip and may also include other discrete devices or circuit structures.

[0022] In a fourth aspect, a computer-readable storage medium is provided, comprising computer-executable instructions. When the computer-executable instructions are executed on a computer, the computer executes the data processing method of the first aspect.

[0023] It should be noted that the above-mentioned computer instructions may be stored in whole or in part on a first computer-readable storage medium. The first computer-readable storage medium may be packaged together with the processor of the data processing device or separately from the processor of the data processing device, and this application does not limit this.

[0024] In this application, the names of the aforementioned data processing devices do not limit the devices or functional modules themselves. In actual implementation, these devices or functional modules may appear with other names. As long as the functions of each device or functional module are similar to those of this application, they fall within the scope of the claims of this application and their equivalents.

[0025] These and other aspects of the present application will become more readily apparent from the following description.

[0026] The technical solution provided by this application brings at least the following beneficial effects:

[0027] Based on any of the above aspects, in the present application, the terminal can obtain the data type of the data to be pasted and the target data type supported by the target edit box in response to the paste operation performed by the user in the target edit box. Since the terminal is pre-configured with a preset conversion rule set, and the conversion rule set includes multiple conversion rules and multiple data type subsets corresponding one-to-one to the multiple conversion rules. Therefore, when the data type of the data to be pasted and the target data type fail to match, the terminal can determine whether there is a target conversion rule in the preset conversion rule set for converting the data type of the data to be pasted to the target data type. Furthermore, when the data type of the data to be pasted and the target data type fail to match, and there is a target conversion rule in the preset conversion rule set, the terminal can perform data conversion on the data to be pasted based on the target conversion rule to obtain the converted data to be pasted, and display the converted data to be pasted in the target edit box.

[0028] Compared to the conventional technology that relies on manual data type conversion, the terminal in this application can automatically implement the conversion process for data types that the edit box does not support, which can avoid the problem of complex process and low efficiency. Therefore, this application can solve the technical problem of low efficiency when processing data types that the edit box does not support in the conventional technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A schematic diagram of the structure of a data processing system provided in an embodiment of the present application;

[0030] Figure 2 A schematic diagram of the hardware structure of a terminal provided in an embodiment of the present application;

[0031] Figure 3 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 1 ;

[0032] Figure 4 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 2 ;

[0033] Figure 5 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 3 ;

[0034] Figure 6 A schematic diagram of a data pasting process provided in an embodiment of the present application;

[0035] Figure 7 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0037] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being more preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0038] In order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order.

[0039] In addition, the terms "including" and "having" in the embodiments, claims, and drawings of this application are not exclusive. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules and may also include steps or modules that are not listed.

[0040] In order to facilitate understanding of this application, the relevant elements involved in this application are now described.

[0041] Currently, the clipboard can simultaneously support cutting processing for multiple types of data (such as text type data, image type data, and audio type data, etc.). Some edit boxes only support editing processing for one or two types of data (such as a plain text edit box and a plain image edit box, etc.).

[0042] If the data type of the data cut from the clipboard is inconsistent with the data type supported by the edit box, it is easy to encounter the problem that the data cut from the clipboard cannot be pasted into the edit box. Common technology generally relies on manual conversion before entering it into the edit box, which easily makes the pasting process too complicated and inefficient.

[0043] In response to the above-mentioned problems, an embodiment of the present application provides a data processing method, in which the terminal can obtain the data type of the data to be pasted and the target data type supported by the target edit box in response to the paste operation performed by the user in the target edit box. Since the terminal is pre-configured with a preset conversion rule set, and the conversion rule set includes multiple conversion rules and multiple data type subsets corresponding to the multiple conversion rules. Therefore, when the data type of the data to be pasted and the target data type fail to match, the terminal can determine whether there is a target conversion rule in the preset conversion rule set for converting the data type of the data to be pasted to the target data type. Furthermore, when the data type of the data to be pasted and the target data type fail to match, and there is a target conversion rule in the preset conversion rule set, the terminal can perform data conversion on the data to be pasted based on the target conversion rule to obtain the converted data to be pasted, and display the converted data to be pasted in the target edit box.

[0044] Compared to the conventional technology that relies on manual data type conversion, the terminal in this application can automatically implement the conversion process for data types that the edit box does not support, which can avoid the problem of complex process and low efficiency. Therefore, this application can solve the technical problem of low efficiency when processing data types that the edit box does not support in the conventional technology.

[0045] The data processing method is applicable to a data processing system. Figure 1 FIG. 1 shows a structure of the data processing system 100. Figure 1 As shown, the data processing system 100 includes a terminal 101 and a server 102. The terminal 101 and the server 102 can be communicatively connected.

[0046] In actual applications, the server 102 may also be connected to communicate with multiple terminals 101 .

[0047] For ease of understanding, this application takes the communication connection between the server 102 and a terminal 101 as an example for explanation.

[0048] Figure 1 The terminal 101 in the embodiment may be configured with an HTTP client. The HTTP client may be a service implemented based on a World Wide Web (WEB) browser. The HTTP client may be configured with an editor, and the relevant interface of the HTTP client may include an edit box when displayed on the terminal. The editor may be used to support a user to enter specific information (e.g., website address information, resource name, etc.) in the edit box.

[0049] Optionally, Figure 1 The terminal 101 may also be configured with a client for a social content service. The client for the social content service may be configured with an editor, and the relevant interface of the social content service client may include an edit box when displayed on the terminal. The editor may be used to support the user to enter specific information (such as website information and resource names) in the edit box.

[0050] In one possible manner, the terminal 101 may be configured with a resource file having a preset conversion rule set. Furthermore, the terminal 101 may also be configured with a resource file having functions such as a cut function and a paste function.

[0051] In one possible approach, the terminal 101 may be configured with functional modules such as a display module, an input module, and a communication module. The input module may be an external computer input device such as a mouse and keyboard to support various user operations, such as data editing and processing. The display module may be a device such as an LCD screen, used to display interfaces related to an HTTP client or a social content service client, such as a data editing interface. The communication module may be a device such as a transceiver, used to communicate with the server 102.

[0052] Optionally, Figure 1 The terminal 101 in the figure can be a device for providing voice and / or data connectivity to a user, a handheld device with wireless connection function, or other processing equipment connected to a wireless modem. The wireless terminal can communicate with one or more core networks via a radio access network (RAN). The wireless terminal can be a mobile terminal, such as a computer with a mobile terminal, or a portable, pocket-sized, handheld, or computer-built-in mobile device that exchanges language and / or data with a radio access network, such as a mobile phone, tablet computer, laptop computer, netbook, or personal digital assistant (PDA). The embodiments of the present application do not impose any restrictions on this.

[0053] Figure 1 The server 102 may be configured with an HTTP server for providing various data or services applied to HTTP clients.

[0054] In one possible approach, the server 102 may also be configured with functional modules such as image recognition function, image classification function, and voice recognition function to provide data recognition and processing services for the terminal 101 .

[0055] Optionally, server 102 may be a server. The server may be a single server, or a server cluster consisting of multiple servers. In some implementations, the server cluster may also be a distributed cluster. This embodiment of the application does not impose any limitation on this.

[0056] like Figure 2 FIG2 is a schematic diagram of a hardware structure of a terminal 101 provided in an embodiment of the present application. The terminal 101 includes a processor 21, a memory 22, a communication interface 23, and a bus 24. The processor 21, the memory 22, and the communication interface 23 can be connected via a bus 24.

[0057] The processor 21 is the control center of the terminal 101 and can be a single processor or a general term for multiple processing elements. For example, the processor 21 can be a CPU or other general-purpose processor. The general-purpose processor can be a microprocessor or any conventional processor.

[0058] As an embodiment, the processor 21 may include one or more CPUs, such as Figure 2 CPU0 and CPU1 are shown in the figure.

[0059] The memory 22 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0060] In one possible implementation, the memory 22 may exist independently of the processor 21 and may be connected to the processor 21 via a bus 24 for storing instructions or program codes. When the processor 21 calls and executes the instructions or program codes stored in the memory 22, the data processing method provided in the following embodiments of the present application can be implemented.

[0061] In another possible implementation, the memory 22 may also be integrated with the processor 21 .

[0062] The communication interface 23 is used for connecting the terminal 101 to other devices via a communication network, which may be Ethernet, wireless access network, wireless local area network (WLAN), etc. The communication interface 23 may include a receiving unit for receiving data and a sending unit for sending data.

[0063] The bus 24 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, Figure 2 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0064] It should be pointed out that Figure 2 The structure shown in the figure does not constitute a limitation on the terminal 101, except Figure 2 In addition to the components shown, terminal 101 may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0065] like Figure 3 The figure is a flow chart of a data processing method provided by an embodiment of the present application. The data processing method is applied to Figure 1 The terminal 101 in the data processing system 100 is shown. The data processing method includes: S301-S303.

[0066] S301: In response to a paste operation performed by a user in a target edit box, the terminal obtains a data type of the to-be-pasted data and a target data type supported by the target edit box.

[0067] In one possible way, the target edit box can be an edit box in the information query interface of a WEB browser, or an edit box in the interactive information editing interface of a social content service, or an edit box in the relevant interface of other services (such as news service platforms and food delivery service platforms, etc.). Furthermore, the target edit box can support editing operations on data of one data type, or it can support editing operations on data of multiple data types. That is, the target data type can be a text type, an image type, an audio type, etc. Alternatively, the target data type can also be any combination of text type, image type, audio type, etc. The embodiment of the present application does not limit this.

[0068] In one possible embodiment, the data to be pasted may be data cut by a user through an input module configured in the terminal based on a clipboard function configured in the terminal. When the data to be pasted is data of a single data type, the data type of the data to be pasted may be text, image, or audio. Alternatively, when the data to be pasted is a combination of multiple data types, the data type of the data to be pasted may be a combination of text and image, or other combinations. For example, the data to be pasted may be a piece of text, an image, an audio clip, or a video clip. Alternatively, the data to be pasted may be a combination of a piece of text and an image, or a combination of a piece of text and an audio clip.

[0069] One possible way to achieve this is by combining Figure 1 , the user can perform a cut operation on the data to be pasted through the input module configured in the terminal. In response to the cut operation performed by the user, the terminal can copy the data to be pasted to the corresponding cache module of the clipboard and determine the data type of the data to be pasted. Then, the user can perform a paste operation in the target edit box through the input module configured in the terminal to enter the data to be pasted into the target edit box. In response to the paste operation performed by the user, the terminal can determine the target data type supported by the target edit box, and when confirming that the target edit box supports editing the data type of the data to be pasted, enter the data to be pasted into the target edit box.

[0070] Optionally, when the input module configured in the terminal is a mouse, the user can right-click the mouse to call up the function bar and select the cut function to perform the cut operation. When the input module configured in the terminal is a touch screen, the user can also perform the cut operation by long-touching the editable area of ​​the edit box. When the input module configured in the terminal is a keyboard, the user can also perform the cut operation by pressing the cut shortcut key on the keyboard. This embodiment of the application is not limited to this.

[0071] In one possible approach, the terminal may determine the data type of the data to be pasted by reading the attribute information of the data to be pasted, or by using a preset type determination algorithm, such as toString or constructor. This embodiment of the present application does not limit this.

[0072] In a possible manner, the target data type supported by the target edit box can be pre-set in a configuration file of the service to which the target edit box belongs. Based on this, the terminal can determine the target data type supported by the target edit box by calling the configuration file of the service to which the target edit box belongs.

[0073] S302: In response to a failure in matching the data type of the data to be pasted with the target data type and the presence of a target conversion rule in the preset conversion rule set, the terminal converts the data to be pasted based on the target conversion rule to obtain converted data to be pasted.

[0074] The target conversion rule is used to convert the data type of the data to be pasted into the target data type. The preset conversion rule set includes multiple conversion rules and multiple data type subsets corresponding to the multiple conversion rules. The data type subset includes multiple data types that match the conversion rules corresponding to the data type subset.

[0075] In one possible approach, the conversion rule may be a rule implemented based on optical character recognition (OCR) technology, which can be used to convert text in image data into text data. The conversion rule may also be a rule implemented based on text rendering technology, which can be used to convert text data into image data including the characters in the text data. The conversion rule may also be a rule implemented based on speech recognition technology, which can be used to convert audio signals in audio data into text data. Alternatively, the conversion rule may also be a rule implemented based on text-to-speech technology, which can be used to convert text data into audio data.

[0076] In one possible implementation, after obtaining the data type of the data to be pasted and the target data type supported by the target edit box, the terminal can match the data type of the data to be pasted with the target data type. If the data type of the data to be pasted is consistent with the target data type, or if the target data type includes the data type of the data to be pasted, the data type of the data to be pasted and the target data type are successfully matched. In this case, the terminal can display the data to be pasted in the target edit box.

[0077] If the data type of the data to be pasted is inconsistent with the target data type, the data type of the data to be pasted and the target data type fail to match, which may indicate that the target edit box does not support editing the data type of the data to be pasted. In this case, the terminal can further match the data type of the data to be pasted and the target data type in a preset conversion rule set.

[0078] If the preset conversion rule set does not contain a data type subset that includes both the data type of the data to be pasted and the target data type, it indicates that the preset conversion rule set does not contain a target conversion rule for converting the data type of the data to be pasted into the target data type, that is, the data type of the data to be pasted cannot be converted into the target data type.

[0079] If the data type of the to-be-pasted data and the target data type belong to the same data type subset within the preset conversion rule set, then the preset conversion rule set contains a target conversion rule for converting the data type of the to-be-pasted data into the target data type. In this case, the terminal can convert the to-be-pasted data based on the target conversion rule to obtain the converted data to be pasted.

[0080] S303: The terminal displays the converted data to be pasted in the target edit box.

[0081] In one possible implementation, the terminal converts the data to be pasted based on the target conversion rules. After obtaining the converted data to be pasted, the terminal can display the converted data to be pasted in the target edit box to facilitate the user to perform the next operation, such as interactive information sending and data query operations.

[0082] In one embodiment, Figure 4 As shown, the data processing method provided in the embodiment of the present application further includes: S401-S402.

[0083] S401: The terminal identifies and processes the data to be pasted to obtain feature information of the data to be pasted.

[0084] In one possible approach, when the data to be pasted is image data, the characteristic information of the data to be pasted may include information such as the names of animals and plants or the color categories of colors included in the image data. When the data to be pasted is video data, the characteristic information of the data to be pasted may include information such as attribute information (e.g., name, size) or content type of the video data.

[0085] In one possible approach, if the terminal converts the data to be pasted based on the target conversion rule and the converted data to be pasted has no content, that is, if the conversion based on the target conversion rule fails, the terminal can further identify the data to be pasted to obtain feature information of the data to be pasted.

[0086] In a possible example, the preset target data type is a text type, the data to be pasted is image data, and the image data does not contain character content. That is, the data type of the data to be pasted is an image type. When there is a target conversion rule for converting image type data into text type data in the preset conversion rule set, the terminal can convert the data to be pasted based on the target conversion rule. In this case, since the data to be pasted does not contain character content, the converted data to be pasted obtained by the terminal has no text content and no content can be entered in the target edit box. In order to ensure user experience, the terminal can identify and process the data to be pasted, obtain feature information of the data to be pasted, and thus input the feature information of the data to be pasted into the target edit box. For example, if the data to be pasted includes an image of a tiger, the terminal can obtain the text information of the feature information of the data to be pasted as "tiger" after identifying and processing the data to be pasted.

[0087] S402: The terminal displays the characteristic information of the data to be pasted in the target edit box.

[0088] In one possible approach, after obtaining the characteristic information of the data to be pasted, the terminal may display the characteristic information of the data to be pasted in the target edit box to facilitate the user to perform the next operation, such as interactive information sending operation and data query operation.

[0089] In one embodiment, combining Figure 4 In the above S401, when the terminal identifies the data to be pasted and obtains the characteristic information of the data to be pasted, Figure 5 As shown, the embodiment of the present application provides an optional implementation method, including: S501-S502.

[0090] S501: The terminal sends an identification request message for identifying data to be pasted to the server.

[0091] It should be noted that recognition processing usually needs to be implemented based on a recognition model that takes up a large amount of resources. In order to reduce the usage of terminal operating resources and storage resources, the recognition processing process can be implemented in the server. The server can be the server of the application software (such as social content service, etc.) to which the target edit box belongs, and the resource file with the recognition model can be pre-configured by the staff. The recognition model can be used to identify the content in the image and realize functions such as image recognition and image classification.

[0092] Based on this, when the pasted data needs to be recognized, the terminal can send a recognition request message to the server to recognize the pasted data. In response, the server can receive the recognition request message sent by the terminal and parse it to obtain the pasted data. Subsequently, the server can recognize the pasted data based on the configured recognition model and obtain a recognition result. The recognition result may include feature information of the pasted data.

[0093] S502: The terminal receives an identification response message carrying feature information sent by the server.

[0094] In one possible approach, after obtaining an identification result including characteristic information of the data to be pasted, the server may send an identification response message carrying the characteristic information of the data to be pasted to the terminal. In response, the terminal may receive the identification response message sent by the server and parse the identification response message to obtain the characteristic information of the data to be pasted. Subsequently, the terminal may display the characteristic information of the data to be pasted in the target edit box.

[0095] In one embodiment, the data processing method provided in the embodiment of the present application further includes: S601.

[0096] S601: In response to a successful match between the data type of the data to be pasted and the target data type, the terminal displays the data to be pasted in a target edit box.

[0097] In one embodiment, Figure 6 FIG. 1 is a schematic diagram of a data pasting process provided by an embodiment of the present application. Figure 1 , the user can perform a paste operation in the target edit box through the input module configured by the terminal to input the data to be pasted into the target edit box. At this point, the process begins. The terminal can trigger the paste through the editor corresponding to the target edit box in response to the paste operation performed by the user to obtain the data type of the data to be pasted. Then, the terminal can match the data type of the data to be pasted with the target data type supported by the target edit box to confirm whether the data type of the data to be pasted matches the data type supported by the target edit box. If the data type of the data to be pasted matches the data type supported by the target edit box, the terminal can paste the data to be pasted into the target edit box. The process ends here.

[0098] If the data type of the data to be pasted fails to match the data type supported by the target edit box, the terminal performs a type conversion on the data to be pasted. In this case, the data type of the data to be pasted can be considered the original type, and the target data type supported by the target edit box can be considered the target type. If there are rules associated with the original type and the target type, the terminal can convert the data type of the data to be pasted to the target data type. After the conversion is successful, the terminal can paste the data to be pasted into the target edit box. This completes the process. For example, if the original type is text and the target type is image, the original type and target type can have associated rule 3. Alternatively, if the original type is text and the target type is audio, the original type and target type can have associated rule 4. Alternatively, if the original type is image and the target type is text, the original type and target type can have associated rule 1. Alternatively, if the original type is audio and the target type is text, the original type and target type can have associated rule 2.

[0099] If there is no rule that associates the source and target types, the terminal cannot convert the data type of the pasted data to the target data type. This ends the process.

[0100] In an embodiment of the present application, the terminal can obtain the data type of the data to be pasted and the target data type supported by the target edit box in response to the paste operation performed by the user in the target edit box. Since the terminal is pre-configured with a preset conversion rule set, and the conversion rule set includes multiple conversion rules and multiple data type subsets corresponding to the multiple conversion rules. Therefore, when the data type of the data to be pasted and the target data type fail to match, the terminal can determine whether there is a target conversion rule in the preset conversion rule set for converting the data type of the data to be pasted to the target data type. Furthermore, when the data type of the data to be pasted and the target data type fail to match, and there is a target conversion rule in the preset conversion rule set, the terminal can perform data conversion on the data to be pasted based on the target conversion rule to obtain the converted data to be pasted, and display the converted data to be pasted in the target edit box.

[0101] In this way, the application can convert data types during the pasting process, avoiding the problem of being unable to paste due to type mismatch. In addition, the terminal can automatically convert data types, avoiding the high cost and complicated process of users needing to use third-party tools.

[0102] Compared to the conventional technology that relies on manual data type conversion, the terminal in this application can automatically implement the conversion process for data types that the edit box does not support, which can avoid the problem of complex process and low efficiency. Therefore, this application can solve the technical problem of low efficiency when processing data types that the edit box does not support in the conventional technology.

[0103] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0104] In the embodiments of the present application, the terminal can be divided into functional modules according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or software functional modules. Optionally, the division of modules in the embodiments of the present application is schematic and is only a logical functional division. In actual implementation, other division methods may be used.

[0105] like Figure 7 The figure is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. The data processing device can be used to perform the following Figure 3-Figure 5 The data processing method shown. The data processing device includes: an acquisition unit 701, a processing unit 702 and a display unit 703;

[0106] The acquisition unit 701 is used to obtain the data type of the data to be pasted and the target data type supported by the target edit box in response to the paste operation performed by the user in the target edit box; for example, Figure 3 , the acquisition unit 701 can be used to execute S301.

[0107] The processing unit 702 is configured to, in response to a failure in matching the data type of the to-be-pasted data with the target data type and the presence of a target conversion rule in the preset conversion rule set, convert the to-be-pasted data based on the target conversion rule to obtain converted to-be-pasted data; the target conversion rule is configured to convert the data type of the to-be-pasted data into the target data type; the preset conversion rule set includes a plurality of conversion rules and a plurality of data type subsets corresponding to the plurality of conversion rules; the data type subset includes a plurality of data types matching the conversion rules; for example, in combination Figure 3 , the processing unit 702 can be used to execute S302.

[0108] The display unit 703 is used to display the converted data to be pasted in the target edit box. Figure 3 , the display unit 703 can be used to execute S303.

[0109] Optionally, the processing unit 702 is further configured to perform identification processing on the data to be pasted to obtain feature information of the data to be pasted; for example, Figure 4 , the processing unit 702 can be used to execute S401.

[0110] The display unit 703 is used to display the characteristic information of the data to be pasted in the target edit box. Figure 4 , the display unit 703 can be used to execute S402.

[0111] Optionally, the processing unit 702 is specifically configured to:

[0112] Sending a recognition request message to the server for recognition processing of the pasted data; for example, combining Figure 5 , the processing unit 702 can be used to execute S501.

[0113] Receive the identification response message sent by the server that carries the feature information. For example, Figure 5 , the processing unit 702 can be used to execute S502.

[0114] Optionally, the display unit 703 is further configured to display the data to be pasted in the target edit box in response to a successful match between the data type of the data to be pasted and the target data type. For example, the display unit 703 may be configured to execute S601.

[0115] Those skilled in the art will appreciate that, in one or more of the examples above, the functions described herein can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer-readable storage media and communication media, wherein communication media include any medium that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0116] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0117] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed in multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0118] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A data processing method, characterized in that: include: In response to a paste operation performed by a user in a target edit box, obtaining a data type of the to-be-pasted data and a target data type supported by the target edit box; In response to a failure in matching the data type of the to-be-pasted data with the target data type and a target conversion rule existing in a preset conversion rule set, performing conversion processing on the to-be-pasted data based on the target conversion rule to obtain converted to-be-pasted data; the target conversion rule is used to convert the data type of the to-be-pasted data into the target data type; the preset conversion rule set includes a plurality of conversion rules and a plurality of data type subsets corresponding one-to-one to the plurality of conversion rules; the data type subsets include a plurality of data types matching the conversion rules; Displaying the converted data to be pasted in the target edit box; In the case where the target data type is a text type and the data type of the data to be pasted is an image type, if the converted data to be pasted does not include text content, the data to be pasted is identified and processed to obtain characteristic information of the data to be pasted; and the characteristic information of the data to be pasted is displayed in the target edit box.

2. The data processing method according to claim 1, wherein: The identifying and processing the data to be pasted to obtain characteristic information of the data to be pasted includes: Sending an identification request message to the server for identifying the data to be pasted; Receive an identification response message sent by the server and carrying the feature information.

3. The data processing method according to claim 1, wherein: Also includes: In response to a successful match between the data type of the to-be-pasted data and the target data type, the to-be-pasted data is displayed in the target edit box.

4. A data processing device, characterized in that: include: an acquisition unit, a processing unit, and a display unit; The acquiring unit is configured to acquire the data type of the to-be-pasted data and the target data type supported by the target edit box in response to a paste operation performed by the user in the target edit box; The processing unit is configured to, in response to a failure in matching the data type of the data to be pasted with the target data type and a target conversion rule existing in a preset conversion rule set, convert the data to be pasted based on the target conversion rule to obtain converted data to be pasted; the target conversion rule is configured to convert the data type of the data to be pasted into the target data type; the preset conversion rule set includes a plurality of conversion rules and a plurality of data type subsets corresponding one-to-one to the plurality of conversion rules; the data type subset includes a plurality of data types matching the conversion rules; The display unit is used to display the converted data to be pasted in the target editing box; In the case where the target data type is a text type and the data type of the data to be pasted is an image type, if the data to be pasted does not include text content after the conversion, the processing unit is further used to identify the data to be pasted to obtain characteristic information of the data to be pasted; the display unit is further used to display the characteristic information of the data to be pasted in the target edit box.

5. The data processing device according to claim 4, characterized in that The processing unit is specifically configured to: Sending an identification request message to the server for identifying the data to be pasted; Receive an identification response message sent by the server and carrying the feature information.

6. The data processing device according to claim 4, characterized in that The display unit is further configured to display the data to be pasted in the target edit box in response to a successful match between the data type of the data to be pasted and the target data type.

7. A data processing device, characterized in that: It includes a memory and a processor; the memory is used to store computer-executable instructions, and the processor is connected to the memory via a bus; when the data processing device is running, the processor executes the computer-executable instructions stored in the memory, so that the data processing device performs the data processing method according to any one of claims 1 to 3.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium includes computer-executable instructions. When the computer-executable instructions are executed on a computer, the computer is enabled to execute the data processing method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Information pasting method and device

    CN107463539A