CN114201258A - Copy and paste method, device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN114201258A
CN114201258A CN202111507005.XA CN202111507005A CN114201258A CN 114201258 A CN114201258 A CN 114201258A CN 202111507005 A CN202111507005 A CN 202111507005A CN 114201258 A CN114201258 A CN 114201258A
Authority
CN
China
Prior art keywords
sub
pasting
target
object data
controls
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.)
Granted
Application number
CN202111507005.XA
Other languages
Chinese (zh)
Other versions
CN114201258B (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

Images

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-and-paste method, an apparatus, 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 key information into a target character string in a preset format, and writing the target character string into a clipboard; in response to paste instructions received by a plurality of paste controls, extracting the target character string from the clipboard, and determining a plurality of sub-object data based on the target character string; and pasting the determined plurality of sub-object data to the plurality of 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 condition that the contents displayed in each control are individually copied and pasted or manually edited by a worker is not needed, so that the convenience of software business operation is effectively improved.

Description

Copy and paste method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and an apparatus for copy and paste, a computer device, and a storage medium.
Background
Copying and pasting are one of the most common operations of many software, so that the workload of user editing can be greatly reduced, and the working efficiency is improved. In some management software, a user needs to copy and paste contents, not simple texts, but copy and paste complex objects, for example, credentials in an enterprise management system have a complex structure and have various different information, but at present, copying and pasting for complex objects cannot be supported, the user needs to manually copy and paste information in the complex objects, the operation is complicated, and the business operation requirements of the user cannot be met.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a method, an apparatus, a computer device, and a storage medium for copying and pasting complex objects with different control formats and different display items.
In a first aspect, the present application provides a copy-and-paste method. 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 key information into a target character string in a preset format, and writing the target character string into a clipboard;
in response to paste instructions received by a plurality of paste controls, extracting the target character string from the clipboard, and determining a plurality of sub-object data based on the target character string;
and pasting the determined plurality of sub-object data to 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 through different controls.
In one embodiment, the obtaining key information of a 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, taking the attribute information which is identified as the attribute information corresponding to the key identification in the sub-object data of the copy control as the key information of any copy control.
In one embodiment, the determining a plurality of sub-object data based on the target character string includes:
converting the target character string into a plurality of key information;
and acquiring the sub-object data corresponding to each piece of key information in the database.
In one embodiment, the pasting the determined sub-object data to the paste controls to obtain the target object includes:
for any pasting control, selecting target sub-object data corresponding to the pasting control from the plurality of sub-object data;
acquiring a plurality of display item identifications of any pasting control, and selecting a plurality of attribute information corresponding to the plurality of display item identifications from the target sub-object data of any pasting control;
writing a plurality of attribute information corresponding to any pasting control into any pasting control to obtain a target object.
In one embodiment, any of the child object data includes: the system comprises a plurality of attribute information and an attribute identifier of each attribute information, wherein any one pasting control is configured with a target identifier; selecting the target sub-object data corresponding to any one of the pasting controls from the plurality of sub-object data includes:
and selecting target sub-object data corresponding to any pasting control from the plurality of sub-objects based on the target identification of any pasting control, wherein the target sub-object data comprises attribute information with attribute identification consistent with the target identification of any pasting control.
In a second aspect, the application also provides a copy and paste device. The device comprises:
the system comprises a first copying module, a second copying module and a control 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 key information into a target character string in a preset format and writing the target character string into a clipboard;
the first pasting module is used for responding to pasting instructions received by the pasting controls, extracting the target character string from the clipboard and determining a plurality of sub-object data based on the target character string;
and the second pasting module is used for pasting the acquired sub-object data to the 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 implementing the following steps when executing the computer program:
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 key information into a target character string in a preset format, and writing the target character string into a clipboard;
in response to paste instructions received by a plurality of paste controls, extracting the target character string from the clipboard, and determining a plurality of sub-object data based on the target character string;
and pasting the determined plurality of sub-object data to the plurality of pasting controls to obtain the target object.
In a fourth aspect, the present application further 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 key information into a target character string in a preset format, and writing the target character string into a clipboard;
in response to paste instructions received by a plurality of paste controls, extracting the target character string from the clipboard, and determining a plurality of sub-object data based on the target character string;
and pasting the determined plurality of sub-object data to the plurality of pasting controls to obtain the target object.
In a fifth aspect, the present application further provides a computer program product. The computer program product 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 key information into a target character string in a preset format, and writing the target character string into a clipboard;
in response to paste instructions received by a plurality of paste controls, extracting the target character string from the clipboard, and determining a plurality of sub-object data based on the target character string;
and pasting the determined plurality of sub-object data to the plurality of pasting controls to obtain the target object.
According to the method, the device, the computer equipment, the storage medium and the computer program product for copying and pasting, during copying, the plurality of key information of the plurality of copying controls are extracted, the plurality of key information are encoded into the target character strings in the 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 less. When pasting, determining a plurality of pieces of sub-object data according to a target character string, namely, when pasting, obtaining the sub-object data of a plurality of copying controls through the target character string corresponding to a plurality of pieces of key information, namely obtaining all data of an object to be processed, and obtaining a target object according to the plurality of pieces of sub-object data and the plurality of pasting controls, wherein 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 can also be copied and pasted when the display items and control sequencing of the plurality of copying controls and the plurality of pasting controls are different; the copying and pasting method can be applied to the copying and pasting scenes of complex objects with different formats and different display items, and does not need workers to copy and paste the contents displayed in each control one by one or edit the contents manually, so that the convenience of software business operation is effectively improved.
Drawings
FIG. 1 is a flow diagram that illustrates a method for 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 that illustrates a replication process, according to one embodiment;
FIG. 4 is a signaling diagram illustrating a paste process in one embodiment;
FIG. 5 is a flow diagram illustrating the paste process in one embodiment;
FIG. 6 is a block diagram of an apparatus for copy-and-paste in one embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In an embodiment, as shown in fig. 1, a method for copy and paste is provided, and this embodiment is illustrated by applying the method to a terminal, and it is to be 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 is implemented by interaction between the terminal and the server. In this embodiment, the method includes the steps of:
s101, responding to a copying 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 copying 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, and can also 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: voucher, order, bill of charge, etc. The multiple copy controls are used for writing and displaying data of the complex object, each copy control has corresponding key information, and the key information of the copy control is the unique identification of the data in the copy control. A control is a component on a Graphical User Interface (GUI) used to enter or present data, such as a text box, a form, and the like.
Specifically, the object to be processed receives the copy instruction, determines whether the object to be processed is a complex object, and if the object to be processed is the complex object, acquires sub-object data of each copy control in the object to be processed, and determines key information of each copy control.
S102, encoding the extracted 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 that runs a system.
Specifically, Map and List data are constructed according to the extracted key information, the constructed Map and List data are converted into target character strings in a preset format, and the extracted key information is encoded into the target character strings in the preset format. The target character string can be converted into json format by Gson of Google corporation, and can be converted into xml format by dom4 j. And writing the target character string into the clipboard.
S103, in response to the pasting instructions received by the pasting controls, extracting the target character string from the clipboard, and determining a plurality of sub-object data based on the target character string.
The pasting instruction can be triggered by presetting a pasting shortcut key after a plurality of controls are selected, and can also be triggered by a menu bar after a plurality of controls are selected; the multiple pasting controls are existing controls in a page, the multiple controls in a certain page receive pasting instructions, and the multiple controls receiving the pasting instructions are the multiple pasting controls. The plurality of pasting controls are used for writing and displaying the object to be processed. The plurality of sub-object data are consistent with the sub-object data of the plurality of copy controls during 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 pieces of key information, and then the plurality of pieces of sub-object data are determined according to the plurality of pieces of key information.
And S104, pasting the determined sub-object data to the pasting controls to obtain the target object.
Wherein, 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 pasting controls are set with display items, for the corresponding pasting controls and the sub-object data, a plurality of display data corresponding to the display items of the pasting controls are determined in the sub-object data, and the plurality of display data are written into the pasting controls.
In the method for copying and pasting, during copying, the plurality of key information of the plurality of copy controls are extracted, the plurality of key information are encoded into the target character strings in the 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 less. When pasting, the sub-object data of a plurality of copying controls can be obtained through the target character strings corresponding to a plurality of key information, namely all data of the object to be processed is obtained, and then the target object is obtained according to the plurality of sub-object data and the plurality of pasting controls, wherein 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 copying and pasting can be carried out when the display items and control sequencing of the plurality of copying controls and the plurality of pasting controls are different; the copying and pasting method can be applied to the copying and pasting scenes of complex objects with different formats and different display items, and does not need to carry out independent copying and pasting processing or manual editing on the contents displayed in each control one by a worker, so that the convenience of software business operation is effectively improved.
In one embodiment, when the copied to-be-processed object is a complex object, the copying is equivalent to copying the contents of a plurality of copy controls, when the plurality of copy controls are copied, the parent controls of the plurality of copy controls are determined, the parent controls are usually containers, and no method for copying is provided by default. The method for registering and copying the father control can copy a plurality of copied controls at the same time.
In S101, the obtaining key information of multiple copy controls in the object to be processed includes:
and S111, extracting the sub-object data of each copy control in the object to be processed.
Wherein the sub-object data comprises: a plurality of attribute information. For example, the sub-object is a subject, and the subject includes a plurality of attribute information, including: ID:; and (3) encoding: (ii) a; name: **.
Specifically, in the data of the page displaying the object to be processed, the sub-object data of each copy control of the object to be processed is extracted.
And S112, for any copy control, identifying the attribute information corresponding to the key identification in the sub-object data of the copy control as the key information of the any copy control.
And the key information of the copy control is used for uniquely identifying the sub-object data in the copy control. For example, by encoding: a child object data of the copy control may be determined as: subject of the patent.
Specifically, key information capable of uniquely identifying the sub-object data is determined in advance in a plurality of attribute information of the sub-object data, and a key identifier is configured for the key information; after the sub-object data is acquired, the key information of the sub-object data can be determined by identifying the key identifier.
For example, the sub-object is a subject, and the subject includes a plurality of attribute information, including: ID:; and (3) encoding: (ii) a; name: wherein, encoding: configured with a key identification, the encoding will: as key information for subjects.
In this embodiment, in data of a page on which the to-be-processed object is displayed, sub-object data of each copy control of the to-be-processed object is extracted, a plurality of sub-object data are sent to a data converter, key information of each sub-object is acquired through the data converter, if key information that an identifier of any sub-object data is a key identifier is not acquired, which indicates that any sub-object data is incomplete and there is missing attribute information, the missing attribute information is acquired from the database according to a preset data item of any sub-object data, and then the key information of each sub-object is determined, where the preset data item is used to reflect all attribute information of the sub-object data.
As shown in fig. 2, in the present 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 plurality of sub-object data of an object to be processed are obtained through a copy obtaining class (ActionCopy), 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, data lacking in the plurality of sub-data are determined in a supplementing mode, the key information of each sub-object is extracted, Map and List class data are constructed according to the plurality of key information, and then the data are converted into target character creation in the preset format; the first object conversion class can be JsonConverter, and a target character string in a Json format can be obtained; the target string is sent to Actioncopy, which writes the target string to the clipboard.
Compared with the prior art, the control copying method is rewritten, as shown in fig. 3, a to-be-processed object is triggered by a copy shortcut key or a menu bar to receive a copy instruction, if the to-be-processed object is a complex object, sub-object data of a plurality of copy controls in the to-be-processed object is obtained from data of a page displaying the to-be-processed object, key information of each sub-object data is extracted, a plurality of pieces of key information are encoded into a target character string in a json format (or xml format), and the target character string is written into a clipboard of a system. The key information is encoded into the target character string in the preset format and written into the clipboard of the system, and the clipboard does not need to write the complete data of the object to be processed, so that the data volume is reduced, and the occupied system resource is small.
In an embodiment, in S101, the object to be processed may receive the copy instruction in the first process, and in S103, the multiple paste controls may receive the paste instruction in the 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 receives a copy instruction, and in a second enterprise management software, the plurality of paste controls receive a paste instruction.
In one embodiment, when a plurality of paste controls are selected and triggered to receive paste instructions, parent controls of the plurality of paste controls are determined, the parent controls are usually containers, and no copy and paste method is provided by default. The method for registering and pasting the father control can be used for pasting a plurality of pasting controls at the same time.
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 the plurality of pieces of key information is a reverse process of encoding the plurality of pieces of key information into the target character string. And converting the target character strings in the preset format into Map and List data, and converting the Map and List data obtained by conversion into a plurality of key information.
S311, obtaining the sub-object data corresponding to each key information in the database.
Specifically, since the key information can uniquely represent the sub-object data corresponding thereto, the sub-object data corresponding thereto can be acquired in the database through the key information. And acquiring the number of the sub-objects corresponding to each piece of key information to obtain the complete data of the object to be processed.
In this embodiment, the pasting mode of the control is rewritten, the target character string is converted into a plurality of pieces of key information after being taken out from the clipboard, and then the data of the plurality of sub-objects is obtained in the database according to the plurality of pieces of key information, so as to restore the complete data of the object to be processed, so that pasting of different display items in different formats can be realized according to the complete data of the object to be processed in the following process.
In one embodiment, S104 includes:
s411, for any pasting control, selecting target sub-object data corresponding to the pasting 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 manner, each pasting control is configured with a target identifier, any sub-object data includes a plurality of attribute information, and each attribute information is configured with an attribute identifier. The key information in any sub-object is configured with a key identifier and an attribute identifier.
Selecting the target sub-object data corresponding to any one of the pasting controls from the plurality of sub-object data includes: and selecting target sub-object data corresponding to any pasting control from the plurality of sub-objects based on the target identification of any pasting control, wherein the target sub-object data comprises attribute information with attribute identification consistent with the target identification of any pasting control.
For example, the attribute identifications of the plurality of attribute information in the sub-object data of the subject are respectively: subject name, subject code, subject ID; the attribute identifications of a plurality of attribute information in the sub-object data of the lender are respectively as follows: name, gender, identification number and occupation; and if the target identification of the pasting control is subject code, determining that target sub-object data corresponding to the pasting control is as follows: sub-object data of a subject.
S412, acquiring a plurality of display item identifications of any pasting control, and selecting a plurality of attribute information corresponding to the plurality of display item identifications from the target sub-object data of any pasting control.
Specifically, each pasting control is preset with a plurality of display item identifiers, and the plurality of display item identifiers of the pasting control are used for reflecting the content displayed by the pasting control. The paste control can display one or more items of attribute information. The attribute information displayed in the object to be processed may be different from the attribute information displayed in the target object for the same sub-object data.
For example, the sub-object data corresponding to the paste control, and the display item identifiers of the paste control are: and selecting the subject name and the program ID as attribute information displayed by the pasting control.
And S413, writing a plurality of attribute information corresponding to any pasting control into any pasting control to obtain the target object.
Specifically, after determining a plurality of attribute information corresponding to each pasting object, writing the plurality of attribute information corresponding to any pasting control into any pasting control to obtain the target object.
In an implementation manner, if any pasting control does not acquire the target sub-object data, attribute information is not written in any pasting control, and the content of any pasting control can be manually edited by a worker. If any sub-object data is not selected as the target sub-object data, it indicates that the target object does not use 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 method comprises the steps that a paste acquisition class (ActionPaste) acquires a target character string from a clipboard, the target character string is sent to a second object conversion class (ObjectConverter), the second object conversion class converts the target character string into Map and List data to obtain a plurality of pieces of key information, a plurality of pieces of sub-object data are acquired according to the key information, and complete data of an object to be processed are restored; and sending the plurality of sub-object data to an ActionPase, and obtaining the target object by the ActionPase according to the plurality of sub-object data and the plurality of pasting controls.
Compared with the prior art, the method for pasting the control is rewritten, as shown in fig. 5, a plurality of pasting controls are triggered by pasting shortcut keys or a menu bar to receive a pasting event, a target character string is obtained from a clipboard of a system, the target character string is converted into a plurality of pieces of key information, then a plurality of pieces of sub-object data are obtained through the plurality of pieces of key information, and the plurality of pieces of sub-object data are pasted to the plurality of pasting controls to obtain a target object.
In the embodiment, when copying, the plurality of key information of the plurality of copy controls are extracted, the plurality of key information are encoded into the target character strings in the 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 less. During pasting, sub-object data of a plurality of copy controls, namely all data of an object to be processed, can be obtained through a plurality of target character strings corresponding to the key information; determining attribute information to be displayed in the sub-object data according to the display identification of the pasting control, writing the attribute information to be displayed by the pasting control into the pasting control to obtain a target object, namely, the obtained target object can meet the display requirement of the pasting control, and copying and pasting can be carried out when the display items and the control sequencing of a plurality of copying controls and a plurality of pasting controls are different; the copying and pasting method can be applied to the copying and pasting scenes of complex objects with different formats and different display items, and does not need to carry out independent copying and pasting processing or manual editing on the contents displayed in each control one by a worker, so that the convenience of software business operation is effectively improved.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a copy-paste apparatus for implementing the copy-paste method mentioned above. The implementation scheme for solving the problem provided by the apparatus is similar to the implementation scheme described in the above method, so specific limitations in one or more embodiments of the copy and paste apparatus provided below can be referred to the limitations of the copy and paste method above, and are not described herein again.
In one embodiment, as shown in fig. 6, there is provided a copy-and-paste apparatus including: first duplication module, second duplication module, first module and the second module of pasting, wherein:
the system comprises a first copying module, a second copying module and a control 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 key information into a target character string in a preset format and writing the target character string into a clipboard;
the first pasting module is used for responding to pasting instructions received by the pasting controls, extracting the target character string from the clipboard and determining a plurality of sub-object data based on the target character string;
and the second pasting module is used for pasting the acquired sub-object data to the 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 through different controls.
In one embodiment, the first replication module comprises: 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, for any copy control, identify, as the key information of the any copy control, attribute information corresponding to a key identifier in child object data of the copy control.
The first paste module includes: 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: first paste unit, second paste unit and third paste the 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 identifications of any pasting control and selecting a plurality of attribute information corresponding to the plurality of display item identifications from the 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 any sub-object data comprises: the system comprises a plurality of attribute information and an attribute identifier of each attribute information, wherein any one 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 pasting control from the plurality of sub-objects based on the target identification of any pasting control, wherein the target sub-object data comprises attribute information with attribute identification consistent with the target identification of any pasting control.
The modules in the copy and paste apparatus can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram 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 comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication 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 copy-and-paste method. 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, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain 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 a computer program stored therein, the processor implementing the following steps when executing the computer program:
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 key information into a target character string in a preset format, and writing the target character string into a clipboard;
in response to paste instructions received by a plurality of paste controls, extracting the target character string from the clipboard, and determining a plurality of sub-object data based on the target character string;
and pasting the determined plurality of sub-object data to 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 through different controls.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the obtaining key information of a 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, taking the attribute information which is identified as the attribute information corresponding to the key identification in the sub-object data of the copy control as the key information of 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 comprises:
converting the target character string into a plurality of key information;
and acquiring the sub-object data corresponding to each piece of key information in the database.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the pasting the determined multiple sub-object data to the multiple pasting controls to obtain the target object, and the method includes:
for any pasting control, selecting target sub-object data corresponding to the pasting control from the plurality of sub-object data;
acquiring a plurality of display item identifications of any pasting control, and selecting a plurality of attribute information corresponding to the plurality of display item identifications from the target sub-object data of any pasting control;
writing a plurality of attribute information corresponding to any pasting control into any pasting control to obtain a target object.
In one embodiment, the processor, when executing the computer program, further performs the steps of: any sub-object data includes: the system comprises a plurality of attribute information and an attribute identifier of each attribute information, wherein any one pasting control is configured with a target identifier; selecting the target sub-object data corresponding to any one of the pasting controls from the plurality of sub-object data includes:
and selecting target sub-object data corresponding to any pasting control from the plurality of sub-objects based on the target identification of any pasting control, wherein the target sub-object data comprises attribute information with attribute identification consistent with the target identification of any pasting 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 key information into a target character string in a preset format, and writing the target character string into a clipboard;
in response to paste instructions received by a plurality of paste controls, extracting the target character string from the clipboard, and determining a plurality of sub-object data based on the target character string;
and pasting the determined plurality of sub-object data to 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 through different controls.
In one embodiment, the computer program when executed by the processor further performs the steps of: the obtaining key information of a 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, taking the attribute information which is identified as the attribute information corresponding to the key identification in the sub-object data of the copy control as the key information of 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 comprises:
converting the target character string into a plurality of key information;
and acquiring the sub-object data corresponding to each piece of key information in the database.
In one embodiment, the computer program when executed by the processor further performs the steps of: the pasting the determined multiple sub-object data to the multiple pasting controls to obtain the target object, and the method includes:
for any pasting control, selecting target sub-object data corresponding to the pasting control from the plurality of sub-object data;
acquiring a plurality of display item identifications of any pasting control, and selecting a plurality of attribute information corresponding to the plurality of display item identifications from the target sub-object data of any pasting control;
writing a plurality of attribute information corresponding to any pasting control into any pasting control to obtain a target object.
In one embodiment, the computer program when executed by the processor further performs the steps of: any sub-object data includes: the system comprises a plurality of attribute information and an attribute identifier of each attribute information, wherein any one pasting control is configured with a target identifier; selecting the target sub-object data corresponding to any one of the pasting controls from the plurality of sub-object data includes:
and selecting target sub-object data corresponding to any pasting control from the plurality of sub-objects based on the target identification of any pasting control, wherein the target sub-object data comprises attribute information with attribute identification consistent with the target identification of any pasting 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 key information into a target character string in a preset format, and writing the target character string into a clipboard;
in response to paste instructions received by a plurality of paste controls, extracting the target character string from the clipboard, and determining a plurality of sub-object data based on the target character string;
and pasting the determined plurality of sub-object data to 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 through different controls.
In one embodiment, the computer program when executed by the processor further performs the steps of: the obtaining key information of a 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, taking the attribute information which is identified as the attribute information corresponding to the key identification in the sub-object data of the copy control as the key information of 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 comprises:
converting the target character string into a plurality of key information;
and acquiring the sub-object data corresponding to each piece of key information in the database.
In one embodiment, the computer program when executed by the processor further performs the steps of: the pasting the determined multiple sub-object data to the multiple pasting controls to obtain the target object, and the method includes:
for any pasting control, selecting target sub-object data corresponding to the pasting control from the plurality of sub-object data;
acquiring a plurality of display item identifications of any pasting control, and selecting a plurality of attribute information corresponding to the plurality of display item identifications from the target sub-object data of any pasting control;
writing a plurality of attribute information corresponding to any pasting control into any pasting control to obtain a target object.
In one embodiment, the computer program when executed by the processor further performs the steps of: any sub-object data includes: the system comprises a plurality of attribute information and an attribute identifier of each attribute information, wherein any one pasting control is configured with a target identifier; selecting the target sub-object data corresponding to any one of the pasting controls from the plurality of sub-object data includes:
and selecting target sub-object data corresponding to any pasting control from the plurality of sub-objects based on the target identification of any pasting control, wherein the target sub-object data comprises attribute information with attribute identification consistent with the target identification of any pasting control.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the 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), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A copy-and-paste method, 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 key information into a target character string in a preset format, and writing the target character string into a clipboard;
in response to paste instructions received by a plurality of paste controls, extracting the target character string from the clipboard, and determining a plurality of sub-object data based on the target character string;
and pasting the determined plurality of sub-object data to the plurality of pasting controls to obtain the target object.
2. The method of claim 1, wherein the complex object comprises at least two sub-objects, and wherein the at least two sub-objects are displayed via different controls.
3. The method according to claim 1, wherein the obtaining key information of a plurality of copy 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, taking the attribute information which is identified as the attribute information corresponding to the key identification in the sub-object data of the copy control as the key information of any copy control.
4. The method of claim 1, wherein determining a plurality of sub-object data based on the target string comprises:
converting the target character string into a plurality of key information;
and acquiring the sub-object data corresponding to each piece of key information in the database.
5. The method of claim 1, wherein the pasting the determined sub-object data into the paste controls to obtain the target object comprises:
for any pasting control, selecting target sub-object data corresponding to the pasting control from the plurality of sub-object data;
acquiring a plurality of display item identifications of any pasting control, and selecting a plurality of attribute information corresponding to the plurality of display item identifications from the target sub-object data of any pasting control;
writing a plurality of attribute information corresponding to any pasting control into any pasting control to obtain a target object.
6. The method of claim 5, wherein any sub-object data comprises: the system comprises a plurality of attribute information and an attribute identifier of each attribute information, wherein any one pasting control is configured with a target identifier; selecting the target sub-object data corresponding to any one of the pasting controls from the plurality of sub-object data includes:
and selecting target sub-object data corresponding to any pasting control from the plurality of sub-objects based on the target identification of any pasting control, wherein the target sub-object data comprises attribute information with attribute identification consistent with the target identification of any pasting control.
7. A copy-and-paste apparatus, comprising:
the system comprises a first copying module, a second copying module and a control 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 key information into a target character string in a preset format and writing the target character string into a clipboard;
the first pasting module is used for responding to pasting instructions received by the pasting controls, extracting the target character string from the clipboard and determining a plurality of sub-object data based on the target character string;
and the second pasting module is used for pasting the acquired sub-object data to the pasting controls to obtain the target object.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 6 when executed by a processor.
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 true CN114201258A (en) 2022-03-18
CN114201258B 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 (18)

* 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
US20180276057A1 (en) * 2017-03-22 2018-09-27 International Business Machines Corporation Enhanced copy-and-paste
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
US20210232448A1 (en) * 2016-08-23 2021-07-29 Jrd Communication (Shenzhen) Ltd Clipboard control method and system based on mobile terminal
CN113407168A (en) * 2021-06-07 2021-09-17 远光软件股份有限公司 Editing method and device of page elements, storage medium and terminal

Patent Citations (19)

* 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
US20210232448A1 (en) * 2016-08-23 2021-07-29 Jrd Communication (Shenzhen) Ltd Clipboard control method and system based on mobile terminal
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
US20180276057A1 (en) * 2017-03-22 2018-09-27 International Business Machines Corporation Enhanced copy-and-paste
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
CN114201258B (en) 2024-06-07

Similar Documents

Publication Publication Date Title
CN112036736A (en) Workflow creating method and device
CN111061475B (en) Software code generating method, device, computer equipment and storage medium
US10691556B2 (en) Recovering a specified set of documents from a database backup
CN112433712A (en) Report display method and device, computer equipment and storage medium
CN115544050A (en) Operation log recording method, device, equipment and storage medium
CN112434004A (en) Data migration method and device for heterogeneous system, computer equipment and storage medium
CN114201258B (en) Copy and paste method, apparatus, computer device and storage medium
CN116048609A (en) Configuration file updating method, device, computer equipment and storage medium
CN114547066A (en) Nuclear power business data standardization method and device and computer equipment
CN114756293A (en) Service processing method, device, computer equipment and storage medium
CN114185566A (en) Containerized deployment method, apparatus, computer device and storage medium
US20140244538A1 (en) Business process management, configuration and execution
CN117251661B (en) Webpage file generation method, device, computer equipment and storage medium
CN113961110B (en) User operation response method, device, computer equipment and storage medium
JP7141501B2 (en) Slip processing device, slip processing method, and slip processing program
CN116484820A (en) Form configuration method and device and computer equipment
CN117555882A (en) Metadata cloning method, apparatus, system, computer device and storage medium
CN117435589A (en) Data transfer method, device, computer equipment and storage medium
CN118295702A (en) Software design relation display method, device, computer equipment and storage medium
CN117112049A (en) Data source management method, device, computer equipment and storage medium
CN115718595A (en) Code generation method and device, computer equipment and storage medium
CN118092888A (en) Code aided programming method, apparatus, computer device and storage medium
CN117290359A (en) Report processing method, report processing device, report processing equipment, report processing medium and report processing computer program product
CN115952773A (en) Form generation method and device
CN114510915A (en) Data interaction method and device, computer equipment and storage medium

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