Module processing method, device and storage medium for use in foreground / background separation system
Patent Information
- Application Number
- JP2024537143
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-12-20
- Filing Date
- 2022-12-13
- Publication Date
- 2025-01-31
- Estimated Expiration
- 2042-12-13
AI Technical Summary
【0013】 本発明の実施例により提供される技術的解決策がもたらす有益な効果は、少なくとも以下を含む。
Smart Images

Figure 0007625149000001 
Figure 0007625149000002 
Figure 0007625149000003
Abstract
Description
[Technical field]
[0001] The present invention relates to the field of computer technology, and more particularly to a modular processing method, apparatus and storage medium for use in a foreground / background separation system. [Background technology]
[0002] A foreground / background separation system is a system in which the foreground and background are independent of each other, the foreground may refer to an interface layer and the background may refer to a functional layer.
[0003] The foreground is used to provide an interactive interface that displays a flowchart containing multiple modules, and allows a user to trigger operations on specific modules.
[0004] The background is used to perform the data logic functions corresponding to the operations and to provide data storage functions.
[0005] After a user triggers an operation on a module in the foreground, there are often scenarios where the user typically needs to cancel the operation or re-execute the operation after canceling it.
[0006] In the above scenario, how to undo or redo the operation may involve synchronization of foreground and background data, so there is a need to consider a module processing method for use in a foreground / background separated system that allows a user to undo or redo operations on modules in the foreground / background separated system. Summary of the Invention [Means for solving the problem]
[0007] SUMMARY OF THE PREFERRED EMBODIMENTS An embodiment of the present invention provides a modular processing method, apparatus and storage medium for use in a foreground / background separated system, which can realize undo or redo of a user operation in the foreground / background separated system.
[0008] According to a first aspect, there is provided a module processing method for a foreground / background separation system, the foreground / background separation system including a foreground and a background, an interactive interface is displayed in the foreground, the interactive interface is used to display a plurality of modules, a data center is disposed in the background, the data center is used to store module data of each of the plurality of modules, the module data includes a display method of the module, function data of the module, and a logical relationship between the module and each of the other modules; In response to a target operation on a target module, the foreground controls the background to update data corresponding to the target module in the data center based on the target operation, and the foreground updates the interactive interface based on the data corresponding to the updated target module, the target module being one or more of the multiple modules; When a cancellation command for the target operation is detected, the foreground controls the background to restore the data corresponding to the target module in the data center based on the cancellation command, and the foreground updates the interactive interface based on the data corresponding to the target module after restoration.
[0009] According to a second aspect, there is provided a module processing device for use in a foreground / background separation system, the foreground / background separation system including a foreground and a background, an interactive interface is displayed in the foreground, the interactive interface is used to display a plurality of modules, a data center is disposed in the background, the data center is used to store module data of each of the plurality of modules, the module data includes a display method of the module, function data of the module, and a logical relationship between the module and each of the other modules; a first control module for, in response to a target operation on a target module, controlling the foreground to control the background to update data corresponding to the target module in the data center based on the target operation, and foreground to update the interactive interface based on the data corresponding to the updated target module, the target module being one or more of the plurality of modules; A module processing device for use in a foreground and background separation system is provided, the module processing device including: when a cancel command for the target operation is detected, a second control module for causing the foreground to control the background to restore the data corresponding to the target module in the data center based on the cancel command, and causing the foreground to update the interactive interface based on the data corresponding to the restored target module.
[0010] According to a third aspect, there is provided a method for implementing a method for controlling a multi-threaded memory device, comprising: a memory for storing processor executable instructions, said memory comprising: There is provided a module processing device for use in a foreground / background separation system, wherein the processor is configured to execute any of the steps in the module processing method for use in a foreground / background separation system provided by the first aspect above.
[0011] According to a fourth aspect, there is provided a computer readable storage medium having instructions stored thereon which, when executed by a processor, perform any of the steps of a module processing method for use in a foreground and background separation system provided by the first aspect above.
[0012] According to a fifth aspect, there is provided a computer program product comprising instructions which, when executed on a computer, cause the computer to perform any of the steps of a modular processing method for use in a foreground and background separation system provided by the first aspect above.
[0013] The beneficial effects brought about by the technical solutions provided by the embodiments of the present invention at least include:
[0014] In the foreground and background separation system provided by the embodiment of the present invention, the module data stored in the data center of the background includes the display manner of the module, the function data of the module, and the logical relationship between the modules, that is, the foreground data and the background data are stored simultaneously in the background. As can be seen, in the embodiment of the present invention, the background functions as the data center of all data. In this way, when the foreground detects a target operation on a target module, it controls the background to update the foreground and background data, and when the target operation is canceled, it controls the background to update the foreground and background data in the same way, thereby ensuring the consistency between the content displayed on the foreground interactive interface during the execution of the target operation or the cancellation of the target operation, and the foreground and background data. In order to more clearly describe the technical solutions in the embodiments of the present invention, the following will briefly describe the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative efforts. [Brief description of the drawings]
[0015] [Figure 1] 1 is a schematic architecture diagram of a foreground and background separation system provided by an embodiment of the present invention; [Diagram 2] 4 is a flow chart of a module processing method for a foreground and background separation system provided by an embodiment of the present invention. [Diagram 3] FIG. 2 is a schematic diagram of a flow chart provided by an embodiment of the present invention. [Figure 4] FIG. 4 is a schematic diagram of another flow chart provided by an embodiment of the present invention. [Diagram 5]FIG. 2 is a schematic diagram of a module deletion provided by an embodiment of the present invention; [Figure 6] 4 is a flow chart of a module processing method for another foreground and background separation system provided by an embodiment of the present invention. [Figure 7] FIG. 2 is a structural schematic diagram of a module processing device used in the foreground and background separation system provided by an embodiment of the present invention; [Figure 8] FIG. 2 is a structural schematic diagram of a terminal provided according to an embodiment of the present invention; [Figure 9] FIG. 2 is a structural schematic diagram of a server provided by an embodiment of the present invention; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0016] In order to make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the following describes the embodiments of the present invention in more detail with reference to the drawings.
[0017] In a foreground / background separation system, the foreground is used to display the software interface and provide an interactive interface that the user can operate, while the background provides specific functional logic and record data.Typical C / S (client / server) and B / S (browser / server) systems are both types of foreground / background separation systems.
[0018] Currently, in the machine vision industry or other industries, a certain combination function is realized by pre-extracting several different functional modules (functional modules are also called functional units) and combining these functional modules. The process of arranging the functional modules in a certain order and setting the relationships between them is process setting. The software that provides the process setting function is a process setting system. Considering that the interactive interface provided by the foreground of the process setting system is usually a graphical flowchart, the process setting system is also called a graphical process setting system.
[0019] The process setting system is a typical foreground and background separation system. The module processing method provided by the embodiment of the present invention can be applied to the process setting system. Optionally, the module processing method provided by the embodiment of the present invention can also be applied to other foreground and background separation systems, and the embodiment of the present invention is not limited thereto.
[0020] To facilitate the following discussion, we will now briefly discuss two concepts relevant to embodiments of the present invention.
[0021] Undo: When a user interacts with a software system, it is up to the user's needs to restore the state of the software to the state before the last operation, which is a single undo. Undo can be serialized, i.e., multiple undos can be performed to restore the state before multiple operations.
[0022] Redo: The opposite of Undo, if the software has reached a certain state through undo, then Redo is the process of advancing the software state to the state before the last undo, at the user's request. Redo can also be serialized, i.e. redo multiple times to restore the state before multiple undos.
[0023] The purpose of Undo or Redo is to reset the state of the software to the state it was in after any operation between the last operation and the previous N operations, i.e. to give the user a chance to undo their actions.
[0024] In a foreground / background separated system, the foreground provides an interactive interface for users to operate, and the background provides data logic functions and storage. In such a system, how to realize undo or redo while ensuring synchronization of data between the foreground and background, and how to realize undo or redo of user-triggered operations when a change in a single functional module causes changes in multiple functional modules in a process setting system are all hot topics of current research. The module processing method provided by the embodiment of the present invention can realize the above two techniques, and the specific implementation manner will be described in detail in the subsequent embodiment.
[0025] 1 is an architecture schematic diagram of a foreground and background separation system provided by an embodiment of the present invention. As shown in FIG. 1, the foreground and background separation system includes a foreground and a background.
[0026] Here, the interactive interface provided by the foreground displays module 1, module 2, and the connection relationship between module 1 and module 2. At the same time, module 1 is displayed according to a specific display manner, and module 2 is also displayed according to a specific display manner. FIG. 1 illustrates the display manner of module 2, which specifically includes that the position coordinates of the upper left corner of module 2 are (200, 300), the height of module 2 is 30, the width of module 2 is 90, and the color of module 2 is orange.
[0027] The display methods of the above-mentioned modules 1 and 2 may be called foreground data, where the foreground data is also called interface data.
[0028] The background provides specific logical functions. As shown in Figure 1, the following codes are stored in the background: (Process 0: Module 1 Functional Data Module 2 Functional Data Connection relationship: Module 1 points to Module 2).
[0029] What this code shows is that what is displayed in the foreground is a flowchart, which includes two functional modules, module 1 and module 2, and the connection relationship is that module 1 points to module 2, that is, the output of module 1 is the input of module 2.
[0030] The function data of module 1 in the above code indicates the internal execution logic of module 1, which is used to indicate how to obtain the output of module 1 based on the input of module 1. The function data of module 2 indicates the internal execution logic of module 2, which is used to indicate how to obtain the output of module 2 based on the input of module 2. The above code is generally called background data, that is, in the embodiment of the present invention, the background data indicates the function data of each module among the multiple modules displayed in the foreground interactive interface and the logical relationship between the multiple modules. Here, the background data is also called underlying data, and the background is also called the underlying layer.
[0031] As shown in FIG. 1, two modules are placed in the foreground interactive interface, where the upper left corner of module 2 is at coordinates (200, 300), the width is 90, the height is 30, and the color is orange. The background stores the logical relationship between the modules and the function data of each module. If module 2 is deleted, for the background, not only will the function data of module 2 be reduced from the background data, but also one connection relationship will be reduced. When performing the undo operation, in addition to the need to restore the function data of module 2 and the connection relationship between module 2 and module 1 in the background, the position, length, width, and color in the foreground interactive interface must also be restored to fully restore the state before the delete operation.
[0032] In such a scenario, if the foreground data is stored in the foreground and the background data is stored in the background, when canceling the delete operation, the foreground data and the functional data and the logical relationship need to be restored in the foreground and in the background, respectively, and thus, it is easy to cause data inconsistency between the foreground and the background. Therefore, in the embodiment of the present invention, all data is set to be stored in a single center, which is the background. In this way, the foreground data is also stored in the background, and when canceling, the data stored in the background is restored, and the foreground obtains the foreground data from the background. That is, the foreground is only used to obtain and display the foreground data from the background, and does not store data, so that the problem of possible data inconsistency is solved. In the embodiment of the present invention, since both the foreground data and the background data are stored in the background, for the convenience of the following description, the data stored in the background is collectively referred to as module data. That is, the module data includes the foreground data and the background data. Specifically, the module data of any module includes the display method of the module, the functional data of the module, and the logical relationship between the module and each of the other modules.
[0033] It should be noted that the foreground / background separation system shown in FIG. 1 is merely an example and does not limit the foreground / background separation system according to the embodiment of the present invention.
[0034] 2 is a flow chart of a module processing method for a foreground / background separation system provided by an embodiment of the present invention. The method is applied to a foreground / background separation system including a foreground and a background. An interactive interface is displayed in the foreground, and the interactive interface is used to display a plurality of modules. A data center is disposed in the background, and the data center is used to store module data of each module among the plurality of modules, and the module data of any module includes a display manner of the module, function data of the module, and a logical relationship between the module and each other module. Specifically, as shown in FIG. 2, the method includes the following steps:
[0035] In step 201, in response to a target operation on a target module, the foreground controls the background to update data corresponding to the target module in the data center based on the target operation, and the foreground updates the interactive interface based on the data corresponding to the updated target module, where the target module is one or more modules among the multiple modules, and the target operation is any operation on the target module.
[0036] Here, the data corresponding to the target module includes the module data of the target module in the data center and the data related to the target module in the module data of other modules, which will be described in detail later and will not be described here.
[0037] The target operation may be a delete operation for a target module, an add operation for a target module, or a change operation for an attribute of the target module, such as a display color, etc. Here, the delete operation specifically refers to deleting a target module displayed in an interactive interface, and the add operation specifically refers to adding a target module to the interactive interface.
[0038] Exemplarily, when the target operation is a delete operation for the target module, step 201 specifically refers to controlling the foreground to delete the module data of the target module in the data center and the data related to the target module in the module data of other modules based on the target operation, and re-displaying the interactive interface based on the data center from which the data is deleted.
[0039] As another example, when the target operation is an add operation for a target module, step 201 specifically refers to controlling the foreground to add module data of the target module to a data center and add data related to the target module to the module data of other modules based on the target operation, and re-displaying the interactive interface based on the data center to which the data is added.
[0040] In one possible embodiment, the interactive interface displays a module remove control and a module add control, and when the foreground detects a user selection operation on the module remove control and module add control, it may determine that a target operation on a target module has been detected, at which point the target operation can be executed by step 201.
[0041] After detecting the target operation, the foreground controls the background to update data corresponding to the target module in the data center based on the target operation, and updates the interactive interface based on the updated data corresponding to the target module in the data center, thereby achieving consistency of the interactive interface, foreground and background data.
[0042] The data corresponding to the target module includes module data of the target module and data related to the target module in the module data of the other modules. Here, the module data of the target module includes function data of the target module, display manner of the target module, and logical relationship between the target module and each other module. The function data of the target module indicates the internal execution logic of the target module, and the internal execution logic indicates how to obtain the output of the target module based on the input of the target module. The display manner of the target module includes, for example, the display position, display size, display color, etc. of the target module. The data related to the target module in the module data of each other module includes the logical relationship between the other module and the target module.
[0043] In one possible embodiment, the logical relationship between the target module and each other module includes a connection relationship between the target module and the other modules. The connection relationship indicates a connection line relationship between the target module and the other modules on the interactive interface, and the connection line relationship specifically indicates the execution order between the target module and the other modules in the execution process of the flowchart. For example, if the target module is module 1 shown in FIG. 1 and the other module is module 2, the connection relationship between the target module and the other modules may indicate that the internal execution logic of module 1 is executed first, and then the internal execution logic of module 2 is executed.
[0044] Fig. 3 is a schematic diagram of a flowchart provided by an embodiment of the present invention, and when the foreground and background separation system is a process setting system, the flowchart seen in the foreground is usually shown in Fig. 3. The connection relationship between each module in the flowchart shown in Fig. 3 only represents the execution order, and there is data exchange between modules, and the output of the previous module must participate in the operation as the input or parameter of the subsequent module, otherwise this process is meaningless. When inputs and outputs and parameters of the modules themselves are added, the actual flowchart will be more complicated than the flowchart shown in Fig. 3.
[0045] FIG. 4 is a schematic diagram of another flow chart provided by an embodiment of the present invention. As shown in FIG. 4, in addition to the connection relationship between modules, there is a subscription relationship between internal complex parameters, inputs, and outputs. For example, the internal parameters of a module may be the output of the previous module in the execution order, and the output of the module may be the internal parameters of the next module in the execution order, or the output of a module may be the input of the next module in the execution order. That is, a module may subscribe to the input or output of a previous module. Therefore, a flow chart is a very complex unidirectional network. When a module is deleted, it not only affects the module itself, but also affects the subscription relationships between all subsequent modules in the flow chart and it and its predecessor modules.
[0046] Thus, in another possible embodiment, the logical relationship between the goal module and each other module may further include, in addition to the connection relationship between the goal module and the other module, a subscription relationship between the goal module and the other module, which indicates an association relationship between at least one of the internal parameters, inputs of the goal module and the output of the other module, and / or an association relationship between the output of the goal module and at least one of the internal parameters, inputs of the other module, and / or an association relationship between the input of the goal module and the output of the other module.
[0047] That is, in the embodiment of the present invention, for any module, the logical relationship between the module and the other module includes a connection relationship between the module and the other module and a subscription relationship between the module and the other module. The connection relationship indicates a connection line relationship between the module and the other module on a display interface. The subscription relationship indicates an association relationship between an internal parameter of the module and an output of the other module, and / or an association relationship between an output of the module and an internal parameter of the other module, and / or an association relationship between an output of the module and an input of the other module, and / or an association relationship between an input of the module and an output of the other module. That is, the subscription relationship indicates an association relationship between at least one of the internal parameters, inputs of the module and the output of the other module, and / or an association relationship between the output of the module and at least one of the internal parameters, inputs of the other module.
[0048] The internal parameters of each module may be one or more. The output of each module may be one or more, and the input of each module may be one or more. The above-mentioned association relationship is a superordinate association relationship, and may include an association relationship between one specific parameter and another specific parameter, or may include an association relationship between each of a plurality of parameters and another parameter. For example, the association relationship between the internal parameter of the target module and the output of the other module may be that one output of another module is one internal parameter of the target module, or two outputs of another module are two internal parameters of the target module, or one output of each of two other modules is one of the two internal parameters of the target module. The above is merely an example, and does not limit the association relationship according to the embodiment of the present invention.
[0049] In step 202, if a cancellation command for the target operation is detected, the foreground controls the background to restore data corresponding to the target module in the data center based on the cancellation command, and the foreground updates the interactive interface based on the data corresponding to the restored target module.
[0050] In one possible embodiment, an undo operation control is displayed on the interactive interface, and when the foreground detects a user selection operation on the undo operation control, it may determine that an undo command for the target operation has been detected, in which case an undo process for the target operation can be performed by step 202.
[0051] If the target operation is a delete operation for the target module, the above step 202 specifically refers to the foreground controlling the background to re-add the data corresponding to the target module to the data center according to the cancel command.
[0052] If the target operation is an add operation to the target module, the above step 202 specifically refers to the foreground controlling the background to delete data corresponding to the target module from the data center according to the cancel command.
[0053] In the embodiment of the present invention, step 201 and step 202 may be specifically foreground-centered or background-centered. Here, foreground-centered refers to recording each specific operation of performing a target operation in the foreground, and background-centered refers to recording each specific operation of performing a target operation in the background, that is, the difference between the two is whether the file recording the specific operation is saved in the foreground or the background. The following will explain the two implementation methods separately.
[0054] (1) Centered on the foreground
[0055] In this case, the implementation process of the above step 201 may be that the foreground sends one or more first data update commands to the background based on the target operation, any one of the one or more first data update commands is used to instruct the background to update a portion of the data corresponding to the target module, and the foreground generates an operation record based on the sending of the one or more first data update commands.
[0056] For example, when the target operation is a module deletion or a module addition, the foreground sends a first logical relationship update command and a first module update command to the background, and generates an operation record for sending the first logical relationship update command and the first module update command. The first logical relationship update command is used to instruct the background to update the logical relationship between the other modules and the target module in the module data of each other module in the data center based on the target operation, and the first module update command is used to instruct the background to update the module data of the target module in the data center based on the target operation.
[0057] The operation record is used to indicate the order in which each of the first data update commands was sent and the data modification status indicated by each command.
[0058] In this case, the implementation process of the above step 202 may be that the foreground sends one or more second data update instructions to the background based on the inverse operation of the target operation indicated by the operation record, and any one of the one or more second data update instructions is used to instruct the background to restore the logical relationship between the other modules and the target module in the module data of each other module to the state before the target operation was executed, or to restore the module data of the target module to the state before the target operation was executed.
[0059] For example, in a scenario where the target operation is a module deletion or a module addition, the foreground sends a second logical relationship update command and a second module update command to the background according to the inverse operation of the target operation indicated by the operation record, the second logical relationship update command is used to instruct the background to restore the logical relationship between the target module and other modules in the module data of each other module in the data center to a state before the target operation is performed, and the second module update command is used to instruct the background to restore the module data of the target module in the data center to a state before the target operation is performed, so that the foreground can then obtain data corresponding to the updated target module from the background and update the interactive interface according to the data corresponding to the updated target module.
[0060] Specifically, when the target operation is a delete operation on the target module, the foreground first sends a first logical relationship update command to the background when performing the target operation, and then sends a first module update command. In this way, the background can be controlled to first delete the logical relationship between the target module and the other modules in the module data of each other module, and then delete the module data of the target module, and generate an operation record of first sending a first logical relationship update command and then sending the first module update command. When canceling the target operation, based on the reverse operation of the target operation indicated by the operation record, the foreground first sends a second module update command to the background, and then sends a second logical relationship update command. In this way, the background can be controlled to first restore the module data of the target module in the data center, and then restore the logical relationship between the target module and the other modules in the module data of each other module.
[0061] Similarly, if the target operation is an add operation for the target module, when executing the target operation, the foreground first sends a first module update command to the background, and then sends a first logical relationship update command. In this way, the background can be controlled to first add module data of the target module to the data center, and then add logical relationships between the target module and the other modules to the module data of each other module in the data center, and generate an operation record of first sending a first module update command and then sending a first logical relationship update command. When canceling the target operation, based on the reverse operation of the target operation indicated by the operation record, the foreground first sends a second logical relationship update command to the background, and then sends a second module update command. In this way, the background can be controlled to first delete the logical relationships between the target module and the other modules in the module data of each other module in the data center, and then delete the module data of the target module in the data center.
[0062] The purpose of sending commands in the above order is to allow the foreground to cancel the target operation by performing a completely reverse operation of the target operation, thereby avoiding the inability to return to the state before the target operation was executed.
[0063] For example, if the target operation is a delete operation for module 2 shown in FIG. 1, taking the foreground as the center, the specific process of steps 201 and 202 is as follows:
[0064] When performing a target operation, it involves several processes:
[0065] 1) The foreground sends a module data acquisition command to the background, and the foreground receives data corresponding to a target module sent from the background, and the data corresponding to the target module includes the module data of the target module and data related to the target module in the module data of each other module.
[0066] 2) The foreground analyzes the acquired data corresponding to the target module, and determines that in order to delete the target module, it is necessary to first delete the logical relationship between the target module and the other modules in the module data of each other module, and then delete the module data of the target module. Based on the analysis result, the foreground sends a connection line deletion command to the background, i.e., sends the above-mentioned first logical relationship update command to instruct the background to delete the logical relationship between the target module and the other modules in the module data of the other modules in the data center, and generates an operation record corresponding to the sending of the first logical relationship update command, and for the convenience of the following description, the operation record is referred to as the first operation record. Here, when deleting the logical relationship, the background first backs up the connection data related to the target module to another storage location, i.e., backs up the logical relationship between the target module and each other module, and then deletes the connection data related to the target module in the background data, so that the deleted data can be quickly restored later.
[0067] 3) The foreground sends a module deletion command to the background, i.e., sends the first module update command to instruct the background to delete the module data of the target module, and generates an operation record corresponding to the sending of the first module update command, and for the convenience of the following description, the operation record is referred to as a second operation record. Here, when the background deletes the module data of the target module, the background backs up the module data of the target module to another storage location, and then deletes the module data of the target module in the background data, so that the deleted data can be quickly restored later.
[0068] When canceling a target operation, it includes several processes as follows.
[0069] 1) Since the first operation record is generated before the second operation record, in order to realize the inverse operation of the above target operation, the foreground first sends a module import command to the background based on the second operation record, that is, sends the above second module update command, instructing the background to add module data of the target module to the data center.
[0070] 2) Then, based on the first operation record, the foreground sends a connection establishment command between module 1 and module 2 to the background, i.e., sends the above-mentioned second logical relationship update command, instructing the background to add the logical relationship between the target module and each other module to the module data of each other module in the data center.
[0071] 3) The foreground acquires from the background module interface data, which is the display manner of the target module in the module data of the target module, and re-displays the target module in the interactive interface based on the acquired display manner.
[0072] The entire process is driven by the foreground, with the background passively responding and providing the basic interface for data acquisition and import.
[0073] At present, sending a command from the foreground to the background is realized by calling an interface of the background, that is, the background provides a series of interfaces. When the foreground needs to send a command, it calls an interface of the background to send the command, and controls the background to perform a specific operation. For example, the background provides a logical relationship deletion interface and a module deletion interface. In such a scenario, when the target operation is a module deletion, the first logical relationship update command sent from the foreground to the background can be realized by calling the logical relationship deletion interface, and the first module update command sent from the foreground to the background can be realized by calling the module deletion interface.
[0074] In the above-mentioned foreground-centric implementation method, the foreground is most familiar with the specific operation procedures and scope of impact, while the background only provides an interface and does not need to be involved in specific tasks, making the system more stable during the cancellation process.
[0075] (2) Focus on the background
[0076] In this case, the implementation process of the above step 201 may be that the foreground updates an interactive interface according to the target operation, and the foreground sends an update command to the background, which is used to instruct the background to update the logical relationship between the other modules and the target module in the module data of each other module in the data center and the module data of the target module in the data center according to the target operation. At the same time, the background generates an operation record corresponding to each of the above operations.
[0077] Accordingly, the implementation process of the above step 202 may be that the foreground sends a restoration command to the background, and the restoration command is used to instruct the background to restore the logical relationship between the other modules in the module data of each other module in the data center and the target module and the module data of the target module in the data center to a state before the target operation is executed based on the reverse operation of the target operation indicated by the locally stored operation record. The foreground obtains the display manner in the module data of the updated target module from the background, and updates the interactive interface according to the updated display manner.
[0078] For example, if the target operation is a delete operation for module 2 shown in FIG. 1, taking the background as the center, the specific process of steps 201 and 202 is as follows:
[0079] When performing a target operation, it involves several processes:
[0080] 1) When the foreground detects a module cleanup command, it first deletes the target module on the interactive interface, and then sends a module deletion command including the identifier of the target module to the background.
[0081] 2) after receiving a module deletion command, the background first backs up connection data related to the target module in the module data of each other module to another storage location, then deletes the connection data related to the target module in the module data of each other module in the data center, generates an operation record corresponding to the deletion operation of the connection data, and marks it as a third operation record, where the connection data related to the target module in the module data of each other module indicates a logical relationship between the target module and the other module.
[0082] 3) The background backs up the module data of the target module to another storage location, deletes the module data of the target module in the data center, generates an operation record corresponding to the deletion operation of the module data, and marks it as the fourth operation record.
[0083] When canceling a target operation, several processes are involved:
[0084] 1) The foreground sends a cancel command to the background.
[0085] 2) The background queries the operation records, and determines based on the above fourth operation record that the last operation is to delete the module data of the module, and performs the inverse operation of deleting the module data of the module, that is, imports the module data of the target module from the backed up data to the data center.
[0086] 3) The background queries the operation records, and based on the above third operation records, determines that the operation before deleting the module data is to delete the module connection data, and performs the reverse operation of deleting the module connection data, that is, adds the connection data related to the target module in the module data of each other module from the backed up data to the data center.
[0087] 4) The background notifies the foreground that the cancellation is completed, and the foreground obtains the latest display method of the target module from the background and updates the interactive interface.
[0088] The whole process is driven by the command sent from the foreground, and the background provides all data recording and reverse operations to realize data deletion and restoration. The foreground queries and updates data. In addition, in the above foreground-centric implementation mode, the foreground is most familiar with the specific operation procedure and impact scope, which is convenient for developers to constantly grasp and control the actual processing status of the target operation. Therefore, when the embodiment of the present invention is applied, it is preferable to adopt the foreground-centric implementation mode.
[0089] In addition, there are various possible methods for the actual implementation of deleting the data corresponding to the above-mentioned target module. As shown in Fig. 4, the actual flow chart is very complicated, and in this case, when the target operation is a delete operation on the target module, in order to deal with the undo and redo in such a complex relationship, there are two kinds of policies for the scenario of relatively complicated deletion and then undo.
[0090] 1) Temporary deletion policy: when a target module is deleted based on a target operation, the module data of the target module is only marked for deletion, but is not actually deleted, and the logical relationship between each other module and the deleted target module is cleaned up. When the target operation is canceled, the deletion mark is removed, and the logical relationship between each other module in the data center and the target module is restored.
[0091] That is, in the temporary deletion policy, a specific implementation manner of the foreground sequentially sending one or more first data update commands to the background based on the target operation may be that the foreground first sends a first logical relationship update command to the background, and then sends a first module update command. After that, when the background receives the first logical relationship update command, the background deletes the logical relationship between the other modules and the target module in the module data of each other module, and when the background receives the first module update command, a deletion mark is added to the module data of the target module in the data center.
[0092] Accordingly, a specific implementation manner of the foreground sequentially sending one or more second data update commands to the background based on the inverse operation of the target operation instructed by the operation record may be that the foreground first sends a second module update command to the background, and then sends a second logical relationship update command based on the inverse operation of the target operation instructed by the operation record, and when the background receives the second module update command, it deletes the deletion mark in the module data of the target module, and when the background receives the second logical relationship update command, it adds the logical relationship between the other modules and the target module to the module data of each other module.
[0093] 2) Export-import policy. When deleting a goal module based on a goal operation, export the data corresponding to this goal module, and then clean up the data corresponding to the goal module. When canceling, import the module data of the goal module, and restore the connection and subscription relationship between each other module and the goal module based on the data previously exported. That is, when deleting data, export the related data first, and then directly delete the related data in the data center.
[0094] That is, in the export-import policy, a specific implementation manner of the foreground sequentially sending one or more first data update commands to the background based on the target operation may be that the foreground first sends a first logical relationship update command to the background, and then sends a first module update command, so as to control the background to first delete the logical relationship between the target module and each other module in the module data of each other module in the data center, and then delete the module data of the target module.
[0095] Accordingly, a specific implementation manner of the foreground sequentially sending one or more second data update commands to the background based on the inverse operation of the target operation indicated by the operation record may be that the foreground first sends a second module update command to the background, and then sends a second logical relationship update command based on the inverse operation of the target operation indicated by the operation record, so as to control the background to first restore the module data of the target module in the data center, and then restore the logical relationship between the target module and the other modules in the module data of each other module.
[0096] In addition, in the above temporary deletion policy, due to the synchronization of foreground and background data, if the foreground and background only perform mark deletion after deleting one module, it is necessary to perform special processing on the mark deletion module to ignore it and not trigger execution when executing the entire flowchart. If there is a lot of such special data, it will affect the maintainability of the foreground and background data and become unstable. Therefore, when the embodiment of the present invention is applied, it is preferable to adopt an export-import policy to delete the target module.
[0097] In addition, in the above export-import policy, in order to facilitate the rapid restoration of deleted data later, the foreground may first send a first logical relationship update command to the background, and then before sending the first module update command, the foreground may control the background to export data corresponding to the target module in the data center and back it up to a reference storage location. After this, the foreground may first send a second module update command to the background, and then after sending the second logical relationship update command, in response to the received second module update command, the background imports the module data of the target module from the reference storage location to the data center, and in response to the received second logical relationship update command, the background imports the logical relationships between the target module and each of the other modules from the reference storage location to the data center.
[0098] In addition, in the embodiment of the present invention, when the target operation is a module deletion operation, the same target operation may be performed on multiple modules at the same time, that is, there is a scenario in which a bulk deletion operation is performed. When a bulk deletion operation is performed, the number of target modules in step 201 and step 202 is multiple.
[0099] In such a scenario, there may be two kinds of policies to realize the execution and cancellation of the above target operations: one is operation-centric and the other is data-centric.
[0100] First policy: Operations-centric.
[0101] Here, operation-centric refers to dividing a target operation into multiple sub-operations for a single module when performing a target operation for multiple target modules, i.e., each sub-operation is for only one module, and the target operation for multiple target modules is realized by sequentially performing the multiple sub-operations according to the execution order of the multiple sub-operations. When performing the target operations for multiple target modules, an operation record for the sub-operation is generated and stored every time a sub-operation is performed. When canceling the target operations for the multiple target modules, the cancellation is completed according to the reverse operation of the sub-operation indicated by the stored operation record.
[0102] In the operation-centric policy, the specific implementation manner of the foreground first sending the first logical relationship update command to the background is as follows: the foreground sends a subscription relationship deletion command A to the background, and the subscription relationship deletion command A is used to instruct the background to delete, for each target module, the subscription relationships between the post-execution module and each of the pre-execution module and the target module, where the post-execution module is a module executed after the target module in the flowchart displayed in the foreground, and the pre-execution module is a module executed before the target module in the flowchart; the foreground sends a subscription relationship deletion command B to the background, and the subscription relationship deletion command B is used to instruct the background to delete the subscription relationships between multiple target modules; The foreground may send a subscription relationship deletion command C to the background, which is used to instruct the background to delete the subscription relationships between each goal module and the previous execution module; the foreground may send a connection relationship deletion command A to the background, which is used to instruct the background to delete the connection relationships between the post-execution module and each of the goal modules; the foreground may send a connection relationship deletion command B to the background, which is used to instruct the background to delete the connection relationships between multiple goal modules; and the foreground may send a connection relationship deletion command C to the background, which is used to instruct the background to delete the connection relationships between each goal module and the previous execution module.
[0103] After sending the first logical relationship update command in the above implementation manner, the foreground sends a first module update command to the background, and controls the background to delete remaining data in the module data of each of the multiple target modules.
[0104] That is, in the operation-centric policy, the foreground first analyzes the subscription relationships and connection line relationships between multiple target modules and between each target module and each other module among the multiple target modules, deletes these subscription relationships and connection line relationships through multiple first logical relationship update commands, and then deletes the module data of each target module.
[0105] Second policy: Data at the heart.
[0106] Taking data as the center means that when performing a target operation on a plurality of target modules, the plurality of target modules are treated collectively, and when it is necessary to delete the plurality of target modules, the module data of the plurality of target modules is deleted collectively, and then the logical relationships between the edge target modules and other modules in the plurality of target modules are updated. An edge target module is a target module among the plurality of target modules that has a logical relationship with other modules. An operation record is generated similarly when updating the module data and the logical relationships, and when canceling a target operation on the plurality of target modules, the cancellation is completed according to the reverse operation of the target operation instructed by the stored operation record.
[0107] In a data-centric policy, a specific implementation manner of the foreground first sending a first logical relationship update command to the background and then sending a first module update command may be: the foreground sending a first subscription relationship deletion command to the background, where the first subscription relationship deletion command is used to instruct the background to delete the subscription relationship between the other module and the edge target module in the module data of each other module; the foreground sending a first connection relationship deletion command to the background, where the first connection relationship deletion command is used to instruct the background to delete the connection relationship between the other module and the edge target module in the module data of each other module; the foreground sending a first module deletion command to the background, where the first module deletion command is used to instruct the background to delete the module data of multiple target modules.
[0108] That is, in the data-centric policy, the foreground can analyze the subscription relationships and connection line relationships between the edge target module and other modules in multiple target modules, delete these subscription relationships and connection line relationships through multiple first logical relationship update commands, and then delete the module data of each target module. Since it is not necessary to delete the subscription relationships or connection line relationships inside each target module one by one, the time required for target operation is saved.
[0109] Fig. 5 is a schematic diagram of deleting a module provided by an embodiment of the present invention, which is applied to a delete operation, cancel an add operation, redo a delete operation, etc. As shown in Fig. 5, there are two kinds of policies when deleting modules 2 to 5 in the flowchart.
[0110] First, with the operation as the center, the collective operation is decomposed into a combination of sub-operations for a single module, and each sub-operation is specifically as follows:
[0111] 1) The subscription relationships between modules 6 to 10 and modules 1 to 5 are deleted in sequence, that is, the subscription relationships between each of modules 6 to 10 and modules 1 to 5 are deleted, respectively.
[0112] 2) The subscription relationships between modules 3 to 5 and modules 1 and 2 are deleted in sequence, that is, the subscription relationships between each of modules 3 to 5 and modules 1 and 2 are deleted, respectively.
[0113] 3) Delete the subscription relationship between module 2 and module 1.
[0114] 4) The connection line between module 6 and module 3, the connection line between module 7 and module 4, and the connection line between module 8 and module 5 are sequentially deleted, i.e., the connection relationship between module 6 and module 3, the connection relationship between module 7 and module 4, and the connection relationship between module 8 and module 5 are deleted, respectively.
[0115] 5) The connection lines between modules 3 to 5 and module 2 are sequentially deleted. In other words, the connection relationships between each of modules 3 to 5 and module 2 are deleted.
[0116] 6) The connection line between module 2 and module 1 is deleted, that is, the connection relationship between module 2 and module 1 is deleted.
[0117] 7) Modules 3 to 5 are deleted in sequence, that is, the module data of each of modules 3 to 5 is deleted.
[0118] 8) Delete module 2, i.e., delete the module data of module 2.
[0119] When canceling, the deletion operations for modules 2 to 5 are canceled by executing steps 8) to 1) in the reverse order to add module data, connection relationships, and subscription relationships one by one.
[0120] Second, a data-centric bulk import and export policy.
[0121] 1) The module data of modules 2 to 5 in the data center is handled collectively, exported, and backed up to a reference location.
[0122] 2) In the module data of modules 6-10, the subscription relationships between modules 1-5 are deleted, and an operation record is generated. That is, modules 6-10 are treated as a whole, and modules 1-5 are also treated as a whole, and in the module data of all modules 6-10, the subscription relationships between modules 1-5 as a whole are deleted, and specifically, the subscription relationships are the subscription relationships between edge modules 3 / 4 / 5 in modules 2-5 and the other modules 6-10.
[0123] 3) In the module data of other modules, the connections between modules 2 to 5 are deleted, the module data of modules 2 to 5 is deleted, and an operation record is generated.
[0124] When cancelled
[0125] 1) Import the module data for modules 2 to 5 all at once.
[0126] 2) Using the operation records, restore the connection lines between other modules and modules 2 to 5. Specifically, this includes the connection relationships between modules 2 to 5 in the module data of module 1, and the connection relationships between any of modules 6 to 10 and modules 2 to 5 in the module data of any of modules 6 to 10.
[0127] 3) Using the operation record, restore the subscription relationships between modules 6-10 and modules 1-5. Specifically, this includes the subscription relationships between modules 2-5 in the module data of module 1, and the subscription relationships between any of modules 6-10 and modules 2-5 in the module data of any of modules 6-10.
[0128] In the first policy above, the problem with converting a bulk operation into multiple single operations is that the processing order determines the undo order, and if the order is wrong, an error will occur when restoring the connection relationships, as the modules have not yet been restored. Even if everything is restored, the flow chart cannot be fully restored to its previous state, since the connection relationships between some modules may be missing. In the second policy above, the bulk import-export policy only needs to record the relationships between the whole and its surroundings that are exported together, and the internal relationships of the exported whole are included in the module data of the exported module. When performing undo or redo, the module data of the module can be imported first, and the surrounding relationships between each other module and the whole can be restored.
[0129] In addition, in an embodiment of the present invention, the policy centered on the operation of the first policy is applied to undo and redo scenarios where the data of a single module is changed, for example, changing the position or color of a module, and then performing the reverse operation of changing the position or color is the most economical and efficient way.
[0130] Therefore, in one possible embodiment, when the number of target modules is one, before the foreground sends one or more first data update commands to the background based on the target operation, the foreground may divide the target operation into one or more sub-operations. In this scenario, the one or more first data update commands respectively correspond to one or more sub-operations, and the background completes the target operation based on the one or more sub-operations. That is, the target operation is divided into multiple sub-operations, and the multiple sub-operations are sequentially executed to generate an operation record, and then the target operation can be canceled based on the operation records of the multiple sub-operations.
[0131] Optionally, after the undo operation, the user may undo the undo operation, i.e., perform the operation again, in which case the above redo process can be realized by step 203 shown in FIG.
[0132] In step 203, if a replay command for the target operation is detected, the foreground controls the background to update data corresponding to the target module in the data center based on the target operation, and the foreground updates the interactive interface based on the updated data corresponding to the target module.
[0133] The specific implementation method of step 203 is substantially the same as that of step 201, and therefore the description thereof will be omitted here.
[0134] As described above, in the foreground and background separation system provided by the embodiment of the present invention, the module data stored in the background data center includes the display manner of the module, the function data of the module, and the logical relationship between the modules, that is, the foreground data and the background data are stored simultaneously in the background. As can be seen from this, in the embodiment of the present invention, the background functions as a data center for all data. In this way, when the foreground detects a target operation on a target module, it controls the background to update the foreground and background data, and when the target operation is canceled, it controls the background to update the foreground and background data in the same way, thereby ensuring the consistency between the content displayed on the foreground interactive interface during the execution of the target operation or the cancellation of the target operation, and the foreground and background data.
[0135] The technical effects provided by the embodiments of the present invention will be summarized below.
[0136] An innovation of embodiments of the present invention is that it proposes some realistic and feasible policies for undoing or redoing a foreground / background separation system.
[0137] 1) If there is data in both the foreground and background, a data single center policy can be adopted and all data is stored in the background.
[0138] 2) When the foreground and background are separated, the foreground may be the center of the operation record. When undoing or redoing, the foreground will take the lead in the whole undo process.
[0139] 3) For complex and multi-relational flowcharts, in deletion / revocation scenarios, data export / import method can be adopted instead of temporary deletion policy.
[0140] 4) For complex flow charts with many relationships, when deleting or canceling data in bulk, data export / import can be adopted instead of operation combination method.
[0141] 5) In a flowchart, an operation-centric policy can be adopted for single data changes.
[0142] The above policy can better realize the undo / redo of the foreground / background separation system, and can balance the implementation complexity, memory consumption, and system stability.
[0143] All the optional technical solutions mentioned above can be formed into optional embodiments of the present invention according to any combination, which will not be described one by one in the embodiments of the present invention.
[0144] 7 is a structural schematic diagram of a module processing device used in a foreground / background separation system provided by an embodiment of the present invention, which can be realized by software, hardware, or a combination thereof. The device is applied to a foreground / background separation system including a foreground and a background. An interactive interface is displayed in the foreground, and the interactive interface is used to display a plurality of modules. A data center is disposed in the background, and the data center is used to store module data of each module among the plurality of modules, and the module data of any module includes the display manner of the module, the function data of the module, and the logical relationship between the module and each other module.
[0145] As shown in FIG. 7, the apparatus 700 includes the following modules:
[0146] A first control module 701 is used to, in response to a target operation on a goal module, control the foreground to update the background to update data corresponding to the goal module in the data center based on the target operation, and to cause the foreground to update the interactive interface based on the updated data corresponding to the goal module, wherein the goal module is one or more modules among the multiple modules, and the target operation is any operation on the goal module.
[0147] The second control module 702 is used to, when a cancellation command for the target operation is detected, control the foreground to restore data corresponding to the target module in the data center based on the cancellation command, and to update the interactive interface based on the data corresponding to the restored target module in the foreground.
[0148] Based on the above device, in one possible embodiment, as shown in FIG. 7, the device further includes a third control module 703 for controlling the foreground to update data corresponding to the target module in a data center based on the target operation when a replay command for the target operation is detected, and foreground to update the interactive interface based on the updated data corresponding to the target module.
[0149] Based on the above device, in one possible embodiment, the first control module comprises: causing the foreground to send one or more first data update commands to the background based on the target operation; A first data update command is used to instruct the foreground to generate an operation record based on the transmission of the one or more data update commands, and any one of the one or more first data update commands is used to instruct the background to update a part of data corresponding to the target module; In response, the second control module: The second data update command is used to cause the foreground to sequentially send one or more second data update commands to the background based on an inverse operation of the target operation instructed by the operation record, and any one of the one or more second data update commands is used to instruct the background to restore a portion of the data corresponding to the target module in the data center to a state before the target operation was executed.
[0150] Based on the above device, in one possible embodiment, if the target operation is an add operation for the target module, the first control module: The foreground is used to make the background first send a first module update command, and then send a first logical relationship update command, so that the background first adds module data of the target module to the data center, and then adds logical relationships between the target module and the other modules to the module data of each other module; In response, the second control module: It is used to cause the foreground to first send a second logical relationship update command to the background based on the inverse operation of the target operation instructed by the operation record, and then send a second module update command, so as to control the background to first delete the logical relationship between the target module and the other modules in the module data of each other module in the data center, and then delete the module data of the target module in the data center.
[0151] Based on the above device, in one possible embodiment, if the target operation is a delete operation on the target module, the first control module: Used to make the foreground send a first logical relationship update command to the background, and then send a first module update command to control the background to first delete the logical relationship between the target module and the other modules in the module data of each other module in the data center, and then delete the module data of the target module in the data center; In response, the second control module: It is used to cause the foreground to first send a second module update command and then send a second logical relationship update command based on the inverse operation of the target operation instructed by the operation record, so as to control the background to first restore the module data of the target module in the data center, and then restore the logical relationships between the target module and the other modules in the module data of each other module.
[0152] Based on the above device, in one possible embodiment, if the target operation is a delete operation on the target module, the first control module: The foreground is used to control the background to first send a first logical relationship update command, and then send a first module update command, so as to delete the logical relationship between the other modules and the target module in the module data of each other module in the data center when the background receives the first logical relationship update command, and to control the background to add a deletion mark to the module data of the target module in the data center when the background receives the first module update command; In response, the second control module: This is used to cause the foreground to first send a second module update command and then send a second logical relationship update command based on the inverse operation of the target operation instructed by the operation record, to control the background to delete a deletion mark in the module data of the target module in the data center when the background receives the second module update command, and to control the background to add a logical relationship between the other modules and the target module to the module data of each of the other modules in the data center when the background receives the second logical relationship update command.
[0153] Based on the above device, in one possible embodiment, the device further comprises: an export module for causing the foreground to control the background to first send the first logical relationship update command to the background, and then, before sending the first module update command, to export data corresponding to the target module in the data center and back it up to a reference storage location, the data corresponding to the target module including module data of the target module and logical relationships between the target module and the other modules in the module data of each other module; The foreground includes an import module for causing the background to first send the second module update command and then send the second logical relationship update command, and then, in response to the received second module update command, to import module data of the target module from the reference memory location to the data center, and in response to the received second logical relationship update command, to import the logical relationships between the target module and each of the other modules from the reference memory location to the data center.
[0154] Based on the above-mentioned device, in one possible embodiment, the logical relationship between any one of the multiple modules and each of the other modules includes a connection relationship between any one of the multiple modules and each of the other modules, and a subscription relationship between any one of the multiple modules and each of the other modules, the connection relationship indicating a connection line relationship between any one of the multiple modules and each of the other modules on the interactive interface, and the subscription relationship indicating an association relationship between at least one of the internal parameters or inputs of any one of the multiple modules and an output of each of the other modules, and / or an association relationship between the output of any one of the multiple modules and at least one of the internal parameters or inputs of each of the other modules.
[0155] Based on the above device, in one possible embodiment, when the number of the target modules is plural, the first control module: causing the foreground to send a first subscription relationship deletion command to the background; causing the foreground to transmit a first connection relationship deletion command to the background; used to cause the foreground to send a first module removal command to the background; The first subscription relationship deletion command is used to instruct the background to delete a subscription relationship between the other module and an edge target module in the module data of each other module, and the edge target module is a target module among a plurality of target modules that has a logical relationship with the other module; The first connection relationship deletion command is used to instruct the background to delete a connection relationship between the other module and an edge target module in the module data of each other module; The first module deletion command is used to instruct the background to delete module data of the multiple target modules.
[0156] Based on the above device, in one possible embodiment, when the number of the target modules is plural, the first control module: causing the foreground to transmit a subscription deletion command A to the background; causing the foreground to transmit a subscription relationship deletion command B to the background; causing the foreground to transmit a subscription relationship deletion command C to the background; causing the foreground to transmit a connection relationship deletion command A to the background; causing the foreground to transmit a connection relationship deletion command B to the background; causing the foreground to transmit a connection relationship deletion command C to the background; used to cause the foreground to send a first module removal command to the background; The subscription relationship deletion command A is used to instruct the background to delete, for each of the target modules, a subscription relationship between a post-execution module and each of the target modules, the post-execution module being a module executed after the target module in a flowchart displayed in the foreground, and the pre-execution module being a module executed before the target module in a flowchart; The subscription relationship deletion command B is used to instruct the background to delete a subscription relationship between multiple target modules; The subscription relationship deletion command C is used to instruct the background to delete the subscription relationship between each of the target modules and the previous execution module; The connection relationship deletion command A is used to instruct the background to delete the connection relationship between the post-execution module and each of the target modules; the connection relationship deletion command B is used to instruct the background to delete the connection relationships between the plurality of target modules; The connection relationship deletion command C is used to instruct the background to delete the connection relationship between each of the target modules and the previous execution module; The first module deletion command is used to instruct to delete remaining data in the module data of the plurality of target modules.
[0157] As described above, in the foreground and background separation system provided by the embodiment of the present invention, the module data stored in the background data center includes the display manner of the module, the function data of the module, and the logical relationship between the modules, that is, the foreground data and the background data are stored simultaneously in the background. As can be seen from this, in the embodiment of the present invention, the background functions as a data center for all data. In this way, when the foreground detects a target operation on a target module, it controls the background to update the foreground and background data, and when the target operation is canceled, it controls the background to update the foreground and background data in the same way, thereby ensuring the consistency between the content displayed on the foreground interactive interface during the execution of the target operation or the cancellation of the target operation, and the foreground and background data.
[0158] In addition, the module processing device used in the foreground / background separation system provided in the above embodiment only takes the division of each of the above functional modules as an example when processing operations on modules, and in actual applications, the above functions are assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to realize all or part of the above functions. In addition, the module processing device used in the foreground / background separation system provided in the above embodiment and the embodiment of the module processing method used in the foreground / background separation system belong to the same concept, and the specific realization process is described in detail in the embodiment of the method, so the description is omitted here.
[0159] Figure 8 is a structural schematic diagram of a terminal 800 provided by an embodiment of the present invention. The foreground in the above embodiment can be realized by the structure shown in Figure 8. The terminal 800 can be a smartphone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, a notebook computer, or a desktop computer. The terminal 800 can also be called a user device, a mobile terminal, a laptop terminal, a desktop terminal, or other names.
[0160] Typically, the terminal 800 includes a processor 801 and a memory 802 .
[0161] The processor 801 may include one or more processing cores, such as, for example, a 4-core processor, an 8-core processor, etc. The processor 801 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), or a PLA (Programmable Logic Array). The processor 801 may further include a main processor and a coprocessor, where the main processor is a processor for processing data in a wake state, also called a CPU (Central Processing Unit), and the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 801 may have a GPU (Graphics Processing Unit) for rendering and drawing content to be displayed on a display. In some embodiments, the processor 801 may further include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
[0162] The memory 802 may include one or more computer readable storage media, which may be non-transitory. The memory 802 may further include high speed random access memory and non-volatile memory, such as one or more disk storage devices, flash memory storage devices, etc. In some embodiments, the non-transitory computer readable storage medium in the memory 802 is used to store at least one instruction executed by the processor 801 to perform a modular processing method for a foreground and background separation system provided by an embodiment of the method of the present invention.
[0163] In some embodiments, the terminal 800 optionally further includes a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802, and the peripheral device interface 803 may be connected to each other via a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 803 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 804, a display 805, a camera component 806, an audio circuit 807, a positioning component 808, and a power source 809.
[0164] The peripheral device interface 803 is used to connect at least one peripheral device associated with I / O (Input / Output) to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802, and the peripheral device interface 803 are integrated in the same circuit module or circuit board, and in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral device interface 803 may be realized in separate circuit modules or circuit boards, and this embodiment is not limited thereto.
[0165] The radio frequency circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 804 communicates with communication networks and other communication devices by electromagnetic signals. The radio frequency circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 804 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a coding and decoding circuit module set, a subscriber identity module card, and the like. The radio frequency circuit 804 may communicate with other terminals via at least one wireless communication protocol, including but not limited to metropolitan area networks, mobile communication networks of various generations (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 804 may further include circuitry related to NFC (Near Field Communication), but the present invention is not limited thereto.
[0166] The display 805 is used to display a user interface (UI). The UI may include graphics, text, icons, videos, and any combination thereof. If the display 805 is a touch display, the display 805 is further capable of collecting touch signals on or above the surface of the display 805. The touch signals may be input as control signals to the processor 801 for processing. In this case, the display 805 is further used to provide virtual buttons and / or virtual keyboards, also called soft buttons and / or soft keyboards. In some embodiments, the display 805 may be one and is disposed on the front panel of the terminal 800, and in other embodiments, the display 805 may be at least two and is disposed on different surfaces of the terminal 800 or designed to be folded, and in other embodiments, the display 805 may be a flexible display disposed on a curved or folded surface of the terminal 800. Furthermore, the display 805 may be disposed to have an irregular shape other than a rectangle, i.e., an irregular screen. The display 805 may be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0167] The camera component 806 is used to collect images or videos. Optionally, the camera component 806 includes a front camera and a back camera. Typically, the front camera is installed on the front panel of the terminal, and the back camera is installed on the back of the terminal. In some embodiments, there are at least two back cameras, each of which is one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, thereby realizing a background blur function by fusion of the main camera and the depth of field camera, a panoramic shooting and a VR (Virtual Reality) shooting function by fusion of the main camera and the wide-angle camera, or a shooting function by other fusion. In some embodiments, the camera component 806 may further include a flash lamp. The flash lamp may be a single color temperature flash lamp or a two-color temperature flash lamp. A two-color temperature flash lamp is a combination of a warm white flash lamp and a cool white flash lamp, and may be used for light correction at different color temperatures.
[0168] The audio circuit 807 may include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, convert the sound waves into electrical signals, and input them to the processor 801 for processing, or to the radio frequency circuit 804 to enable voice communication. For the purpose of stereo sound collection or noise reduction, the microphones may be multiple and installed at different locations of the terminal 800. The microphones may also be array microphones or omnidirectional sound collection microphones. The speaker is used to convert electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a conventional thin-film speaker or a piezoelectric ceramic speaker. If the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves that can be heard by humans, but also convert electrical signals into sound waves that cannot be heard by humans for applications such as distance measurement. In some embodiments, the audio circuit 807 may further include a headphone jack.
[0169] The positioning component 808 is used to determine the current geographical position of the terminal 800 to enable navigation or Location Based Services (LBS).
[0170] The power source 809 is used to supply power to each component in the terminal 800. The power source 809 may be an AC power source, a DC power source, a primary battery, or a secondary battery. If the power source 809 includes a secondary battery, the secondary battery can support wired or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0171] In some embodiments, the terminal 800 further includes one or more sensors 810, including, but not limited to, an acceleration sensor 811, a gyro sensor 812, a pressure sensor 813, a fingerprint sensor 814, an optical sensor 815, and a proximity sensor 816.
[0172] The acceleration sensor 811 can detect the magnitude of acceleration in three coordinate axes of a coordinate system established by the terminal 800. For example, the acceleration sensor 811 is used to detect components of gravitational acceleration in three coordinate axes. The processor 801 can control the display 805 to display a user interface in a horizontal view or a vertical view based on the gravitational acceleration signal collected by the acceleration sensor 811. The acceleration sensor 811 can further be used to collect game or user motion data.
[0173] The gyro sensor 812 can detect the direction and rotation angle of the main body of the terminal 800, and in cooperation with the acceleration sensor 811, can collect 3D motion of the user relative to the terminal 800. Based on the data collected by the gyro sensor 812, the processor 801 can realize functions such as motion detection (such as changing the UI due to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0174] The pressure sensor 813 may be installed on a side frame of the terminal 800 and / or under the display 805. When the pressure sensor 813 is installed on the side frame of the terminal 800, it can detect a grip signal on the terminal 800 by a user, and the processor 801 distinguishes between left and right hands or performs a shortcut operation based on the grip signal collected by the pressure sensor 813. When the pressure sensor 813 is installed under the display 805, the processor 801 realizes control over an operable control on a UI screen in response to a pressing operation on the display 805 by the user. The operable control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0175] The fingerprint sensor 814 is used to collect a user's fingerprint, and the processor 801 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 814, or identifies the user's identity based on the fingerprint collected by the fingerprint sensor 814. Once the user's identity is identified as a trustworthy identity, the user is permitted by the processor 801 to perform related confidential operations, including unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 814 may be installed on the front, back, or side of the terminal 800. If a physical button or a manufacturer's Logo is installed on the terminal 800, the fingerprint sensor 814 may be integrated with the physical button or the manufacturer's Logo.
[0176] The optical sensor 815 is used to collect the intensity of the ambient light. In one embodiment, the processor 801 can control the display brightness of the display 805 based on the intensity of the ambient light collected by the optical sensor 815. Specifically, when the intensity of the ambient light is high, the display brightness of the display 805 is increased, and when the intensity of the ambient light is low, the display brightness of the display 805 is decreased. In another embodiment, the processor 801 can further dynamically adjust the shooting parameters of the camera component 806 based on the intensity of the ambient light collected by the optical sensor 815.
[0177] The proximity sensor 816 is also called a distance sensor and is typically installed on the front panel of the terminal 800. The proximity sensor 816 is used to collect the distance between the user and the front of the terminal 800. In one embodiment, when the proximity sensor 816 detects that the distance between the user and the front of the terminal 800 is gradually decreasing, the processor 801 controls the display 805 to switch from a screen-on state to a screen-off state, and when the proximity sensor 816 detects that the distance between the user and the front of the terminal 800 is gradually increasing, the processor 801 controls the display 805 to switch from a screen-off state to a screen-on state.
[0178] Those skilled in the art will appreciate that the structure shown in FIG. 8 does not constitute a limitation on terminal 800, which may include more or fewer components than shown, or may combine certain components or employ different component arrangements.
[0179] An embodiment of the present invention further provides a non-transitory computer-readable storage medium, and when instructions in the storage medium are executed by a processor of a terminal, the terminal can execute a module processing method for use in the foreground and background separation system provided by the above embodiment.
[0180] An embodiment of the present invention further provides a computer program product including instructions which, when executed on a terminal, cause the terminal to execute a modular processing method for use in the foreground and background separation system provided by the above embodiment.
[0181] Fig. 9 is a structural schematic diagram of a server provided by an embodiment of the present invention. The background in the above embodiment can be realized by the structure shown in Fig. 9. The server can be a server in a background server cluster. Specifically, it is as follows:
[0182] The server 900 includes a central processing unit (CPU) 901, a system memory 904 including a random access memory (RAM) 902 and a read only memory (ROM) 903, and a system bus 905 connecting the system memory 904 and the central processing unit 901. The server 900 further includes a basic input / output system (I / O system) 906 that assists in transmitting information between devices in the computer, and a mass storage device 907 for storing an operating system 913, applications 914, and other program modules 915.
[0183] The basic input / output system 906 includes a display 908 for displaying information and input devices 909, such as a mouse and keyboard, for a user to input information. The display 908 and the input devices 909 are connected to the central processing unit 901 through an input / output controller 910 that is connected to the system bus 905. The basic input / output system 906 may further include an input / output controller 910 for receiving and processing input from a number of other devices, such as a keyboard, a mouse, or an electronic stylus pen. Similarly, the input / output controller 910 provides output to a display, a printer, or other type of output device.
[0184] The mass storage device 907 is connected to the central processing unit 901 through a mass storage controller (not shown) connected to the system bus 905. The mass storage device 907 and its associated computer readable media provide non-volatile storage for the server 900. That is, the mass storage device 907 may include a computer readable medium (not shown) such as a hard drive or a CD-ROM drive.
[0185] Without loss of generality, computer readable media may include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state storage technology, CD-ROM, DVD or other optical storage, tape cartridges, magnetic tape, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media is not limited to some of the above. The above system memory 904 and mass storage device 907 may be collectively referred to as memory.
[0186] According to various embodiments of the present invention, the server 900 may operate while connected to a remote computer on a network, such as the Internet, via a network, i.e., the server 900 may be connected to a network 912 via a network interface unit 911 connected to the system bus 905, or may use the network interface unit 911 to connect to another type of network or remote computer system (not shown).
[0187] The memory further includes one or more programs stored in the memory and configured to be executed by the CPU, the one or more programs including for executing a modular processing method for use in a foreground and background separation system provided by an embodiment of the present invention.
[0188] An embodiment of the present invention further provides a non-transitory computer-readable storage medium, the instructions in which, when executed by a processor of a server, enable the server to execute a modular processing method for use in the foreground and background separation system provided by the above embodiment.
[0189] An embodiment of the present invention further provides a computer program product including instructions which, when executed on a server, cause the server to perform a modular processing method for use in the foreground and background separation system provided by the above embodiment.
[0190] Those skilled in the art can understand that all or part of the steps for implementing the above embodiments may be completed by hardware, or may be completed by a program instructing related hardware, and the above program may be stored in a computer-readable storage medium, and the above storage medium may be a read-only memory, a magnetic disk, an optical disk, etc.
[0191] The above are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the embodiments of the present invention should be included within the protection scope of the present invention. [Explanation of symbols]
[0192] 700 Module processing device for foreground / background separation system 701 First Control Module 702 Second Control Module 703 Third Control Module 800 terminals 801 Processor 802 Memory 803 Peripheral Device Interface 804 Radio Frequency Circuits 805 Display 806 Camera parts 807 Audio Circuit 808 Positioning parts 809 Power supply 810 Sensors 811 Acceleration Sensor 812 Gyro sensor 813 Pressure Sensor 814 Fingerprint Sensor 815 Optical Sensor 816 Proximity Sensor 900 Server 901 Central Processing Unit 902 Random Access Memory 903 Read-only memory 904 System Memory 905 System Bus 906 Basic Input / Output System 907 Mass storage device 908 Display 909 Input Devices 910 Input / Output Controller 911 Network Interface Unit 912 Network 913 Operating Systems 914 Application 915 Other Program Modules
Claims
1. A module processing method for a foreground / background separation system, the foreground / background separation system including a foreground and a background, an interactive interface is displayed in the foreground, the interactive interface is used to display a plurality of modules, a data center is disposed in the background, the data center is used to store module data for each of the plurality of modules, the module data includes a display method of the module, function data of the module, and a logical relationship between the module and each of the other modules, the foreground / background separation system includes a process setting system, the process setting system is used to provide a function of process setting, the process setting is a process of ordering functional modules and setting a relationship between each of the functional modules, In response to a target operation on a target module, the foreground controls the background to update data corresponding to the target module in the data center based on the target operation, and the foreground updates the interactive interface based on the data corresponding to the updated target module, the target module being one or more of the multiple modules; When a cancellation command for the target operation is detected, the foreground controls the background to restore the data corresponding to the target module in the data center based on the cancellation command, and the foreground updates the interactive interface based on the data corresponding to the restored target module.
11. A modular processing method for use in a foreground / background separation system, comprising:
2. After the foreground controls the background to restore the data corresponding to the target module in the data center based on the cancellation command, When a replay command for the target operation is detected, the foreground controls the background to update the data corresponding to the target module in the data center based on the target operation, and the foreground updates the interactive interface based on the data corresponding to the updated target module.
2. The method of claim 1 .
3. The step of controlling the foreground to update the data corresponding to the target module in the data center based on the target operation by the background includes: The foreground sends one or more first data update instructions to the background based on the target operation, and any one of the one or more first data update instructions is used to instruct the background to update a part of data corresponding to the target module; generating an operation record by the foreground based on the transmission of the one or more first data update commands; The step of controlling the foreground to restore the data corresponding to the target module in the data center based on the cancellation command by the background includes: The method includes a step of transmitting one or more second data update instructions to the background based on an inverse operation of the target operation instructed by the operation record by the foreground, wherein any one of the one or more second data update instructions is used to instruct the background to restore the part of the data corresponding to the target module in the data center to a state before the target operation was executed.
2. The method of claim 1 .
4. If the target operation is an add operation on the target module, The step of transmitting one or more first data update commands to the background by the foreground based on the target operation includes: The method includes a step of: the foreground first sends a first module update command to the background, and then sends a first logical relationship update command to control the background to first add the module data of the target module to the data center, and then add the logical relationship between the target module and the other modules to the module data of each of the other modules; The step of transmitting one or more second data update commands to the background based on an inverse operation of the target operation indicated by the operation record by the foreground, The foreground first transmits a second logical relationship update command to the background, and then transmits a second module update command to control the background to first delete the logical relationship between the target module and the other modules in the module data of each of the other modules in the data center, and then delete the module data of the target module in the data center; 4. The method according to claim 3 .
5. If the target operation is a delete operation on the target module, The step of transmitting one or more first data update commands to the background by the foreground based on the target operation includes: The foreground first sends a first logical relationship update command to the background, and then sends a first module update command to control the background to first delete the logical relationship between the target module and the other modules in the module data of each of the other modules in the data center, and then delete the module data of the target module in the data center; or The foreground includes a step of first transmitting a first logical relationship update command to the background, and then transmitting a first module update command to control the background to delete the logical relationship between the other modules and the target module in the module data of each of the other modules in the data center when the background receives the first logical relationship update command, and controlling the background to add a deletion mark to the module data of the target module in the data center when the background receives the first module update command; The step of transmitting one or more second data update commands to the background based on an inverse operation of the target operation indicated by the operation record by the foreground, The foreground first sends a second module update command to the background, and then sends a second logical relationship update command to control the background to first restore the module data of the target module in the data center, and then restore the logical relationship between the target module and the other modules in the module data of each of the other modules; or The foreground includes a step of first transmitting a second module update command to the background, and then transmitting a second logical relationship update command to control the background to delete the deletion mark of the module data of the target module in the data center when the background receives the second module update command, and to add the logical relationship between the other modules and the target module to the module data of each of the other modules in the data center when the background receives the second logical relationship update command.
4. The method according to claim 3 .
6. before the foreground first transmits the first logical relationship update command and then transmits the first module update command to the background, The foreground controls the background to export the data corresponding to the target module in the data center and back it up to a reference storage location, the data corresponding to the target module including module data of the target module and the logical relationship between the target module and the other modules in the module data of each of the other modules; the foreground first transmits the second module update command to the background, and then transmits the second logical relationship update command to the background, and then In response to the received second module update command, the background imports the module data of the target module from the reference storage location to the data center, and in response to the received second logical relationship update command, the background imports the logical relationships between the target module and each of the other modules from the reference storage location to the data center.
6. The method of claim 5 .
7. the logical relationship between the module and each of the other modules includes a connection relationship between the module and each of the other modules, and a subscription relationship between the module and each of the other modules; the connection relationship indicates a connection line relationship between the module and each of the other modules on the interactive interface; the subscription relationship indicates an association relationship between at least one of the internal parameters, inputs of the module and an output of each of the other modules, and / or an association relationship between an output of the module and at least one of the internal parameters, inputs of each of the other modules; 4. The method according to claim 3 .
8. When the number of the target modules is more than one, The step of transmitting a plurality of first data update commands to the background based on the target operation by the foreground includes: A step of the foreground sending a first subscription relationship deletion command to the background, the first subscription relationship deletion command being used to instruct the background to delete a subscription relationship between the other module and an edge target module in the module data of each of the other modules, the edge target module being a target module among a plurality of target modules that has a logical relationship with the other module; a step of the foreground transmitting a first connection relationship deletion command to the background, the first connection relationship deletion command being used to instruct the background to delete a connection relationship between the other module and the edge target module in the module data of each of the other modules; The foreground sends a first module deletion command to the background, the first module deletion command being used to instruct the background to delete the module data of the plurality of target modules; Or, a step of transmitting a subscription relationship deletion command A from the foreground to the background, the subscription relationship deletion command A being used to instruct the background to delete, for each of the target modules, a subscription relationship between a post-execution module and each of the target modules, the post-execution module being a module executed after the target module in a flowchart displayed in the foreground, and the pre-execution module being a module executed before the target module in a flowchart; A step of the foreground sending a subscription relationship deletion command B to the background, the subscription relationship deletion command B being used to instruct the background to delete a subscription relationship between a plurality of target modules; a step of the foreground sending a subscription relationship deletion command C to the background, the subscription relationship deletion command C being used to instruct the background to delete a subscription relationship between each of the target modules and the previously executed module; a step of transmitting a connection relationship deletion command A from the foreground to the background, the connection relationship deletion command A being used to instruct the background to delete a connection relationship between the post-execution module and each of the target modules; a step of transmitting a connection relationship deletion command B from the foreground to the background, the connection relationship deletion command B being used to instruct the background to delete the connection relationships between the plurality of target modules; a step of the foreground transmitting a connection relationship deletion command C to the background, the connection relationship deletion command C being used to instruct the background to delete a connection relationship between each of the target modules and the previously executed module; The foreground sends a first module deletion command to the background, the first module deletion command being used to instruct the background to delete remaining data in the module data of the plurality of target modules.
8. The method of claim 7.
9. A module processing device for use in a foreground / background separation system, the foreground / background separation system including a foreground and a background, an interactive interface is displayed in the foreground, the interactive interface is used to display a plurality of modules, a data center is disposed in the background, the data center is used to store module data for each of the plurality of modules, the module data includes a display method of the module, function data of the module, and a logical relationship between the module and each of the other modules, the foreground / background separation system includes a process setting system, the process setting system is used to provide a function of process setting, the process setting is a process of ordering functional modules and setting a relationship between each of the functional modules, a first control module for, in response to a target operation on a target module, controlling the foreground to control the background to update data corresponding to the target module in the data center based on the target operation, and foreground to update the interactive interface based on the data corresponding to the updated target module, the target module being one or more of the plurality of modules; a second control module for controlling the foreground to restore the data corresponding to the target module in the data center based on the cancellation command when a cancellation command for the target operation is detected, and for controlling the foreground to update the interactive interface based on the data corresponding to the restored target module; 13. A module processing device for use in a foreground / background separation system, comprising:
10. A processor; a memory for storing processor executable instructions, said memory comprising: The processor is configured to execute the steps of the method according to any one of claims 1 to 8.
13. A module processing device for use in a foreground / background separation system, comprising:
11. A non-volatile computer readable storage medium having instructions stored thereon that, when executed by a processor, perform the steps of the method according to any one of claims 1 to 8. A non-volatile computer readable storage medium comprising:
12. A computer program comprising instructions which, when executed on a computer, cause the computer to carry out the steps of the method according to any one of claims 1 to 8. A computer program comprising:
Citation Information
Patent Citations
Page generation method and device, server and storage medium
CN108920653A
Page updating method and device, electronic equipment and storage medium
CN112597417A
Method and device for simulating relational database through IndexedDB in browser environment
CN112685487A
Management method and device for data file history
JP2003337728A