CN114201258B - Copy and paste method, apparatus, computer device and storage medium - Google Patents

Copy and paste method, apparatus, computer device and storage medium Download PDF

Info

Publication number
CN114201258B
CN114201258B CN202111507005.XA CN202111507005A CN114201258B CN 114201258 B CN114201258 B CN 114201258B CN 202111507005 A CN202111507005 A CN 202111507005A CN 114201258 B CN114201258 B CN 114201258B
Authority
CN
China
Prior art keywords
sub
target
paste
object data
pasting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111507005.XA
Other languages
Chinese (zh)
Other versions
CN114201258A (en
Inventor
李柱良
刘洁
梁艳群
曾小丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN202111507005.XA priority Critical patent/CN114201258B/en
Publication of CN114201258A publication Critical patent/CN114201258A/en
Application granted granted Critical
Publication of CN114201258B publication Critical patent/CN114201258B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The application relates to a copy-paste method, a copy-paste device, a computer device and a storage medium. The method comprises the following steps: responding to a replication instruction received by an object to be processed, and if the object to be processed is a complex object, acquiring key information of a plurality of replication controls in the object to be processed; encoding the extracted multiple key information into a target character string in a preset format, and writing the target character string into a clipboard; responding to pasting instructions received by a plurality of pasting controls, extracting the target character strings from the clipboard, and determining a plurality of sub-object data based on the target character strings; and pasting the determined multiple sub-object data into the multiple pasting controls to obtain the target object. By adopting the method, the complex objects with different control formats and different display items can be copied and pasted, and the personnel is not required to copy and paste the content displayed in each control one by one or edit manually, so that the convenience of the software business operation is effectively improved.

Description

Copy and paste method, apparatus, computer device and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a copy and paste method, apparatus, computer device, and storage medium.
Background
Copy-paste is one of the most common operations of many software, can greatly reduce the workload of user editing, and improve the working efficiency. In some management software, the content that the user needs to copy and paste is not a simple text, but rather is a copy and paste of a complex object, such as a certificate in an enterprise management system, has a complex structure and has various different information, but the copy and paste of the complex object cannot be supported at present, the user needs to manually copy and paste each information in the complex object, the operation is complex, and the business operation requirement of the user cannot be met.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, and a storage medium capable of implementing copy-and-paste of complex objects with different control formats and different display items.
In a first aspect, the present application provides a method of copy-and-paste. The method comprises the following steps:
responding to a replication instruction received by an object to be processed, and if the object to be processed is a complex object, acquiring key information of a plurality of replication controls in the object to be processed;
encoding the extracted multiple key information into a target character string in a preset format, and writing the target character string into a clipboard;
responding to pasting instructions received by a plurality of pasting controls, extracting the target character strings from the clipboard, and determining a plurality of sub-object data based on the target character strings;
and pasting the determined multiple sub-object data into the multiple pasting controls to obtain the target object.
In one embodiment, the complex object includes at least two sub-objects, and the at least two sub-objects are displayed by different controls.
In one embodiment, the obtaining key information of the plurality of copy controls in the object to be processed includes:
extracting sub-object data of each copy control in the object to be processed, wherein the sub-object data comprises: a plurality of attribute information;
And for any copy control, marking attribute information corresponding to the key identifier in the sub-object data of the copy control as key information of the any copy control.
In one embodiment, the determining a plurality of sub-object data based on the target string includes:
Converting the target character string into a plurality of key information;
sub-object data corresponding to each piece of key information is obtained in a database.
In one embodiment, pasting the determined plurality of sub-object data into the plurality of pasting controls to obtain the target object includes:
for any pasting control, selecting target sub-object data corresponding to any pasting control from the plurality of sub-object data;
Acquiring a plurality of display item identifiers of any one of the paste controls, and selecting a plurality of attribute information corresponding to the display item identifiers from target sub-object data of any one of the paste controls;
and writing a plurality of attribute information corresponding to any paste control into any paste control to obtain a target object.
In one embodiment, any child object data includes: the system comprises a plurality of attribute information and attribute identifiers of each attribute information, wherein any pasting control is configured with a target identifier; the selecting the target sub-object data corresponding to any paste control from the plurality of sub-object data includes:
and selecting target sub-object data corresponding to any paste control from the plurality of sub-objects based on the target identification of any paste control, wherein the target sub-object data comprises attribute information with the attribute identification consistent with the target identification of any paste control.
In a second aspect, the application also provides a copy-paste device. The device comprises:
The first copying module is used for responding to a copying instruction received by an object to be processed, and acquiring key information of a plurality of controls in the object to be processed if the object to be processed is a complex object;
The second copying module is used for encoding the extracted multiple key information into a target character string in a preset format and writing the target character string into the clipboard;
The first pasting module is used for responding to pasting instructions received by a plurality of pasting controls, extracting the target character strings from the clipboard and determining a plurality of sub-object data based on the target character strings;
And the second pasting module is used for pasting the obtained plurality of sub-object data into the plurality of pasting controls to obtain the target object.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
responding to a replication instruction received by an object to be processed, and if the object to be processed is a complex object, acquiring key information of a plurality of replication controls in the object to be processed;
encoding the extracted multiple key information into a target character string in a preset format, and writing the target character string into a clipboard;
responding to pasting instructions received by a plurality of pasting controls, extracting the target character strings from the clipboard, and determining a plurality of sub-object data based on the target character strings;
and pasting the determined multiple sub-object data into the multiple pasting controls to obtain the target object.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
responding to a replication instruction received by an object to be processed, and if the object to be processed is a complex object, acquiring key information of a plurality of replication controls in the object to be processed;
encoding the extracted multiple key information into a target character string in a preset format, and writing the target character string into a clipboard;
responding to pasting instructions received by a plurality of pasting controls, extracting the target character strings from the clipboard, and determining a plurality of sub-object data based on the target character strings;
and pasting the determined multiple sub-object data into the multiple pasting controls to obtain the target object.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
responding to a replication instruction received by an object to be processed, and if the object to be processed is a complex object, acquiring key information of a plurality of replication controls in the object to be processed;
encoding the extracted multiple key information into a target character string in a preset format, and writing the target character string into a clipboard;
responding to pasting instructions received by a plurality of pasting controls, extracting the target character strings from the clipboard, and determining a plurality of sub-object data based on the target character strings;
and pasting the determined multiple sub-object data into the multiple pasting controls to obtain the target object.
The copy-paste method, the copy-paste device, the computer equipment, the storage medium and the computer program product extract a plurality of key information of a plurality of copy controls during copy, encode the plurality of key information into target character strings in a preset format, write the target character strings into the clipboard, only write the target character strings corresponding to the plurality of key information into the clipboard, reduce the data volume and occupy less system resources. When pasting, determining a plurality of sub-object data according to the target character strings, namely, when pasting, obtaining the sub-object data of a plurality of copy controls through the target character strings corresponding to a plurality of key information, namely, obtaining all data of an object to be processed, obtaining a target object according to the plurality of sub-object data and a plurality of pasting controls, wherein the target object is according to all data of the object to be processed and the plurality of pasting controls, so that the obtained target object can meet the display requirements of the plurality of pasting controls, and when the display items and the control sequences of the plurality of copy controls and the plurality of pasting controls are different, copying and pasting can be performed; the copy-paste method can be applied to copy-paste scenes of complex objects with different formats and different display items, and does not need staff to perform independent copy-paste processing or manual editing on the content displayed in each control one by one, so that convenience of software business operation is effectively improved.
Drawings
FIG. 1 is a flow diagram of a method of copy-and-paste in one embodiment;
FIG. 2 is a signaling diagram of a replication process in one embodiment;
FIG. 3 is a flow diagram of a replication process in one embodiment;
FIG. 4 is a signaling diagram of a paste process in one embodiment;
FIG. 5 is a flow diagram of a paste process in one embodiment;
FIG. 6 is a block diagram of an apparatus for copy-and-paste in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In one embodiment, as shown in fig. 1, a copy and paste method is provided, where this embodiment is applied to a terminal to illustrate the method, it is understood that the method may also be applied to a server, and may also be applied to a system including a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the steps of:
S101, responding to a replication instruction received by an object to be processed, and if the object to be processed is a complex object, acquiring key information of a plurality of replication controls in the object to be processed.
The object to be processed is an object which receives a copy instruction after being selected, and the object to be processed can be a complex object or a non-complex object. The copying instruction can be triggered by a preset copying shortcut key after the object to be processed is selected, or can be triggered by a menu bar after the object to be processed is selected. The complex object at least comprises two sub-objects, the at least two sub-objects are displayed through different controls, and the complex object can be: vouchers, orders, payslips, and the like. The plurality of copy controls are used for writing and displaying data of complex objects, each copy control has corresponding key information, and the key information of the copy control is a unique identifier of the data in the copy control. Controls are components on a Graphical User Interface (GUI) for entering or presenting data, such as text boxes, forms, and the like.
Specifically, the object to be processed receives the replication instruction, judges whether the object to be processed is a complex object, acquires sub-object data of each replication control in the object to be processed if the object to be processed is the complex object, and determines key information of each replication control.
S102, encoding the extracted plurality of key information into a target character string in a preset format, and writing the target character string into a clipboard.
Wherein, the preset format may be: json format, xml format, or other format. The clipboard is a clipboard of an operating system.
Specifically, map and List class data are constructed according to the extracted multiple pieces of key information, the constructed Map and List class data are converted into target character strings in a preset format, and the extracted multiple pieces of key information are encoded into the target character strings in the preset format. The target string may be converted into json format by Gson of Google corporation, and may be converted into xml format by dom4 j. The target string is written to the clipboard.
And S103, responding to pasting instructions received by a plurality of pasting controls, extracting the target character strings from the clipboard, and determining a plurality of sub-object data based on the target character strings.
The paste instruction can be triggered by presetting a paste shortcut key after a plurality of controls are selected, or can be triggered by a menu bar after a plurality of controls are selected; the plurality of paste controls are controls existing in the page, and when the plurality of controls in a certain page receive the paste instruction, the plurality of controls receiving the paste instruction are the plurality of paste controls. The paste controls are used for writing and displaying the object to be processed. The plurality of sub-object data is consistent with the sub-object data of the plurality of copy controls at the time of copying.
Specifically, after the plurality of paste controls are selected, a paste instruction is received, a target character string is obtained from a clipboard of the system, the target character string is converted into a plurality of key information, and then a plurality of sub-object data are determined according to the plurality of key information.
And S104, pasting the determined multiple sub-object data into the multiple pasting controls to obtain the target object.
The complete data corresponding to the target object is consistent with the complete data corresponding to the object to be processed, and the display item of the target object may be different from the display item of the object to be processed.
Specifically, the plurality of paste controls have set display items, and for the corresponding paste controls and sub-object data, a plurality of display data corresponding to the display items of the paste controls are determined in the sub-object data, and the plurality of display data are written into the paste controls.
In the copy-paste method, when copying, a plurality of key information of a plurality of copy controls are extracted, the plurality of key information is encoded into target character strings in a preset format and written into the clipboard, and only the target character strings corresponding to the plurality of key information are written into the clipboard, so that the data volume is reduced, and the occupied system resources are small. When pasting, sub-object data of a plurality of copy controls can be obtained through target character strings corresponding to a plurality of key information, namely all data of an object to be processed are obtained, then a target object is obtained according to the plurality of sub-object data and a plurality of pasting controls, and the target object is obtained according to all data of the object to be processed and the plurality of pasting controls, so that the obtained target object can meet the display requirements of the plurality of pasting controls, and when the display items and the control sequences of the plurality of copy controls and the plurality of pasting controls are different, copying and pasting can be performed; the copy-paste method can be applied to copy-paste scenes of complex objects with different formats and different display items, and does not need staff to perform independent copy-paste processing or manual editing on the content displayed in each control one by one, so that convenience of software business operation is effectively improved.
In one embodiment, when the copied object to be processed is a complex object, the content of a plurality of copy controls is copied, and when the plurality of copy controls are copied, the parent control of the plurality of copy controls is determined, the parent control is usually a container, and a copying method is not provided by default. The method of registering duplication for the parent control can duplicate multiple duplication controls simultaneously.
In S101, the obtaining key information of the plurality of copy controls in the object to be processed includes:
s111, extracting sub-object data of each copy control in the object to be processed.
Wherein the child object data includes: a plurality of attribute information. For example, the sub-object is a subject, the subject including a plurality of attribute information including: ID: xx x; encoding: * All of the following are defined as "x"; name: * *.
Specifically, extracting sub-object data of each copy control of the object to be processed from data of a page displaying the object to be processed.
And S112, for any copy control, identifying attribute information corresponding to the key identifier in the sub-object data of the copy control as key information of the any copy control.
The key information of the copy control is used for uniquely identifying the sub-object data in the copy control. For example, by encoding: * The child object data of the replication control may be determined as: subject(s).
Specifically, key information capable of uniquely identifying sub-object data is determined in a plurality of attribute information of the sub-object data in advance, and key identification is configured for the key information; after the sub-object data is acquired, key information of the sub-object data can be determined by identifying the key identifier.
For example, the sub-object is a subject, which includes a plurality of attribute information including: ID: xx x; encoding: * All of the following are defined as "x"; name: * Wherein, code: * Configuring key identity, then encoding: * As key information of subjects.
In this embodiment, in the data of the page displaying the object to be processed, extracting the sub-object data of each copy control of the object to be processed, sending a plurality of sub-object data to a data converter, acquiring key information of each sub-object through the data converter, if key information of any sub-object data identified as a key identifier is not acquired, indicating that the data of any sub-object is incomplete, and if there is missing attribute information, acquiring the missing attribute information from the database according to a preset data item of any sub-object data, and determining the key information of each sub-object, where the preset data item is used to reflect all attribute information of the sub-object data.
As shown in fig. 2, in the embodiment, when copying, the input module triggers copying of the object to be processed, and the input module can implement keyboard, mouse or touch input; the method comprises the steps that a replication acquisition class (ActionCopy) acquires a plurality of sub-object data of an object to be processed, the plurality of sub-object data are sent to a first object conversion class, the first conversion class is used for extracting key information of the plurality of sub-object data and converting the key information into a target character string in a preset format, specifically, supplementing and determining data lacking in the plurality of sub-data, extracting the key information of each sub-object, constructing Map and List class data according to the plurality of key information, and converting the Map and List class data into a target character string in the preset format; the first object conversion class may be JsonConverter, and a target character string in Json format may be obtained; the target string is sent ActionCopy, actionCopy to write the target string to the clipboard.
Compared with the prior art, the embodiment rewrites the copy mode of the control, as shown in fig. 3, triggers the object to be processed to receive the copy instruction through the copy shortcut key or the menu bar, acquires the sub-object data of a plurality of copy controls in the object to be processed in the data of the page displaying the object to be processed if the object to be processed is a complex object, extracts the key information of each sub-object data, encodes the plurality of key information into a target character string in json format (or xml format), and writes the target character string into the clipboard of the system. And the plurality of key information is encoded into a target character string in a preset format, and written into a clipboard of the system, the clipboard does not need to be written with complete data of an object to be processed, so that the data volume is reduced, and the occupied system resource is small.
In one embodiment, in S101, the object to be processed may receive the copy instruction in a first process, and in S103, the paste controls may receive the paste instruction in a second process, where the second process may be the same as or different from the first process. For example, in a first enterprise management software, the object to be processed accepts copy instructions, and in a second enterprise management software, the paste controls accept paste instructions.
In one embodiment, when a plurality of paste controls are selected and triggered to receive a paste instruction, a parent control of the plurality of paste controls is determined, the parent control is typically a container, and no copy and paste method is provided by default. And registering a pasting method for the parent control, namely, pasting a plurality of pasting controls simultaneously.
In one embodiment, in S103, the determining a plurality of sub-object data based on the target character string includes:
S311, converting the target character string into a plurality of key information.
Specifically, the process of converting the target character string into a plurality of key information is an inverse process of encoding the plurality of key information into the target character string. And converting the target character string in a preset format into Map and List data, and converting the Map and List data obtained through conversion into a plurality of key information.
S311, sub-object data corresponding to each piece of key information is acquired from the database.
Specifically, since the key information can uniquely represent its corresponding sub-object data, the corresponding sub-object data can be obtained from the database through the key information. And obtaining the number of sub-objects corresponding to each piece of key information, and obtaining the complete data of the object to be processed.
In this embodiment, the pasting mode of the control is rewritten, after the target character string is taken out from the clipboard, the target character string is converted into a plurality of key information, and then a plurality of sub-object data are obtained in the database according to the plurality of key information, so as to restore the complete data of the object to be processed, so that pasting of different formats and different display items can be realized according to the complete data of the object to be processed.
In one embodiment, S104 includes:
S411, for any paste control, selecting target sub-object data corresponding to any paste control from the plurality of sub-object data.
Specifically, each paste control is preset with a displayed sub-object, and target sub-object data displayed by each paste control is obtained from the plurality of sub-object data.
In one implementation, each paste control is configured with a target identifier, any child object data includes a plurality of attribute information, each attribute information configured with an attribute identifier. The key information in any sub-object is configured with both a key identifier and an attribute identifier.
The selecting the target sub-object data corresponding to any paste control from the plurality of sub-object data includes: and selecting target sub-object data corresponding to any paste control from the plurality of sub-objects based on the target identification of any paste control, wherein the target sub-object data comprises attribute information with the attribute identification consistent with the target identification of any paste control.
For example, the attribute identifications of the plurality of attribute information in the child object data of the subject are respectively: subject name, subject code, subject ID; the attribute identifiers of the plurality of attribute information in the sub-object data of the borrower are respectively as follows: name, gender, identification number, and occupation; if the target mark of the paste control is a subject code, determining that the target sub-object data corresponding to the paste control is: child object data of the order of the family.
S412, a plurality of display item identifiers of any one of the paste controls are obtained, and a plurality of attribute information corresponding to the plurality of display item identifiers is selected from target sub-object data of any one of the paste controls.
Specifically, each paste control is preset with a plurality of display item identifiers, and the display item identifiers of the paste control are used for reflecting the content displayed by the paste control. The paste control may display one or more items of attribute information. The same sub-object data, the attribute information displayed in the object to be processed, and the attribute information displayed in the target object may be different.
For example, the sub-object data corresponding to the paste control, and several display items of the paste control are identified as follows: and selecting the subject name and the program ID as attribute information displayed by the paste control.
S413, writing the attribute information corresponding to any one paste control into any one paste control to obtain a target object.
Specifically, after determining a plurality of attribute information corresponding to each paste object, writing a plurality of attribute information corresponding to any paste control into any paste control to obtain a target object.
In one implementation manner, if any paste control does not acquire the target sub-object data, attribute information is not written in any paste control, and the content of any paste control can be manually edited by a worker. If any sub-object data is not selected as the target sub-object data, the target object is not used for the any sub-object data, and after the target object is obtained, the any sub-object data can be deleted.
As shown in fig. 4, in the embodiment, when pasting, the input module triggers the plurality of pasting controls to receive a pasting instruction, and the input module can implement keyboard, mouse or touch input; the paste acquisition class (ActionPaste) acquires a target character string from the clipboard, the target character is converted and sent to the second object conversion class (ObjectConverter), the second object conversion class converts the target character string into Map and List class data to obtain a plurality of key information, a plurality of sub-object data are acquired according to the plurality of key information, and the complete data of the object to be processed are restored; and sending the plurality of sub-object data to ActionPaste, actionPaste to obtain the target object according to the plurality of sub-object data and the plurality of paste controls.
Compared with the prior art, the embodiment rewrites the pasting mode of the control, as shown in fig. 5, triggers a plurality of pasting controls to receive a pasting event through a pasting shortcut key or a menu bar, obtains a target character string from a clipboard of the system, converts the target character string into a plurality of key information, obtains a plurality of sub-object data through the plurality of key information, and pastes the plurality of sub-object data to the plurality of pasting controls to obtain a target object.
In this embodiment, when copying, multiple pieces of key information of multiple copy controls are extracted, the multiple pieces of key information are encoded into target character strings in a preset format and written into the clipboard, and only the target character strings corresponding to the multiple pieces of key information are written into the clipboard, so that the data volume is reduced, and the occupied system resources are small. When the object is pasted, sub-object data of a plurality of copy controls can be obtained through target character strings corresponding to a plurality of key information, namely all data of an object to be processed are obtained; determining attribute information to be displayed in the sub-object data according to the display identification of the paste control, writing the attribute information to be displayed of the paste control into the paste control to obtain a target object, namely, the obtained target object can meet the display requirement of the paste control, and copying and pasting can be performed when the display items and the control sequences of a plurality of copy controls and a plurality of paste controls are different; the copy-paste method can be applied to copy-paste scenes of complex objects with different formats and different display items, and does not need staff to perform independent copy-paste processing or manual editing on the content displayed in each control one by one, so that convenience of software business operation is effectively improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a copy-paste device for realizing the above related copy-paste method. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiment of the apparatus for copy-and-paste provided below may be referred to the limitation of the method for copy-and-paste hereinabove, and will not be repeated here.
In one embodiment, as shown in fig. 6, there is provided a copy-and-paste apparatus comprising: the device comprises a first copying module, a second copying module, a first pasting module and a second pasting module, wherein:
The first copying module is used for responding to a copying instruction received by an object to be processed, and acquiring key information of a plurality of controls in the object to be processed if the object to be processed is a complex object;
The second copying module is used for encoding the extracted multiple key information into a target character string in a preset format and writing the target character string into the clipboard;
The first pasting module is used for responding to pasting instructions received by a plurality of pasting controls, extracting the target character strings from the clipboard and determining a plurality of sub-object data based on the target character strings;
And the second pasting module is used for pasting the obtained plurality of sub-object data into the plurality of pasting controls to obtain the target object.
In one embodiment, the complex object includes at least two sub-objects, and the at least two sub-objects are displayed by different controls.
In one embodiment, the first replication module includes: a first sub-object data acquisition unit and a first key information determination unit, wherein:
the first sub-object data obtaining unit is configured to extract sub-object data of each copy control in the object to be processed, where the sub-object data includes: a plurality of attribute information;
The first key information determining unit is configured to identify, for any copy control, attribute information corresponding to a key identifier in child object data of the copy control as key information of the any copy control.
The first pasting module comprises: a second key information determination unit and a second sub-object data unit, wherein:
the second key information determining unit is used for converting the target character string into a plurality of key information;
And the second sub-object data unit is used for acquiring sub-object data corresponding to each piece of key information in the database.
The second paste module includes: a first pasting unit, a second pasting unit and a third pasting unit, wherein:
The first pasting unit is used for selecting target sub-object data corresponding to any pasting control from the plurality of sub-object data for any pasting control;
The second pasting unit is used for acquiring a plurality of display item identifiers of any pasting control, and selecting a plurality of attribute information corresponding to the display item identifiers from target sub-object data of any pasting control;
And the third pasting unit is used for writing a plurality of attribute information corresponding to any pasting control into any pasting control to obtain a target object.
In one embodiment, the arbitrary sub-object data includes: the system comprises a plurality of attribute information and attribute identifiers of each attribute information, wherein any pasting control is configured with a target identifier; the first pasting unit is specifically configured to: and selecting target sub-object data corresponding to any paste control from the plurality of sub-objects based on the target identification of any paste control, wherein the target sub-object data comprises attribute information with the attribute identification consistent with the target identification of any paste control.
The various modules in the copy-and-paste apparatus described above may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of copy and paste. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 7 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
responding to a replication instruction received by an object to be processed, and if the object to be processed is a complex object, acquiring key information of a plurality of replication controls in the object to be processed;
encoding the extracted multiple key information into a target character string in a preset format, and writing the target character string into a clipboard;
responding to pasting instructions received by a plurality of pasting controls, extracting the target character strings from the clipboard, and determining a plurality of sub-object data based on the target character strings;
and pasting the determined multiple sub-object data into the multiple pasting controls to obtain the target object.
In one embodiment, the complex object includes at least two sub-objects, and the at least two sub-objects are displayed by different controls.
In one embodiment, the processor when executing the computer program further performs the steps of: the obtaining key information of the plurality of copy controls in the object to be processed includes:
extracting sub-object data of each copy control in the object to be processed, wherein the sub-object data comprises: a plurality of attribute information;
And for any copy control, marking attribute information corresponding to the key identifier in the sub-object data of the copy control as key information of the any copy control.
In one embodiment, the processor when executing the computer program further performs the steps of: the determining a plurality of sub-object data based on the target string includes:
Converting the target character string into a plurality of key information;
sub-object data corresponding to each piece of key information is obtained in a database.
In one embodiment, the processor when executing the computer program further performs the steps of: and pasting the determined multiple sub-object data into the multiple pasting controls to obtain a target object, wherein the method comprises the following steps:
for any pasting control, selecting target sub-object data corresponding to any pasting control from the plurality of sub-object data;
Acquiring a plurality of display item identifiers of any one of the paste controls, and selecting a plurality of attribute information corresponding to the display item identifiers from target sub-object data of any one of the paste controls;
and writing a plurality of attribute information corresponding to any paste control into any paste control to obtain a target object.
In one embodiment, the processor when executing the computer program further performs the steps of: any child object data includes: the system comprises a plurality of attribute information and attribute identifiers of each attribute information, wherein any pasting control is configured with a target identifier; the selecting the target sub-object data corresponding to any paste control from the plurality of sub-object data includes:
and selecting target sub-object data corresponding to any paste control from the plurality of sub-objects based on the target identification of any paste control, wherein the target sub-object data comprises attribute information with the attribute identification consistent with the target identification of any paste control.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
responding to a replication instruction received by an object to be processed, and if the object to be processed is a complex object, acquiring key information of a plurality of replication controls in the object to be processed;
encoding the extracted multiple key information into a target character string in a preset format, and writing the target character string into a clipboard;
responding to pasting instructions received by a plurality of pasting controls, extracting the target character strings from the clipboard, and determining a plurality of sub-object data based on the target character strings;
and pasting the determined multiple sub-object data into the multiple pasting controls to obtain the target object.
In one embodiment, the complex object includes at least two sub-objects, and the at least two sub-objects are displayed by different controls.
In one embodiment, the computer program when executed by the processor further performs the steps of: the obtaining key information of the plurality of copy controls in the object to be processed includes:
extracting sub-object data of each copy control in the object to be processed, wherein the sub-object data comprises: a plurality of attribute information;
And for any copy control, marking attribute information corresponding to the key identifier in the sub-object data of the copy control as key information of the any copy control.
In one embodiment, the computer program when executed by the processor further performs the steps of: the determining a plurality of sub-object data based on the target string includes:
Converting the target character string into a plurality of key information;
sub-object data corresponding to each piece of key information is obtained in a database.
In one embodiment, the computer program when executed by the processor further performs the steps of: and pasting the determined multiple sub-object data into the multiple pasting controls to obtain a target object, wherein the method comprises the following steps:
for any pasting control, selecting target sub-object data corresponding to any pasting control from the plurality of sub-object data;
Acquiring a plurality of display item identifiers of any one of the paste controls, and selecting a plurality of attribute information corresponding to the display item identifiers from target sub-object data of any one of the paste controls;
and writing a plurality of attribute information corresponding to any paste control into any paste control to obtain a target object.
In one embodiment, the computer program when executed by the processor further performs the steps of: any child object data includes: the system comprises a plurality of attribute information and attribute identifiers of each attribute information, wherein any pasting control is configured with a target identifier; the selecting the target sub-object data corresponding to any paste control from the plurality of sub-object data includes:
and selecting target sub-object data corresponding to any paste control from the plurality of sub-objects based on the target identification of any paste control, wherein the target sub-object data comprises attribute information with the attribute identification consistent with the target identification of any paste control.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
responding to a replication instruction received by an object to be processed, and if the object to be processed is a complex object, acquiring key information of a plurality of replication controls in the object to be processed;
encoding the extracted multiple key information into a target character string in a preset format, and writing the target character string into a clipboard;
responding to pasting instructions received by a plurality of pasting controls, extracting the target character strings from the clipboard, and determining a plurality of sub-object data based on the target character strings;
and pasting the determined multiple sub-object data into the multiple pasting controls to obtain the target object.
In one embodiment, the complex object includes at least two sub-objects, and the at least two sub-objects are displayed by different controls.
In one embodiment, the computer program when executed by the processor further performs the steps of: the obtaining key information of the plurality of copy controls in the object to be processed includes:
extracting sub-object data of each copy control in the object to be processed, wherein the sub-object data comprises: a plurality of attribute information;
And for any copy control, marking attribute information corresponding to the key identifier in the sub-object data of the copy control as key information of the any copy control.
In one embodiment, the computer program when executed by the processor further performs the steps of: the determining a plurality of sub-object data based on the target string includes:
Converting the target character string into a plurality of key information;
sub-object data corresponding to each piece of key information is obtained in a database.
In one embodiment, the computer program when executed by the processor further performs the steps of: and pasting the determined multiple sub-object data into the multiple pasting controls to obtain a target object, wherein the method comprises the following steps:
for any pasting control, selecting target sub-object data corresponding to any pasting control from the plurality of sub-object data;
Acquiring a plurality of display item identifiers of any one of the paste controls, and selecting a plurality of attribute information corresponding to the display item identifiers from target sub-object data of any one of the paste controls;
and writing a plurality of attribute information corresponding to any paste control into any paste control to obtain a target object.
In one embodiment, the computer program when executed by the processor further performs the steps of: any child object data includes: the system comprises a plurality of attribute information and attribute identifiers of each attribute information, wherein any pasting control is configured with a target identifier; the selecting the target sub-object data corresponding to any paste control from the plurality of sub-object data includes:
and selecting target sub-object data corresponding to any paste control from the plurality of sub-objects based on the target identification of any paste control, wherein the target sub-object data comprises attribute information with the attribute identification consistent with the target identification of any paste control.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method of copy-and-paste, the method comprising:
responding to a replication instruction received by an object to be processed, and if the object to be processed is a complex object, acquiring key information of a plurality of replication controls in the object to be processed;
encoding the extracted multiple key information into a target character string in a preset format, and writing the target character string into a clipboard;
responding to pasting instructions received by a plurality of pasting controls, extracting the target character strings from the clipboard, and determining a plurality of sub-object data based on the target character strings so as to restore the complete data of the object to be processed;
for any pasting control, selecting target sub-object data corresponding to any pasting control from the plurality of sub-object data;
Acquiring a plurality of display item identifiers of any one of the paste controls, and selecting a plurality of attribute information corresponding to the display item identifiers from target sub-object data of any one of the paste controls;
writing a plurality of attribute information corresponding to any paste control into any paste control to obtain a target object; the display item of the target object is different from the display item of the object to be processed.
2. The method of claim 1, wherein the complex object comprises at least two sub-objects, and the at least two sub-objects are displayed by different controls.
3. The method of claim 1, wherein the obtaining key information of a plurality of replication controls in the object to be processed comprises:
extracting sub-object data of each copy control in the object to be processed, wherein the sub-object data comprises: a plurality of attribute information;
And for any copy control, marking attribute information corresponding to the key identifier in the sub-object data of the copy control as key information of the any copy control.
4. A method according to claim 3, characterized in that the method further comprises:
if the identification of any sub-object data is not acquired as the attribute information corresponding to the key identification, acquiring the attribute information of any sub-object from a database according to the preset data item of any sub-object data.
5. The method of claim 1, wherein the determining a plurality of sub-object data based on the target string comprises:
Converting the target character string into a plurality of key information;
sub-object data corresponding to each piece of key information is obtained in a database.
6. The method of claim 1, wherein any child object data comprises: the system comprises a plurality of attribute information and attribute identifiers of each attribute information, wherein any pasting control is configured with a target identifier; the selecting the target sub-object data corresponding to any paste control from the plurality of sub-object data includes:
and selecting target sub-object data corresponding to any paste control from the plurality of sub-objects based on the target identification of any paste control, wherein the target sub-object data comprises attribute information with the attribute identification consistent with the target identification of any paste control.
7. A copy-and-paste apparatus, the apparatus comprising:
The first copying module is used for responding to a copying instruction received by an object to be processed, and acquiring key information of a plurality of controls in the object to be processed if the object to be processed is a complex object;
The second copying module is used for encoding the extracted multiple key information into a target character string in a preset format and writing the target character string into the clipboard;
The first pasting module is used for responding to pasting instructions received by a plurality of pasting controls, extracting the target character strings from the clipboard, and determining a plurality of sub-object data based on the target character strings so as to restore the complete data of the object to be processed;
The second pasting module is used for selecting target sub-object data corresponding to any pasting control from the plurality of sub-object data for any pasting control; acquiring a plurality of display item identifiers of any one of the paste controls, and selecting a plurality of attribute information corresponding to the display item identifiers from target sub-object data of any one of the paste controls; and writing a plurality of attribute information corresponding to any paste control into any paste control to obtain a target object, wherein the display item of the target object is different from the display item of the object to be processed.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202111507005.XA 2021-12-10 2021-12-10 Copy and paste method, apparatus, computer device and storage medium Active CN114201258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111507005.XA CN114201258B (en) 2021-12-10 2021-12-10 Copy and paste method, apparatus, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111507005.XA CN114201258B (en) 2021-12-10 2021-12-10 Copy and paste method, apparatus, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN114201258A CN114201258A (en) 2022-03-18
CN114201258B true CN114201258B (en) 2024-06-07

Family

ID=80652242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111507005.XA Active CN114201258B (en) 2021-12-10 2021-12-10 Copy and paste method, apparatus, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN114201258B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007293801A (en) * 2006-03-28 2007-11-08 Casio Comput Co Ltd Table editing device and program
CN101183355A (en) * 2006-11-15 2008-05-21 富士通株式会社 Program, copy and paste processing method, apparatus, and storage medium
CN101997900A (en) * 2009-08-26 2011-03-30 中国移动通信集团公司 Cross-terminal copying and pasting system, device and method
CN104298558A (en) * 2014-09-23 2015-01-21 广州华多网络科技有限公司 Information processing method and device
CN105354097A (en) * 2015-11-02 2016-02-24 北京金山安全软件有限公司 Data operation method and device based on clipboard and electronic equipment
CN105808058A (en) * 2016-03-04 2016-07-27 陈包容 Intelligent display method and apparatus for pasting prompt
CN106126025A (en) * 2016-06-23 2016-11-16 北京小米移动软件有限公司 Replicate the exchange method and device pasted
CN106354570A (en) * 2016-08-26 2017-01-25 广东欧珀移动通信有限公司 Account information copying and pasting method and device
CN106407024A (en) * 2016-09-09 2017-02-15 深圳市金立通信设备有限公司 Method for copying and pasting information and terminal
CN106598754A (en) * 2016-11-21 2017-04-26 深圳市金立通信设备有限公司 Pasting method and terminal
US9965484B1 (en) * 2013-02-07 2018-05-08 Ca, Inc. Template-driven data extraction and insertion
CN110502173A (en) * 2019-08-19 2019-11-26 Oppo(重庆)智能科技有限公司 A kind of interface content processing method, device and computer readable storage medium
CN111581410A (en) * 2020-05-29 2020-08-25 上海依图网络科技有限公司 Image retrieval method, apparatus, medium, and system thereof
CN111796952A (en) * 2020-08-12 2020-10-20 Oppo(重庆)智能科技有限公司 Content operation method and device and computer readable storage medium
CN112632930A (en) * 2020-07-27 2021-04-09 腾讯科技(深圳)有限公司 Table data control method and device
CN113407168A (en) * 2021-06-07 2021-09-17 远光软件股份有限公司 Editing method and device of page elements, storage medium and terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339221A (en) * 2016-08-23 2017-01-18 Tcl移动通信科技(宁波)有限公司 Clipboard control method and system based on mobile terminal
US10949271B2 (en) * 2017-03-22 2021-03-16 International Business Machines Corporation Enhanced copy-and-paste

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007293801A (en) * 2006-03-28 2007-11-08 Casio Comput Co Ltd Table editing device and program
CN101183355A (en) * 2006-11-15 2008-05-21 富士通株式会社 Program, copy and paste processing method, apparatus, and storage medium
CN101997900A (en) * 2009-08-26 2011-03-30 中国移动通信集团公司 Cross-terminal copying and pasting system, device and method
US9965484B1 (en) * 2013-02-07 2018-05-08 Ca, Inc. Template-driven data extraction and insertion
CN104298558A (en) * 2014-09-23 2015-01-21 广州华多网络科技有限公司 Information processing method and device
WO2016045226A1 (en) * 2014-09-23 2016-03-31 广州华多网络科技有限公司 Information processing method and apparatus
CN105354097A (en) * 2015-11-02 2016-02-24 北京金山安全软件有限公司 Data operation method and device based on clipboard and electronic equipment
CN105808058A (en) * 2016-03-04 2016-07-27 陈包容 Intelligent display method and apparatus for pasting prompt
CN106126025A (en) * 2016-06-23 2016-11-16 北京小米移动软件有限公司 Replicate the exchange method and device pasted
CN106354570A (en) * 2016-08-26 2017-01-25 广东欧珀移动通信有限公司 Account information copying and pasting method and device
CN106407024A (en) * 2016-09-09 2017-02-15 深圳市金立通信设备有限公司 Method for copying and pasting information and terminal
CN106598754A (en) * 2016-11-21 2017-04-26 深圳市金立通信设备有限公司 Pasting method and terminal
CN110502173A (en) * 2019-08-19 2019-11-26 Oppo(重庆)智能科技有限公司 A kind of interface content processing method, device and computer readable storage medium
CN111581410A (en) * 2020-05-29 2020-08-25 上海依图网络科技有限公司 Image retrieval method, apparatus, medium, and system thereof
CN112632930A (en) * 2020-07-27 2021-04-09 腾讯科技(深圳)有限公司 Table data control method and device
CN111796952A (en) * 2020-08-12 2020-10-20 Oppo(重庆)智能科技有限公司 Content operation method and device and computer readable storage medium
CN113407168A (en) * 2021-06-07 2021-09-17 远光软件股份有限公司 Editing method and device of page elements, storage medium and terminal

Also Published As

Publication number Publication date
CN114201258A (en) 2022-03-18

Similar Documents

Publication Publication Date Title
CN112036736A (en) Workflow creating method and device
US20140040791A1 (en) Development platform for software as a service (saas) in a multi-tenant environment
US10691556B2 (en) Recovering a specified set of documents from a database backup
CN111061475B (en) Software code generating method, device, computer equipment and storage medium
CN115544183A (en) Data visualization method and device, computer equipment and storage medium
CN114201258B (en) Copy and paste method, apparatus, computer device and storage medium
CN114924914B (en) Disk partition table information backup and recovery method and system
CN115544050A (en) Operation log recording method, device, equipment and storage medium
Merchant et al. IDS Transposer: A users guide
CN117574871A (en) Report generation method, apparatus, device, medium, and program product
CN117610521A (en) Form editing method, form editing device, computer equipment and computer readable storage medium
CN116484820A (en) Form configuration method and device and computer equipment
CN114528045B (en) Plug-in operation method, device, computer equipment and storage medium
CN116702731A (en) Due diligence report generation method, device, computer equipment and storage medium
CN117421365A (en) Data conversion method, device, computer equipment and storage medium
CN116775955A (en) Data tag solidifying method, device, computer equipment and storage medium
CN117435589A (en) Data transfer method, device, computer equipment and storage medium
CN118132656A (en) Knowledge graph construction method, knowledge graph construction device, computer equipment and storage medium
CN118092888A (en) Code aided programming method, apparatus, computer device and storage medium
CN115718595A (en) Code generation method and device, computer equipment and storage medium
CN117290359A (en) Report processing method, report processing device, report processing equipment, report processing medium and report processing computer program product
CN115878929A (en) Webpage rendering method and device
CN116258597A (en) Document processing method, device, computer equipment and storage medium
CN117314434A (en) Electronic resource processing method, electronic resource processing device, computer equipment and storage medium
CN118093535A (en) Method, device, computer equipment and storage medium for generating pdf of local webpage

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant