Software object processing method and device, equipment and storage medium
By converting the status information of software objects into structured data and performing editing operations, the problem of status information loss in the serialization mechanism in the editing operation scenario in the existing technology is solved, the consistency and correctness of the editing operations of software objects are achieved, and the usage scenarios are broadened.
Patent Information
- Application Number
- CN202410288732.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-13
- Publication Date
- 2025-09-16
AI Technical Summary
The existing serialization mechanism cannot be effectively applied in the editing operation scenario of software objects, resulting in the loss of state information and a narrow usage scenario.
The software object is controlled by converting the state information of the software object into set structured data and performing editing operations on the structured data to generate the edited software object.
It broadens the usage scenarios of software objects and ensures the consistency and correctness of editing operations.
Smart Images

Figure CN120653699A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to computer technology, and more particularly to a method, apparatus, device, and storage medium for processing software objects. Background Art
[0002] In software design and development, object serialization is the process of converting software objects (also known as runtime objects) into a storable or transportable format. Its purpose is to preserve the state of software objects so that they can be recreated when needed or transferred to other devices for use.
[0003] Existing serialization mechanisms generally only provide a two-way conversion process between software objects and storable or transmittable formats, and some state information may be lost during the conversion process, which makes the serialization mechanism's use case relatively narrow. Summary of the Invention
[0004] The embodiments of the present disclosure provide a method, apparatus, device, and storage medium for processing software objects. By performing editing operations on the structured data of the software objects, the software objects can be controlled, the usage scenarios of the software objects can be broadened, and the consistency and correctness of the editing operations can be ensured.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for processing a software object, comprising:
[0006] In response to an editing operation on a first software object, converting state information of the first software object into set structured data;
[0007] Performing the editing operation on the structured data to obtain edited structured data;
[0008] An edited first software object is generated based on the edited structured data.
[0009] In a second aspect, an embodiment of the present disclosure further provides a software object processing device, including:
[0010] a data conversion module, configured to convert the state information of the first software object into predetermined structured data in response to an editing operation on the first software object;
[0011] an editing operation execution module, configured to execute the editing operation on the structured data to obtain edited structured data;
[0012] A generating module is configured to generate an edited first software object based on the edited structured data.
[0013] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0014] one or more processors;
[0015] a storage device for storing one or more programs,
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the software object processing method as described in the embodiment of the present disclosure.
[0017] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the method for processing a software object as described in the embodiment of the present disclosure.
[0018] The disclosed embodiments disclose a method, apparatus, device, and storage medium for processing a software object. In response to an edit operation on a first software object, the method converts state information of the first software object into predetermined structured data; performs an edit operation on the structured data to obtain edited structured data; and generates an edited first software object based on the edited structured data. The software object processing method provided by the disclosed embodiments implements control over the software object by performing an edit operation on the structured data of the software object, broadens the use scenarios of the software object, and ensures the consistency and correctness of the edit operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0020] Figure 1 This is a flowchart of a method for processing a software object provided by an embodiment of the present disclosure;
[0021] Figure 2a is a schematic diagram of performing an editing operation on a software object provided by an embodiment of the present disclosure;
[0022] Figure 2b This is an example diagram of performing a copy operation on a software object provided by an embodiment of the present disclosure;
[0023] Figure 2c This is an example diagram of performing a copy operation on a software object provided by an embodiment of the present disclosure;
[0024] Figure 3a This is a schematic diagram of a new software object provided by an embodiment of the present disclosure;
[0025] Figure 3b This is a schematic diagram of performing an undo and redo operation on a software object provided by an embodiment of the present disclosure;
[0026] Figure 4 This is a schematic diagram of the structure of a software object processing device provided by an embodiment of the present disclosure;
[0027] Figure 5 It is a structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0029] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0030] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0031] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0032] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0033] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0034] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0035] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0036] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0037] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0038] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0039] The existing serialization mechanism can only be applied to the following usage scenarios:
[0040] 1. Persistent storage: Through object serialization, the state of the object can be saved to disk or database so that the state of the object can be restored when the program is restarted or the data is transferred;
[0041] 2. Data transmission: Object serialization can convert objects into a transmittable format, for example, transmitting object data over a network or passing objects between processes;
[0042] 3. Sharing and storage: Through object serialization, objects can be stored in shared storage media so that multiple applications can access or use the same object.
[0043] Editing software has many common editing operations, and the existing serialization mechanism cannot be applied to the same editing operation scenario.
[0044] Figure 1This is a flow chart of a method for processing a software object provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to situations where software objects are processed. The method can be executed by a processing device for the software object, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, PC or server, etc.
[0045] like Figure 1 As shown, the method includes:
[0046] S110 : In response to an editing operation on a first software object, converting state information of the first software object into set structured data.
[0047] The first software object can be understood as a runtime software object in an application, that is, a software object instance. The first software object can be a newly created software object or a software object that has undergone a series of edits, which is not limited here. Editing operations may include: copying, pasting, cutting, creating, deleting, modifying, and undoing and redoing the above operations. The status information includes at least one attribute of the first software object and the status value of each attribute. The set structured data can be data represented by a pre-set structural form, for example, it can be in the form of keyword-value; wherein, the "keyword" can be a status keyword, and the "value" can be a status parameter.
[0048] In this embodiment, when an editing operation triggered on a first software object is detected, the state information of the first software object is converted into set structured data.
[0049] S120: Perform an editing operation on the structured data to obtain edited structured data.
[0050] In this embodiment, after the state information of the first software object is converted into the set structured data, an editing operation is performed on the structured data to obtain the edited structured data. For example, a copy operation is performed on the structured data; a copy operation or a paste operation is performed on the structured data; a cut operation is performed on the structured data; a delete operation is performed on the structured data; or a modification operation is performed on the structured data.
[0051] S130: Generate an edited first software object based on the edited structured data.
[0052] The process of generating the edited first software object based on the edited structured data may be: creating a new first software object based on the edited structured data to obtain the edited first software object; or modifying the state parameters of another software object according to the edited structured data to obtain the edited first software object. Figure 2a Schematic diagram of executing editing operation on software object in this embodiment. Figure 2a As shown, for software objects a, b and c in state 1, they are first converted into structured data to obtain the structured data of software object a, the structured data of software object b and the structured data of software object c, and then an editing operation x is performed on the structured data of software object a, the structured data of software object b and the structured data of software object c to obtain the edited structured data of software object a, the structured data of software object b and the structured data of software object c, and finally, based on the edited structured data of software object a, the structured data of software object b and the structured data of software object c, software objects a, b and c in state 2 are generated.
[0053] In this embodiment, the editing operation on the software object is implemented based on the following three basic operations: 1. Conversion of software object to structured data, and generation of structured data to software object; 2. Equality judgment; 3. Data copying.
[0054] Optionally, if the editing operation is a copy operation, performing the editing operation on the structured data may be performed by performing a copy operation on the structured data to obtain copied structured data. Accordingly, generating the edited first software object based on the edited structured data may be performed by creating a first software object based on the copied structured data to obtain the copied first software object; or by extracting state parameters from the copied structured data and modifying corresponding state parameters in a second software object based on the state parameters to obtain the copied first software object.
[0055] The copied structured data can be understood as a copy of structured data that is identical to the original structured data. The copied first software object can be understood as a software object that is identical to the original first software object. Since the copied structured data records the state keywords and state parameters of the first software object, a new first software object can be created directly based on the copied structured data, thereby obtaining the copied first software object. Alternatively, the state parameters corresponding to each state keyword in the copied structured data can be extracted and used to replace the corresponding state parameters in the second software object to obtain the copied first software object.
[0056] For example, Figure 2b This is an example diagram of performing a copy operation on a software object. Figure 2bAs shown, when a copy operation on software object A is detected, the state information of software object A is first converted into structured data, and then the copy operation is performed on the structured data to obtain the copied structured data; finally, a new software object A is created based on the copied structured data, or the corresponding state parameters in software object B are modified based on the copied structured data to obtain a new software object A.
[0057] Optionally, if the editing operation is a copy operation, the method of performing the editing operation on the structured data may be: converting the structured data into data in a first set format; transmitting the data in the first set format; converting the transmitted data in the first set format into set structured data to obtain copied structured data; accordingly, the method of generating the edited first software object based on the edited structured data may be: creating a first software object based on the copied structured data to obtain the copied first software object.
[0058] The first set format is a transmittable format, such as JSON format, YML format, or an encoded binary format. In this embodiment, if the first software object is to be copied to another process or another terminal, the structured data is first converted into data in a transmittable format, and the data in the transmittable format is transmitted to the other terminal or process. The other terminal or process converts the received data in the transmittable format back into structured data, thereby copying the structured data to the other terminal or process. Finally, the first software object is created based on the copied structured data, thereby obtaining the copied first software object.
[0059] For example, Figure 2c This is an example diagram of performing a copy operation on a software object. Figure 2c As shown, when a copy operation on software object A is detected, the state information of software object A is first converted into structured data, and then the structured data is converted into data in a transmittable format, and then the data in the transmittable format is transmitted, and then the transmitted data in the transmittable format is converted into structured data, and finally a new software object A is created based on the structured data.
[0060] Optionally, before responding to the editing operation on the first software object, the following steps are also included: in response to the object creation operation, obtaining original data in a second set format; converting the original data in the second set format into set structured data; and creating the first software object based on the structured data.
[0061] The second setting format may be a storable format. The original data is pre-edited object state information represented in the second setting format, including initialization state parameters of various state attributes. For example, Figure 3ais a schematic diagram of a new software object, such as Figure 3a In the embodiment shown, when a user operation of creating a new software object is detected, original data in a storable format is first obtained, then the original data is converted into structured data, and finally software object A is created based on the structured data.
[0062] Optionally, after generating the edited first software object based on the edited structured data, the following steps are also included: in response to an undo edit operation on the first software object, comparing the structured data with the edited structured data to obtain difference state parameters; copying the difference state parameters to obtain copied difference state parameters; modifying the corresponding state parameters in the edited first software object according to the pre-editing state parameters in the copied abnormal state parameters to obtain the unedited first software object.
[0063] The difference state parameters include pre-edit state parameters and post-edit state parameters. In this embodiment, the editing operation on the first software object may be an editing operation on some or all state parameters in the structured data of the first software. After the edited first software object is generated from the edited structured data, when an undo edit operation is detected for the first software object, the pre-edit structured data and the post-edit structured data are compared to obtain difference state parameters; the difference state parameters are then copied, and finally the copied pre-edit state parameters are used to replace the corresponding state parameters in the edited first software object, thereby obtaining the undo edited first software object.
[0064] Optionally, after obtaining the first software object after undoing the editing, the following steps are also included: in response to a redo operation on the first software object after undoing the editing, corresponding status parameters in the first software object after undoing the editing are modified according to the edited status parameters in the copied abnormal status parameters to obtain the redone first software object.
[0065] The redo operation can be understood as undoing an undo operation, so that the state of the first software object is switched back to the state after the edit. That is, the state of the redone first software object is the same as the state of the edited first software object. Specifically, after obtaining the first software object after the edit is undone, the corresponding state parameters of the first software object after the edit are replaced with the copied state parameters after the edit is undone, thereby obtaining the redone first software object.
[0066] For example, Figure 3b It is a schematic diagram of performing undo and redo operations on a software object in this embodiment. Figure 3bAs shown, when an undo edit operation on a first software object is detected, the structured data before editing and the structured data after editing are judged to be equal to obtain difference state parameters; the difference state parameters are copied, and the copied state parameters before editing are used to replace the corresponding state parameters in the first software object after editing, to obtain the first software object after undo editing; then, if a redo operation on the first software object after undo editing is detected, the copied state parameters after editing are used to replace the corresponding state parameters in the first software object after undo editing, to obtain the redo first software object.
[0067] Optionally, the editing operation may be performed on the structured data by: obtaining a data type of the first software object; determining an execution strategy for the editing operation according to the data type; and performing the editing operation on the structured data based on the execution strategy.
[0068] The data type can be understood as the type of the state parameter in the state information, which can include basic types (such as numbers, strings, and Boolean types), value types, and reference types. In this embodiment, the editing operation can be implemented using the three basic operations described in the above embodiment. The three basic operations are: 1. Conversion of software objects to structured data, and generation of structured data to software objects; 2. Equality determination; and 3. Data copying. The execution strategy can be understood as the execution strategy for the three basic operations. In this embodiment, the correspondence between data types and the execution strategies of the three basic operations can be pre-configured to obtain the execution strategy for each editing operation under a certain data, thereby performing the editing operation on the structured data based on the execution strategy. The correspondence between data types and the execution strategies of the three basic operations can be configured by technical personnel based on their needs and is not limited here. For example, for basic software objects, the execution strategy for "Conversion of software objects to structured data" can be to make a copy and directly store it; the execution strategy for "Equality determination" can be to use the "===" operator or the "equals function"; and the execution strategy for "Data copying" can be to use the "=" operator or the "clone function."
[0069] The technical solution of the disclosed embodiment converts the state information of the first software object into predetermined structured data in response to an edit operation on the first software object; performs the edit operation on the structured data to obtain edited structured data; and generates the edited first software object based on the edited structured data. The software object processing method provided in the disclosed embodiment implements control over the software object by performing the edit operation on the structured data of the software object, broadening the use scenarios of the software object and ensuring the consistency and correctness of the edit operation.
[0070] Figure 4A schematic diagram of a software object processing device provided by an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the device includes:
[0071] A data conversion module 410 is configured to convert the state information of the first software object into predetermined structured data in response to an editing operation on the first software object;
[0072] An editing operation execution module 420, configured to execute the editing operation on the structured data to obtain edited structured data;
[0073] The generating module 430 is configured to generate an edited first software object based on the edited structured data.
[0074] Optionally, if the editing operation is a copy operation, the editing operation execution module 420 is further configured to:
[0075] performing the copy operation on the structured data to obtain copied structured data;
[0076] Optionally, the generating module 430 is further configured to:
[0077] A first software object is created based on the copied structured data to obtain the copied first software object; or, state parameters in the copied structured data are extracted, and corresponding state parameters in the second software object are modified based on the state parameters to obtain the copied first software object.
[0078] Optionally, if the editing operation is a copy operation, the editing operation execution module 420 is further configured to:
[0079] Converting the structured data into data in a first set format;
[0080] Transmitting the data in the first set format;
[0081] Converting the transmitted data in the first set format into set structured data to obtain copied structured data;
[0082] Optionally, the generating module 430 is further configured to:
[0083] A first software object is created based on the copied structured data to obtain the copied first software object.
[0084] Optionally, it further includes: a software object creation module for:
[0085] In response to the object creation operation, obtaining original data in a second set format;
[0086] Converting the raw data in the second set format into set structured data;
[0087] The first software object is created based on the structured data.
[0088] Optionally, it further includes: an editing operation undo module, which is used to:
[0089] In response to an undo edit operation on the first software object, comparing the structured data with the edited structured data to obtain difference state parameters; wherein the difference state parameters include pre-edit state parameters and post-edit state parameters;
[0090] Copying the difference state parameter to obtain the copied difference state parameter;
[0091] The corresponding state parameters in the edited first software object are modified according to the pre-editing state parameters in the copied abnormal state parameters to obtain the first software object after the editing is undone.
[0092] Optionally, it also includes an edit and redo module for:
[0093] In response to a redo operation on the undone edited first software object, corresponding state parameters in the undone edited first software object are modified according to the edited state parameters in the copied abnormal state parameters to obtain a redone first software object.
[0094] Optionally, the editing operation execution module 420 is further configured to:
[0095] Obtaining a data type of the first software object;
[0096] determining an execution strategy for the editing operation according to the data type;
[0097] The editing operation is performed on the structured data based on the execution policy.
[0098] The software object processing device provided by the embodiments of the present disclosure can execute the software object processing method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0099] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0100] Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 5, which shows an electronic device (eg Figure 5 The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0101] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0102] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0103] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0104] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0105] The electronic device provided by the embodiment of the present disclosure and the method for processing software objects provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0106] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the method for processing software objects provided in the above embodiment is implemented.
[0107] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0108] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0109] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0110] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0111] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to an editing operation on a first software object, converts the state information of the first software object into set structured data; performs the editing operation on the structured data to obtain edited structured data; and generates an edited first software object based on the edited structured data.
[0112] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0113] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0114] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0115] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0116] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0117] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0118] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0119] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A method for processing a software object, characterized in that: include: In response to an editing operation on a first software object, converting state information of the first software object into set structured data; Performing the editing operation on the structured data to obtain edited structured data; An edited first software object is generated based on the edited structured data.
2. The method according to claim 1, characterized in that If the editing operation is a copy operation, performing the editing operation on the structured data includes: performing the copy operation on the structured data to obtain copied structured data; Accordingly, generating an edited first software object based on the edited structured data includes: A first software object is created based on the copied structured data to obtain the copied first software object; or, state parameters in the copied structured data are extracted, and corresponding state parameters in the second software object are modified based on the state parameters to obtain the copied first software object.
3. The method according to claim 1, characterized in that If the editing operation is a copy operation, performing the editing operation on the structured data includes: Converting the structured data into data in a first set format; Transmitting the data in the first set format; Converting the transmitted data in the first set format into set structured data to obtain copied structured data; Accordingly, generating an edited first software object based on the edited structured data includes: A first software object is created based on the copied structured data to obtain the copied first software object.
4. The method according to claim 1, wherein Before responding to the editing operation on the first software object, the method further includes: In response to the object creation operation, obtaining original data in a second set format; Converting the raw data in the second set format into set structured data; The first software object is created based on the structured data.
5. The method according to claim 1, characterized in that After generating the edited first software object based on the edited structured data, the method further includes: In response to an undo edit operation on the first software object, comparing the structured data with the edited structured data to obtain difference state parameters; wherein the difference state parameters include pre-edit state parameters and post-edit state parameters; Copying the difference state parameter to obtain the copied difference state parameter; The corresponding state parameters in the edited first software object are modified according to the pre-editing state parameters in the copied abnormal state parameters to obtain the first software object after the editing is undone.
6. The method according to claim 5, characterized in that After obtaining the first software object after undoing the editing, the method further includes: In response to a redo operation on the undone edited first software object, corresponding state parameters in the undone edited first software object are modified according to the edited state parameters in the copied abnormal state parameters to obtain a redone first software object.
7. The method according to claim 1, characterized in that Performing the editing operation on the structured data includes: Obtaining a data type of the first software object; determining an execution strategy for the editing operation according to the data type; The editing operation is performed on the structured data based on the execution policy.
8. A software object processing device, characterized in that: include: a data conversion module, configured to convert the state information of the first software object into predetermined structured data in response to an editing operation on the first software object; an editing operation execution module, configured to execute the editing operation on the structured data to obtain edited structured data; A generating module is configured to generate an edited first software object based on the edited structured data.
9. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the software object processing method according to any one of claims 1 to 7.
10. A storage medium comprising computer-executable instructions, wherein the computer-executable instructions are used to execute the method for processing a software object according to any one of claims 1 to 7 when executed by a computer processor.
Citation Information
Cited By
Cross-end copying method and related device
CN121597446A
A cross-end copy method and related apparatus
CN121597446B