WO2023116505A1 - 用于前后台分离系统的模块处理方法、装置及存储介质 - Google Patents

用于前后台分离系统的模块处理方法、装置及存储介质 Download PDF

Info

Publication number
WO2023116505A1
WO2023116505A1 PCT/CN2022/138610 CN2022138610W WO2023116505A1 WO 2023116505 A1 WO2023116505 A1 WO 2023116505A1 CN 2022138610 W CN2022138610 W CN 2022138610W WO 2023116505 A1 WO2023116505 A1 WO 2023116505A1
Authority
WO
WIPO (PCT)
Prior art keywords
module
target
data
background
modules
Prior art date
Application number
PCT/CN2022/138610
Other languages
English (en)
French (fr)
Inventor
胡景翔
王川艳
张文聪
Original Assignee
杭州海康机器人股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州海康机器人股份有限公司 filed Critical 杭州海康机器人股份有限公司
Publication of WO2023116505A1 publication Critical patent/WO2023116505A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2393Updating materialised views
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus

Definitions

  • the present application relates to the field of computer technology, in particular to a module processing method, device and storage medium for a front-end and back-end separation system.
  • the front-end and back-end separation system refers to a system in which the foreground and the backstage are independent of each other.
  • the foreground may refer to the interface layer, and the background may refer to the functional layer.
  • the foreground is used to provide an interactive interface
  • the interactive interface displays a flow chart including multiple modules, and the user can trigger an operation on a certain module through the interactive interface.
  • the background is used to perform the corresponding data logic function of the operation and provide data storage function.
  • Embodiments of the present application provide a module processing method, device, and storage medium for a front-background separation system, which can realize undo or redo of user operations in the front-background separation system.
  • a module processing method for a front-background separation system includes a foreground and a backstage, and the foreground displays an interactive interface, and the interactive interface is used to display multiple modules, so
  • the background is configured with a data center, the data center is used to store the module data of each of the multiple modules, the module data includes the display mode of the module, the function data of the module, and the relationship between the module and each other Logical relationship between modules;
  • the methods include:
  • 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 controls the data corresponding to the target module based on the updated
  • the data is used to update the interactive interface, and the target module is one or more modules in the plurality of modules;
  • the foreground controls the background to restore the data corresponding to the target module in the data center based on the cancel instruction, and the foreground controls the data corresponding to the target module based on the restored
  • the data corresponding to the target module is updated to update the interactive interface.
  • a module processing device for a front-end and back-end separation system is provided.
  • the front-background separation system includes a foreground and a backstage, the foreground displays an interactive interface for displaying a plurality of modules, and the backstage is configured with a data center for storing each of the plurality of modules.
  • the module data of the module, the module data includes the display mode of the module, the function data of the module and the logical relationship between the module and other modules;
  • the devices include:
  • a first control module configured to, in response to a target operation on a target module, make the foreground control the backend to update data corresponding to the target module in the data center based on the target operation, and make the foreground based on the target operation
  • the updated data corresponding to the target module updates the interactive interface, and the target module is one or more modules in the plurality of modules;
  • the second control module is configured to enable the foreground to control the background to restore the data center corresponding to the target module based on the undo command when a undo command for the target operation is detected. data, and make the foreground update the interactive interface based on the restored data corresponding to the target module.
  • a module processing device for a front-end and back-end separation system comprising:
  • memory for storing processor-executable instructions
  • the processor is configured to execute any step in the module processing method for a foreground-background separation system provided in the first aspect above.
  • a computer-readable storage medium is provided. Instructions are stored on the computer-readable storage medium. When the instructions are executed by a processor, the module processing for the front-background separation system provided in the above-mentioned first aspect is implemented. any step in the method.
  • the fifth aspect provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any step in the module processing method for the front-background separation system provided in the first aspect above.
  • the module data stored in the back-end data center includes the display mode of the module, the function data of the module and the logical relationship between the modules, that is, the front-end is also stored in the back-end data and background data.
  • the background is used as the data center for all data. In this way, when the foreground detects the target operation for the target module, it can control the background to update the front and back data, and when canceling the target operation, it also controls the background to update the front and back data, so as to ensure the execution of the target operation or cancel the target operation.
  • Fig. 1 is a schematic diagram of the architecture of a front-end and back-end separation system provided by an embodiment of the present application;
  • Fig. 2 is a flow chart of a module processing method for a front-end and back-end separation system provided by an embodiment of the present application;
  • Fig. 3 is a schematic flow chart diagram provided by an embodiment of the present application.
  • Fig. 4 is another schematic flowchart provided by the embodiment of the present application.
  • Fig. 5 is a schematic diagram of a deletion module provided by an embodiment of the present application.
  • Fig. 6 is a flow chart of another module processing method for the front-background separation system provided by the embodiment of the present application.
  • Fig. 7 is a schematic structural diagram of a module processing device used in a front-end and back-end separation system provided by an embodiment of the present application;
  • FIG. 8 is a schematic structural diagram of a terminal provided in an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the front-end In the front-background separation system, the front-end is used to display the software interface and provide an interactive interface for users to operate, while the back-end provides specific functional logic and recorded data.
  • Typical C/S (client/server, client/server) and B/S (browser/server, browser/server) systems are both front and back separation systems.
  • the process configuration system is a typical front-end and back-end separation system.
  • the module processing method provided in the embodiment of the present application can be applied in the process configuration system.
  • the module processing method provided in the embodiment of the present application can also be applied to other front-end and back-end separation systems, which is not limited in the embodiment of the present application.
  • Undo When the user interacts with the software system, due to the needs of the user, the state of the software is rolled back to the state before the last operation. This is a revocation. Undo can be chained, that is, you can undo multiple times and return to the state before multiple operations.
  • Redo Contrary to the undo action, when the software reaches a certain state due to undo, due to the needs of the user, the software state is advanced to the state before the last undo, which is redo. Redo can also be chained, that is, redo multiple times to restore the state before it was undone many times.
  • undo or redo is to reset the state of the software to the state after any operation between the last operation and the previous N operations, that is, to give users the opportunity to regret their actions.
  • the front-end provides an interactive interface for user operations
  • the back-end provides data logic functions and storage.
  • the module processing method provided in the embodiment of the present application can implement the above two technologies, and the specific implementation manner will be described in detail in subsequent embodiments.
  • Fig. 1 is a schematic diagram of the architecture of a front-end and back-end separation system provided by an embodiment of the present application. As shown in Figure 1, the front-background separation system includes a foreground and a backstage.
  • the interactive interface provided by the front desk displays module 1 and module 2, and the connection relationship between module 1 and module 2.
  • module 1 is displayed based on a specific display method
  • module 2 is also displayed based on a specific display method.
  • Figure 1 illustrates the display mode of module 2, which specifically includes the position coordinates of the upper left corner of module 2 as (200, 300), the height (height) of module 2 as 30, and the width (width) of module 2 as 90, the color of module 2 is orange.
  • the display modes of the above-mentioned module 1 and module 2 can be referred to as foreground data.
  • the foreground data is also referred to as interface data.
  • the background provides specific logic functions. As shown in Figure 1, there is such a piece of code stored in the background, the code is as follows:
  • module 1 points to module 2).
  • the foreground displays a flow chart, which includes two functional modules, namely module 1 and module 2, and the connection relationship is that module 1 points to module 2, that is, module 1
  • the output of is the input of module 2.
  • the function data of module 1 in the above code indicates the internal execution logic of module 1, and the internal execution logic 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, and the internal execution logic is used to indicate how to obtain the output of module 2 based on the input of module 2.
  • the above codes are generally called background data, that is, in the embodiment of the present application, the background data indicates the functional data of each module among the multiple modules displayed on the foreground interactive interface and the logical relationship between the multiple modules. Wherein, background data is also referred to as bottom layer data, and background is also called bottom layer.
  • module 2 As shown in Figure 1, two modules are placed in the interactive interface of the front desk.
  • 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.
  • module 2 When module 2 is deleted, for the backend, there is one missing function data of module 2 and a connection relationship in the background data.
  • the position, length, width, and color of the front-end interactive interface must also be restored to completely restore to delete before operation.
  • the foreground data is stored in the foreground and the background data is stored in the background, then when the delete operation is undone, the foreground data needs to be restored in the foreground, and the functional data and logical relationships in the background should be restored, which can easily lead to Data inconsistencies. Therefore, in this embodiment of the application, all data is configured to be stored in a unique center, which is the background. In this way, the foreground data is also stored in the background. When canceling, it is only necessary to restore the data stored in the background, and then the foreground obtains the foreground data from the background.
  • module data includes foreground data and background data.
  • the module data of any module includes the display mode of the module, the function data of the module, and the logical relationship between the module and other modules.
  • front-background separation system shown in FIG. 1 is only an example, and does not constitute a limitation to the front-background separation system involved in the embodiment of the present application.
  • Fig. 2 is a flow chart of a module processing method for a front-end and back-end separation system provided by an embodiment of the present application.
  • the method is applied to a front-background separation system, and the front-background separation system includes a foreground and a backstage.
  • the foreground display has an interactive interface, and the interactive interface is used to display multiple modules.
  • There is a data center in the background which is used to store the module data of each module in multiple modules.
  • the module data of any module includes the display mode of the module, the function data of the module and the relationship between the module and other modules. logical relationship.
  • the method includes the following steps.
  • Step 201 In response to the target operation on the target module, 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 updated data corresponding to the target module.
  • the target modules are multiple One or more modules in the module, target operation is any operation on the target module.
  • 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 among the module data of other modules, which will be explained in detail later and will not be elaborated here.
  • the above-mentioned target operation may be a delete operation for the target module, or an add operation for the target module, or a modification operation for properties such as display color of the target module.
  • the deleting operation specifically refers to deleting the target module displayed on the interactive interface
  • the adding operation specifically refers to adding the target module on the interactive interface.
  • step 201 specifically refers to: the foreground deletes the module data of the target module in the data center based on the target operation control background, and the module data of other modules related to the target module data, based on the data center after deleting the data to re-display the interactive interface.
  • step 201 specifically refers to: the foreground controls the background to add the module data of the target module in the data center based on the target operation, and add The data related to the target module, based on the data center after adding the data, re-displays the interactive interface.
  • the module deletion control and the module addition control are displayed in the interactive interface.
  • the front desk detects the user's selection operation on the module deletion control and the module addition control, it can determine that the target module is detected. target operation, at this point, the target operation can be executed through step 201 .
  • the foreground After the foreground detects the target operation, the foreground updates the data corresponding to the target module in the data center based on the target operation control background, and updates the interactive interface based on the updated data corresponding to the target module in the data center, so as to realize the interactive interface, front-end The consistency of background data.
  • the above data corresponding to the target module includes the module data of the target module, and the data related to the target module among the module data of other modules.
  • the module data of the target module includes the function data of the target module, the display mode of the target module, and the logical relationship between the target module and other modules.
  • the function data of the target module indicates the internal execution logic of the target module, and the internal execution logic is used to indicate 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, and display color 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.
  • 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 the connection relationship between the target module and the other modules on the interactive interface, and the connection relationship specifically indicates the execution sequence between the target module and the other modules during the execution of the flowchart. For example, if the target module is module 1 shown in FIG. 1 and other modules are module 2, then the connection relationship between the target module and 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.
  • FIG. 3 is a schematic flow chart provided by an embodiment of the present application, and the flow chart viewed at the foreground is generally shown in FIG. 3 .
  • the connection relationship between the modules only represents the execution order, and there is data interaction between the modules.
  • the output of the previous module needs to be used as the input or parameter of the subsequent module to participate in the operation, otherwise This process makes no sense. If the parameters of the input and output and the module itself are added, the actual flow chart will be much more complicated than that shown in Figure 3.
  • Fig. 4 is another schematic flowchart provided by the embodiment of the present application.
  • the internal parameters of a module may be the output of the previous module in the execution order
  • the output of the module may be the internal parameters of the next module in the execution order
  • the output of a module may be the next module in the execution order input and so on. That is, a module may subscribe to the input or output of a previous module. So the flowchart is actually a very complex one-way network. When a module is deleted, it not only affects the module itself, but also affects the subscription relationship between all subsequent modules on the flowchart and it, as well as its predecessor modules.
  • the logical relationship between the target module and other modules may include not only the connection relationship between the above target module and the other modules, but also the connection relationship between the target module and the other modules.
  • subscription relationship indicates an association between at least one of the internal parameters and inputs of the target module and the output of the other module, and/or, between the output of the target module and at least one of the internal parameters and inputs of the other module and/or, the relationship between the input of the target module and the output of the other module.
  • the logical relationship between the module and other modules includes the connection relationship between the module and the other modules, and the connection relationship between the module and the other modules.
  • the connection relationship indicates the connection relationship between the module and the other modules on the display interface.
  • the subscription relationship indicates the relationship between the internal parameters of the module and the output of the other modules, and/or the relationship between the output of the module and the internal parameters of the other modules, and/or, the output of the module and the The association relationship between the inputs of the other modules, and/or the association relationship between the input of the module and the output of the other modules. That is, the subscription relationship indicates the association between at least one of the internal parameters and inputs of the module and the output of the other module, and/or, the output of the module and at least one of the internal parameters and inputs of the other module relationship between.
  • each module may have one or more internal parameters.
  • each module can have one or more outputs, and each module can have one or more inputs.
  • the aforementioned association relationship is an association relationship of a superordinate concept, and may include an association relationship between a specific parameter and another specific parameter, or may include an association relationship between multiple parameters and other parameters.
  • the relationship between the internal parameters of the target module and the outputs of other modules may refer to: one output of another module is an internal parameter of the target module, or two outputs of another module are the target module
  • the two internal parameters of , or, the output of each of the other two blocks is one of the two internal parameters of the target block.
  • Step 202 When a cancel command for the target operation is detected, the foreground controls the background to recover the data corresponding to the target module in the data center based on the cancel command, and the foreground updates the interactive interface based on the recovered data corresponding to the target module.
  • the front stage detects the user's selection operation on the undo operation control, it can determine that the undo instruction for the target operation has been detected. At this time, the The undo process for the target operation is performed through step 202 .
  • the above step 202 specifically refers to: the foreground controls the background to re-add data corresponding to the target module in the data center based on the cancel instruction.
  • the above step 202 specifically refers to: the foreground controls the background to delete the data corresponding to the target module in the data center based on the cancel instruction.
  • the above steps 201 and 202 may specifically take the foreground as the operation center, or may use the background as the operation center.
  • taking the foreground as the operation center means that the foreground records the specific operations of executing the target operation
  • taking the background as the center means that the background records the specific operations of executing the target operation, that is, the difference between the two lies in the recording of specific operations Whether the file is saved in the foreground or background.
  • the implementation process of the above step 201 may be: 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 indicates that the background update and Some data in the data corresponding to the target module; the foreground generates an operation record based on sending the one or more first data update instructions.
  • the foreground sends the first logical relationship update command and the 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 instruction instructs 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
  • the first module update instruction instructs the background to update the target module in the data center based on the target operation module data.
  • operation record is used to indicate the order before and after sending each first data update instruction, and the data change indicated by each instruction.
  • the implementation process of the above step 202 may be: the foreground sends one or more second data update instructions to the background based on the reverse operation of the target operation indicated by the operation record, and any second data update instruction in the one or more second data update instructions
  • the data update instruction instructs 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 executing the target operation, or instructs to restore the module data of the target module to the state before executing the target operation.
  • the foreground sends the second logical relationship update instruction and the second module update instruction to the background based on the reverse operation of the target operation indicated by the operation record.
  • the second logical relationship update command instructs the background to restore the logical relationship between the target module and the other modules in the module data of each other module in the data center to the state before the target operation is performed
  • the second module update command instructs the background to restore the target module in the data center
  • the module data of the module is restored to the state before the target operation is executed, so that the subsequent foreground can obtain the updated data corresponding to the target module from the background, and update the interactive interface based on the updated data corresponding to the target module.
  • the foreground when the target operation is a delete operation for a target module, when executing the target operation, the foreground first sends the first logical relationship update instruction to the background, and then sends the first module update instruction.
  • the background can be controlled to first delete the logical relationship between the target module and the other modules in the module data of other modules, and then delete the module data of the target module, and generate the first update command to send the first logical relationship, and then send the first Operation log for module update commands.
  • the foreground When canceling the target operation, based on the inverse operation of the target operation indicated by the aforementioned operation record, the foreground first sends the second module update command to the background, and then sends the 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.
  • the control background can first add the module data of the target module in the data center, and then add the logical relationship between the target module and the other modules in the module data of other modules in the data center, and generate and send the first module update first command, and then send the operation record of the first logical relationship update command.
  • the foreground sends the second logical relationship update command to the background, and then sends the second module update command.
  • the control background can 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.
  • the purpose of sending the instructions in the above order is that when the foreground cancels the target operation, it can be realized completely based on the inverse operation of the target operation, so as to avoid the state before the target operation is not recalled.
  • step 201 and step 202 are as follows.
  • the foreground sends an acquisition module data command to the background, and the foreground receives the data corresponding to the target module sent by the background.
  • the data corresponding to the target module includes the module data of the target module and the data related to the target module in the module data of each other module;
  • the front desk analyzes the acquired data corresponding to the target module, and determines that 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.
  • the foreground sends a delete connection command to the background, that is, sends the above-mentioned first logical relationship update command to instruct the background to delete the link between the target module and the other module in the module data of the other module in the data center.
  • the background when the background deletes the logical relationship, it first backs up the connection data related to the target module to other storage places, that is, the backup indicates the logical relationship between the target module and other modules, and then the connection data related to the target module in the background data Data deletion for quick subsequent recovery of deleted data.
  • the foreground sends a delete module command to the background, that is, sends the above-mentioned first module update command to instruct the background to delete the module data of the target module, and generates an operation record corresponding to sending the first logical relationship update command, for subsequent convenience Note, this operation record is called the second operation record.
  • the module data of the target module is deleted in the background, the module data of the target module is backed up to other storage places in the background, and then the module data of the target module in the background data is deleted, so that the deleted data can be quickly restored later.
  • the foreground first sends an import module command to the background based on the second operation record, that is, sends the above-mentioned second module update command, To instruct the background to add the module data of the target module in the data center.
  • the foreground sends the connection establishment command between module 1 and module 2 to the background based on the first operation record, that is, sends the above-mentioned second logical relationship update command to instruct the background to add the target in the module data of other modules in the data center A logical relationship between a module and that other module.
  • the foreground obtains the module interface data from the background, and the module interface data is the display mode of the target module in the module data of the target module, and re-displays the target module on the interactive interface based on the obtained display mode.
  • sending instructions from the foreground to the background is realized by calling the interface of the background, that is, the background provides a series of interfaces.
  • the foreground needs to send an instruction, call an interface in the background to send the instruction to control the background to perform some specific operations.
  • the background provides a logical relationship deletion interface and a module deletion interface.
  • the target operation is to delete a module
  • the first logical relationship update command sent by the foreground to the background can be realized by calling the logical relationship deletion interface.
  • the first module update command sent in the background can be realized by calling the module deletion interface.
  • the implementation process of the above step 201 can be: the foreground updates the interactive interface based on the target operation, and then the foreground sends an update instruction to the background, and the update instruction instructs the background to update the module data of other modules in the data center based on the target operation.
  • the background generates operation records corresponding to each of the aforementioned operations.
  • the implementation process of the above-mentioned step 202 may be: the foreground sends a restoration instruction to the background, and the restoration instruction indicates that: according to the inverse operation of the target operation indicated by the locally stored operation record, the background will convert the module data of each other module in the data center to The logical relationship between the other modules and the target module, and the module data of the target module in the data center are restored to the state before the target operation is performed.
  • the foreground acquires the display mode in the module data of the updated target module from the background, and updates the interactive interface based on the updated display mode.
  • step 201 and step 202 are as follows.
  • the foreground After the foreground detects the module cleaning command, it first deletes the target module on the interactive interface, and then sends a module deletion command to the background, and the module deletion command carries the identification of the target module.
  • connection data related to the target module in the module data of each other module After receiving the module deletion command in the background, first back up the connection data related to the target module in the module data of each other module to other storage places, and then save the connection data related to the target module in the module data of other modules in the data center Data is deleted, and an operation record corresponding to the connection data deletion operation is generated, which is marked as a third operation record.
  • the connection data related to the target module in the module data of each other module indicates the logical relationship between the target module and the other module.
  • the background query operation record finds that the last operation to delete the module data is to delete the module connection data, and executes the reverse operation of deleting the module connection data, that is, the modules of other modules are copied from the backup data Connection data related to the target module in the data is added to the data center.
  • the background notifies the front desk that the cancellation is complete, and the front desk obtains the latest display mode of the target module from the background, and updates the interactive interface.
  • the specific implementation method of the aforementioned foreground sequentially sending one or more first data update instructions to the background based on the target operation may be: the foreground first sends the first logical relationship update instruction to the background, and then sends the first data update instruction to the background.
  • the background After a module update command, 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, Mark the module data for the target module in the data center for deletion.
  • the foreground sequentially sends one or more second data update instructions to the background based on the reverse operation of the target operation indicated by the operation record.
  • the specific implementation method for the foreground to sequentially send one or more first data update instructions to the background based on the target operation may be as follows: the foreground first sends the first logical relationship update instruction to the background, and then sends the first
  • the module update instruction is used to control the background to delete the logical relationship between the target module and the other modules in the module data of other modules of the data center first, and then delete the module data of the target module.
  • the foreground sequentially sends one or more second data update instructions to the background based on the reverse operation of the target operation indicated by the operation record.
  • the foreground in order to facilitate subsequent quick recovery of deleted data, can control the background to neutralize the data center and The data corresponding to the target module is exported and backed up to a reference storage location. Subsequent foreground first sends the second module update command to the background, and then sends 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 responds Upon receiving the second logical relationship updating instruction, the background imports the logical relationship between the target module and each other module into the data center from the reference storage location.
  • the target operation when the target operation is a module deletion operation, the same target operation can be performed on a batch of modules at the same time, that is, there is a scenario of batch deletion operations.
  • the target operation when performing a batch delete operation, there are multiple target modules in step 201 and step 202 .
  • the first strategy focus on operations.
  • taking the operation as the center refers to: when executing the target operation for multiple target modules, split the target operation into multiple sub-operations for a single module, that is, each sub-operation is only for one module, and then according to the multiple sub-operations
  • the execution sequence of the operation executes the multiple sub-operations in sequence, so as to realize the target operations for multiple target modules.
  • an operation record for the sub-operation is generated and stored.
  • the undoing action is completed according to the inverse operation of the sub-operation indicated by the stored operation record.
  • the above-mentioned foreground first sends the first logical relationship update instruction to the background.
  • the specific implementation method may be: the foreground sends a subscription relationship deletion instruction A to the background, and the subscription relationship deletion instruction A instructs the background to target each target module. Delete the subscription relationship between the after-execution module and the first-execution module and the target module respectively.
  • the later-execution module is the module executed after the target module in the flowchart displayed on the foreground
  • the first-execution module is the 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 instructs the background to delete the subscription relationship between multiple target modules; the foreground sends a subscription relationship deletion command C to the background, and the subscription relationship deletion command C instructs the background to delete each target module
  • the subscription relationship with the first execution module the foreground sends a connection relationship deletion command A to the background, and the connection relationship deletion command A indicates the connection relationship between the execution module and each target module after the background is deleted;
  • the foreground sends a connection relationship deletion command to the background B, connection relationship deletion command B instructs the background to delete the connection relationship between multiple target modules;
  • the foreground sends a connection relationship deletion command C to the background, and the connection relationship deletion command C instructs the background to delete the connection relationship between each target module and the first execution module .
  • the foreground After the foreground sends the first logical relationship update instruction through the above implementation manner, it then sends the first module update instruction to the background to control the background to delete the remaining data in the module data of each target module among the multiple target modules.
  • the front desk first analyzes the subscription relationship and connection relationship between multiple target modules, and between each target module and other modules in the multiple target modules, These subscription relationships and connection relationships are deleted through a plurality of first logical relationship update instructions, and then the module data of each target module is deleted.
  • the second strategy data-centric.
  • the edge target module is a target module that has a logical relationship with other modules among the plurality of target modules.
  • operation records are also generated. When canceling target operations for these multiple target modules, the undo action is completed according to the inverse operation of the target operations indicated by the stored operation records.
  • the foreground first sends the first logical relationship update command to the background, and then sends the first module update command.
  • the specific implementation method can be: the foreground sends the first subscription relationship deletion command to the background, and the first subscription relationship
  • the deletion instruction instructs the background to delete the subscription relationship between the other modules and the edge target module in the module data of each other module; the foreground sends the first connection relationship deletion instruction to the background, and the first connection relationship deletion instruction instructs the background to delete the modules of other modules
  • the front desk only needs to analyze the subscription relationship and connection relationship between the edge target module and other modules among multiple target modules, and update instructions through multiple first logical relationships Delete these subscription relationships and connection relationships, and then delete the module data of each target module. There is no need to delete subscription relationships or connection relationships within each target module one by one, thereby saving the time required for target operations.
  • Fig. 5 is a schematic diagram of a delete module provided by an embodiment of the present application, which is applicable to delete operations, undo of add operations, redo of delete operations, and the like. As shown in Figure 5, when deleting modules 2 to 5 in the flowchart, there are two strategies.
  • Delete modules 3-5 in turn, that is, delete the module data of each module in modules 3-5;
  • Delete module 2 that is, delete the module data of module 2.
  • the problem with converting batch operations into many single operations in the first strategy above is that the processing sequence determines the undo sequence. Once the sequence is wrong, when the connection relationship is restored, it is found that the module has not been restored, which will cause an error. Even if all of them are restored, the connection relationship between certain modules may be missing, so that the flow chart cannot be completely restored to the previous state.
  • the batch import and export strategy only needs to record the relationship between the exported whole and its surroundings, and the exported overall internal relationship has already been included in the module data of the export module. When undoing or redoing, you only need to import the module data of the module first, and then restore the peripheral relationship between each other module and the whole.
  • the operation-centric strategy in the first strategy is suitable for undo and redo scenarios of data changes in a single module. For example: after modifying the position or color of a certain module, it is the most cost-effective method to perform the inverse operation of the position or color change.
  • the foreground when the number of target modules is one, before the foreground sends one or more first data update instructions to the background based on the target operation, the foreground can split the target operation into one or more child operation.
  • the aforementioned one or more first data update instructions correspond to one or more sub-operations respectively, and the background completes the target operation based on the one or more sub-operations. That is, the target operation is split into multiple sub-operations, and then the multiple sub-operations are executed step by step, and an operation record is generated, so that the target operation can be subsequently canceled based on the operation records of the multiple sub-operations.
  • the user can also undo the undo operation, that is, perform the operation again.
  • the above redo process can be realized through step 203 shown in FIG. 6 .
  • Step 203 When a redo instruction 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 updated data corresponding to the target module.
  • step 203 is basically the same as the implementation manner of step 201, and will not be repeated here.
  • the module data stored in the back-end data center includes the display mode of the module, the functional data of the module and the logical relationship between the modules, that is, the back-end Taichung stores both foreground data and background data.
  • the background is used as the data center for all data.
  • the foreground detects the target operation for the target module, it can control the background to update the front and back data, and when canceling the target operation, it also controls the background to update the front and back data, so as to ensure the execution of the target operation or cancel the target operation.
  • the innovation of the embodiment of the present application is to propose several realistic and feasible implementation strategies for undoing or redoing the front-end and back-end separation systems.
  • Fig. 7 is a schematic structural diagram of a module processing device used in a front-end and back-end separation system provided by an embodiment of the present application.
  • the device can be implemented by software, hardware or a combination of the two.
  • the device is used in the separation system of front and back.
  • the separation system of front and back includes the foreground and the backstage.
  • the foreground displays an interactive interface, which is used to display multiple modules.
  • the backstage is equipped with a data center, which is used to store multiple modules and each module.
  • the module data of any module includes the display mode of the module, the function data of the module and the logical relationship between the module and other modules.
  • the device 700 includes the following modules:
  • the first control module 701 is configured to, in response to the target operation on the target module, make the foreground control the background to update the data corresponding to the target module in the data center based on the target operation, and make the foreground based on the updated
  • the data corresponding to the target module updates the interactive interface, the target module is one or more modules in the plurality of modules, and the target operation is any operation on the target module;
  • the second control module 702 is configured to enable the foreground to control the background to restore the data corresponding to the target module in the data center based on the revocation instruction when a revocation instruction for the target operation is detected, and The foreground is made to update the interactive interface based on the recovered data corresponding to the target module.
  • the device further includes:
  • the third control module 703 is configured to enable the foreground to control the background to update the data corresponding to the target module in the data center based on the target operation when a redo instruction for the target operation is detected, and make the The foreground updates the interactive interface based on the updated data corresponding to the target module.
  • the first control module is configured to:
  • the second control module is used for:
  • Make the foreground sequentially send one or more second data update instructions to the background based on the reverse operation of the target operation indicated by the operation record, any second data update instruction in the one or more second data update instructions indicates The background restores part of the data corresponding to the target module in the data center to a state before executing the target operation.
  • the first control module is configured to:
  • Make the foreground first send the first module update instruction to the background, and then send the first logical relationship update instruction, so as to control the background to first add the module data of the target module in the data center, and then add the module data of the target module to the other modules. Adding the logical relationship between the target module and the other modules in the module data;
  • the second control module is used for:
  • Make the foreground send a second logical relationship update command to the background based on the reverse operation of the target operation indicated by the operation record, and then send a second module update command to control the background to first delete all other modules in the data center.
  • the first control module is configured to:
  • Make the foreground first send the first logical relationship update command to the background, and then send the first module update command, to control the background to first delete the module data between the target module and the other modules in the other modules of the data center logical relationship, and then delete the module data of the target module in the data center;
  • the second control module is used for:
  • Make the foreground send a second module update instruction to the background based on the reverse operation of the target operation indicated by the operation record, and then send a second logical relationship update instruction to control the background to first restore all data in the data center.
  • the module data of the target module and then recover the logical relationship between the target module and the other modules in the module data of each other module.
  • the first control module is configured to:
  • the foreground first sends the first logical relationship update command to the background, and then sends the first module update command, so as to control the background to delete the module data of each other module in the data center when receiving the first logical relationship update command.
  • the second control module is used for:
  • the device further includes:
  • An export module configured to enable the foreground to control the background to neutralize the data center and the
  • the data corresponding to the target module is exported and backed up to the reference storage location, and the data corresponding to the target module includes the module data of the target module and the logical relationship between the target module and the other modules in the module data of each other module ;
  • the background After the foreground first sends the second module update instruction to the background, and then sends the second logical relationship update instruction, in response to the received second module update instruction, the background is stored from the reference The location imports the module data of the target module into the data center, and in response to the received second logical relationship update instruction, the background will import the target module and each of the other modules from the reference storage location Import the logical relationship between them into the data center.
  • the logical relationship between any module among the multiple modules and each other module includes a connection relationship between any module and each other module, and the A subscription relationship between any module and the other modules.
  • the connection relationship indicates the connection relationship between any module on the interactive interface and each other module
  • the subscription relationship indicates at least one of the internal parameters and inputs of any module and the connection between each other module.
  • the first control module is configured to:
  • the edge target module is a target module that has a logical relationship with the other modules among the plurality of target modules;
  • Make the foreground send a first connection relationship deletion instruction to the background, the first connection relationship deletion instruction instructs the background to delete the connection relationship between the other modules and the edge target module in the module data of each other module;
  • the foreground sends a first module deletion instruction to the background, and the first module deletion instruction instructs the background to delete the module data of the plurality of target modules.
  • the first control module is configured to:
  • the foreground sends a subscription relationship deletion instruction A to the background, and the subscription relationship deletion instruction A instructs the background for each of the target modules.
  • the post-execution module is a module executed after the target module in the flowchart displayed on the foreground, and the first-executed module is a module executed before the target module in the flowchart;
  • connection relationship deletion instruction B instructs the background to delete the connection relationship between the multiple target modules
  • connection relationship deletion instruction C instructs the background to delete the connection relationship between each of the target modules and the first-executed module
  • the foreground is made to send a first module deletion instruction to the background, and the first module deletion instruction instructs to delete the remaining data in the module data of the plurality of target modules.
  • the module data stored in the back-end data center includes the display mode of the module, the functional data of the module and the logical relationship between the modules, that is, the back-end Taichung stores both foreground data and background data.
  • the background is used as the data center for all data.
  • the foreground detects the target operation for the target module, it can control the background to update the front and back data, and when canceling the target operation, it also controls the background to update the front and back data, so as to ensure the execution of the target operation or cancel the target operation.
  • module processing device for the front-background separation system processes the operation for the module, it only uses the division of the above-mentioned functional modules as an example.
  • the above-mentioned Function allocation is accomplished by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the module processing device for the front-background separation system provided by the above embodiment and the module processing method embodiment for the front-background separation system belong to the same concept, and its specific implementation process is detailed in the method embodiment, and will not be repeated here.
  • FIG. 8 is a schematic structural diagram of a terminal 800 provided in an embodiment of the present application.
  • the foregrounds involved in the foregoing embodiments can all be implemented through the structure shown in FIG. 8 .
  • the terminal 800 can be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, moving picture experts compress standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, moving picture experts compress standard audio Level 4) Player, laptop or desktop computer.
  • the terminal 800 may also be called user equipment, portable terminal, laptop terminal, desktop terminal and other names.
  • the terminal 800 includes: a processor 801 and a memory 802 .
  • the processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • the processor 801 may be realized by at least one hardware form among DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field-Programmable Gate Array, Field Programmable Gate Array), and Programmable Logic Array (Programmable Logic Array).
  • Processor 801 may also include a main processor and a coprocessor, and the main processor is a processor for processing data in a wake-up state, also known as a CPU (Central Processing Unit, central processing unit); the coprocessor is Low-power processor for processing data in standby state.
  • CPU Central Processing Unit, central processing unit
  • the coprocessor is Low-power processor for processing data in standby state.
  • the processor 801 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used for rendering and drawing the content that needs to be displayed on the display screen.
  • the processor 801 may also include an AI (Artificial Intelligence, artificial intelligence) processor, where the AI processor is used to process computing operations related to machine learning.
  • AI Artificial Intelligence, artificial intelligence
  • Memory 802 may include one or more computer-readable storage media, which may be non-transitory.
  • the memory 802 may also include high-speed random access memory, and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices.
  • the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 801 to implement the method provided by the method embodiment of the present application.
  • the terminal 800 may optionally further include: 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 through buses or signal lines.
  • Each peripheral device can be connected to the peripheral device interface 803 through a bus, a signal line or a circuit board.
  • the peripheral device includes: at least one of a radio frequency circuit 804 , a display screen 805 , a camera component 806 , an audio circuit 807 , a positioning component 808 and a power supply 809 .
  • the peripheral device interface 803 may be used to connect at least one peripheral device related to I/O (Input/Output, input/output) to the processor 801 and the memory 802 .
  • the processor 801, memory 802 and peripheral device interface 803 are integrated on the same circuit module or circuit board; in some other embodiments, any one of the processor 801, memory 802 and peripheral device interface 803 Or both may be implemented on a separate circuit module or circuit board, which is not limited in this embodiment.
  • the radio frequency circuit 804 is used to receive and transmit RF (Radio Frequency, radio frequency) signals, also called electromagnetic signals.
  • the radio frequency circuit 804 communicates with the communication network and other communication devices through electromagnetic signals.
  • the radio frequency circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals.
  • 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 codec circuit module set, a subscriber identity module card, and the like.
  • the radio frequency circuit 804 can communicate with other terminals through at least one wireless communication protocol.
  • the wireless communication protocol includes but is not limited to: metropolitan area network, mobile communication networks of various generations (2G, 3G, 4G and 5G), wireless local area network and/or WiFi (Wireless Fidelity, wireless fidelity) network.
  • the radio frequency circuit 804 may also include circuits related to NFC (Near Field Communication, short distance wireless communication), which is not limited in this application.
  • the display screen 805 is used to display a UI (User Interface, user interface).
  • the UI can include graphics, text, icons, video, and any combination thereof.
  • the display screen 805 also has the ability to collect touch signals on or above the surface of the display screen 805 .
  • the touch signal can be input to the processor 801 as a control signal for processing.
  • the display screen 805 can also be used to provide virtual buttons and/or virtual keyboards, also called soft buttons and/or soft keyboards.
  • the display screen 805 there may be one display screen 805, which is set on the front panel of the terminal 800; in other embodiments, there may be at least two display screens 805, which are respectively arranged on different surfaces of the terminal 800 or in a folding design; In other embodiments, the display screen 805 may be a flexible display screen, which is disposed on a curved surface or a folded surface of the terminal 800 . Even, the display screen 805 can also be set as a non-rectangular irregular figure, that is, a special-shaped screen.
  • the display screen 805 can be made of LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, organic light-emitting diode) and other materials.
  • the camera assembly 806 is used to capture images or video.
  • the camera component 806 includes a front camera and a rear camera.
  • the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal.
  • there are at least two rear cameras which are any one of the main camera, depth-of-field camera, wide-angle camera, and telephoto camera, so as to realize the fusion of the main camera and the depth-of-field camera to realize the background blur function.
  • camera assembly 806 may also include a flash.
  • the flash can be a single-color temperature flash or a dual-color temperature flash. Dual color temperature flash refers to the combination of warm light flash and cold light flash, which can be used for light compensation under different color temperatures.
  • Audio circuitry 807 may include a microphone and speakers.
  • the microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals and input them to the processor 801 for processing, or input them to the radio frequency circuit 804 to realize voice communication.
  • the microphone can also be an array microphone or an omnidirectional collection microphone.
  • the speaker is used to convert the electrical signal from the processor 801 or the radio frequency circuit 804 into sound waves.
  • the loudspeaker can be a conventional membrane loudspeaker or a piezoelectric ceramic loudspeaker.
  • the audio circuit 807 may also include a headphone jack.
  • the positioning component 808 is used to locate the current geographic location of the terminal 800 to implement navigation or LBS (Location Based Service, location-based service).
  • LBS Location Based Service, location-based service
  • the power supply 809 is used to supply power to various components in the terminal 800 .
  • the power source 809 can be alternating current, direct current, disposable batteries or rechargeable batteries.
  • the rechargeable battery can support wired charging or wireless charging.
  • the rechargeable battery can also be used to support fast charging technology.
  • the terminal 800 further includes one or more sensors 810 .
  • the one or more sensors 810 include, but are not limited to: an acceleration sensor 811 , a gyroscope sensor 812 , a pressure sensor 813 , a fingerprint sensor 814 , an optical sensor 815 and a proximity sensor 816 .
  • the acceleration sensor 811 can detect the acceleration on the three coordinate axes of the coordinate system established by the terminal 800 .
  • the acceleration sensor 811 can be used to detect the components of the acceleration of gravity on the three coordinate axes.
  • the processor 801 may control the display screen 805 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 811 .
  • the acceleration sensor 811 can also be used for collecting game or user's motion data.
  • the gyro sensor 812 can detect the body direction and rotation angle of the terminal 800 , and the gyro sensor 812 can cooperate with the acceleration sensor 811 to collect 3D actions of the user on the terminal 800 .
  • the processor 801 can realize the following functions: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control and inertial navigation.
  • the pressure sensor 813 may be disposed on a side frame of the terminal 800 and/or a lower layer of the display screen 805 .
  • the pressure sensor 813 When the pressure sensor 813 is set on the side frame of the terminal 800 , it can detect the user's grip signal on the terminal 800 , and the processor 801 performs left and right hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 813 .
  • the processor 801 controls the operable controls on the UI interface according to the user's pressure operation on the display screen 805.
  • the operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
  • the fingerprint sensor 814 is used to collect the user's fingerprint, and the processor 801 recognizes the identity of the user according to the fingerprint collected by the fingerprint sensor 814, or, the fingerprint sensor 814 recognizes the user's identity according to the collected fingerprint. When the identity of the user is recognized as a trusted identity, the processor 801 authorizes the user to perform relevant sensitive operations, such sensitive operations include unlocking the screen, viewing encrypted information, downloading software, making payment, and changing settings.
  • the fingerprint sensor 814 may be provided on the front, back or side of the terminal 800 . When the terminal 800 is provided with a physical button or a manufacturer's logo, the fingerprint sensor 814 may be integrated with the physical button or the manufacturer's Logo.
  • the optical sensor 815 is used to collect ambient light intensity.
  • the processor 801 may control the display brightness of the display screen 805 according to the ambient light intensity collected by the optical sensor 815 . Specifically, when the ambient light intensity is high, the display brightness of the display screen 805 is increased; when the ambient light intensity is low, the display brightness of the display screen 805 is decreased.
  • the processor 801 may also dynamically adjust shooting parameters of the camera assembly 806 according to the ambient light intensity collected by the optical sensor 815 .
  • the proximity sensor 816 also called a distance sensor, is usually arranged 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 .
  • the processor 801 controls the display screen 805 to switch from the bright screen state to the off-screen state; when the proximity sensor 816 detects When the distance between the user and the front of the terminal 800 gradually increases, the processor 801 controls the display screen 805 to switch from the off-screen state to the on-screen state.
  • FIG. 8 does not constitute a limitation on the terminal 800, and may include more or less components than shown in the figure, or combine certain components, or adopt different component arrangements.
  • the embodiment of the present application also provides a non-transitory computer-readable storage medium.
  • the terminal can execute the method for the front-background separation system provided in the above embodiment. Module processing method.
  • the embodiment of the present application also provides a computer program product containing instructions, which, when run on the terminal, causes the terminal to execute the module processing method for the front-background separation system provided by the above-mentioned embodiment.
  • FIG. 9 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the backgrounds involved in the foregoing embodiments can all be implemented through the structure shown in FIG. 9 .
  • the server may be a server in a background server cluster. Specifically:
  • 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 also includes a basic input/output system (I/O system) 906 that facilitates the transfer of information between the various components within the computer, and a mass storage device 907 for storing an operating system 913, application programs 914, and other program modules 915 .
  • I/O system basic input/output system
  • the basic input/output system 906 includes a display 908 for displaying information and an input device 909 such as a mouse and a keyboard for a user to input information. Both the display 908 and the input device 909 are connected to the central processing unit 901 through the input and output controller 910 connected to the system bus 905 .
  • the basic input/output system 906 may also include an input output controller 910 for receiving and processing input from a number of other devices such as a keyboard, mouse, or electronic stylus. Similarly, input output controller 910 also provides output to a display screen, printer, or other type of output device.
  • Mass storage device 907 is connected to central processing unit 901 through a mass storage controller (not shown) connected to system bus 905 .
  • Mass storage device 907 and its associated computer-readable media provide non-volatile storage for server 900 . That is, mass storage device 907 may include computer-readable media (not shown), such as hard disks or CD-ROM drives.
  • Computer-readable media may comprise computer storage media and communication media.
  • Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of 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 technologies, CD-ROM, DVD or other optical storage, tape cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices.
  • the server 900 can also run on a remote computer connected to the network through a network such as the Internet. That is to say, the server 900 can be connected to the network 912 through the network interface unit 911 connected to the system bus 905, or can use the network interface unit 911 to connect to other types of networks or remote computer systems (not shown).
  • the above-mentioned memory also includes one or more programs, one or more programs are stored in the memory and configured to be executed by the CPU.
  • the one or more programs include a module processing method for the front-background separation system provided by the embodiment of the present application.
  • the embodiment of the present application also provides a non-transitory computer-readable storage medium.
  • the server can execute the front-background separation system provided by the above-mentioned embodiment. Module processing method.
  • the embodiment of the present application also provides a computer program product containing instructions, which, when running on the server, causes the server to execute the module processing method for the front-background separation system provided by the above-mentioned embodiment.
  • the program can be stored in a computer-readable storage medium.
  • the above-mentioned The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, and the like.

Abstract

一种用于前后台分离系统的模块处理方法、装置及存储介质,属于计算机技术领域。在该前后台分离系统中,后台的数据中心中存储的各模块的模块数据中包括模块的显示方式、模块的功能数据以及模块之间的逻辑关系,也即是后台中同时存储有前台数据和后台数据。该方法中,是以后台作为全部数据的数据中心。如此,前台在检测到针对目标模块的目标操作时,便可控制后台更新前后台数据,而在撤销目标操作时,同样控制后台更新前后台数据,从而保证执行目标操作或撤销目标操作过程中前台交互界面上显示的内容、以及前后台数据之间的一致性。

Description

用于前后台分离系统的模块处理方法、装置及存储介质 技术领域
本申请涉及计算机技术领域,特别涉及用于前后台分离系统的模块处理方法、装置及存储介质。
背景技术
前后台分离系统是指前台和后台相互独立的系统。所述前台可以指界面层,所述后台可以指功能层。
其中,前台用于提供交互界面,该交互界面上显示有包括多个模块的流程图,用户可以通过该交互界面触发针对某个模块的操作。
后台用于执行该操作相应的数据逻辑功能并提供数据存储功能。
当用户在前台触发针对某个模块的操作后,通常存在用户需要撤销该操作,或者在撤销该操作后又需要重新执行该操作的场景。
上述场景下,如何对该操作进行撤销或重做可能涉及到前后台数据的同步,因此亟需研究一种能够基于前后台分离系统的模块处理方法,以使用户能够在前后台分离系统中实现针对模块的操作的撤销或重做。
发明内容
本申请实施例提供了用于前后台分离系统的模块处理方法、装置及存储介质,可以实现前后台分离系统中的用户操作的撤销或重做。
第一方面,提供了一种用于前后台分离系统的模块处理方法,所述前后台分离系统包括前台和后台,所述前台显示有交互界面,所述交互界面用于显示多个模块,所述后台配置有数据中心,所述数据中心用于存储各所述多个模块的模块数据,所述模块数据中包括所述模块的显示方式、所述模块的功能数据以及所述模块与各其他模块之间的逻辑关系;
所述方法包括:
响应于针对目标模块的目标操作,所述前台基于所述目标操作控制所述后台更新所述数据中心中和所述目标模块对应的数据,所述前台基于更新后的和所述目标模块对应的所述数据,更新所述交互界面,所述目标模块为所述多个模块中的一个或多个模块;
在检测到针对所述目标操作的撤销指令的情况下,所述前台基于所述撤销指令控制所述后台恢复所述数据中心中和所述目标模块对应的所述数据,所述前台基于恢复后的和所述目标模块对应的所述数据,更新所述交互界面。
第二方面,提供了一种用于前后台分离系统的模块处理装置,
所述前后台分离系统包括前台和后台,所述前台显示有交互界面,所述交互界面用于显示多个模块,所述后台配置有数据中心,所述数据中心用于存储各所述多个模块的模块数据,所述模块数据中包括所述模块的显示方式、所述模块的功能数据以及所述模块与各其他模块之间的逻辑关系;
所述装置包括:
第一控制模块,用于响应于针对目标模块的目标操作,使所述前台基于所述目标操作控制所述后台更新所述数据中心中和所述目标模块对应的数据,并使所述前台基于更新后的和所述目标模块对应的所述数据,更新所述交互界面,所述目标模块为所述多个模块中一个或多个模块;
第二控制模块,用于在检测到针对所述目标操作的撤销指令的情况下,使所述前台基于所述撤销指令控制所述后台恢复所述数据中心中和所述目标模块对应的所述数据,并使所述前台基于恢复后的和所述目标模块对应的所述数据,更新所述交互界面。
第三方面,提供了一种用于前后台分离系统的模块处理装置,所述装置包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为执行上述第一方面提供的用于前后台分离系统的模块处理方法中的任一步骤。
第四方面,提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,所述指令被处理器执行时实现上述第一方面提供的用于前后台分离系统的模块处理方法中的任一步骤。
第五方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面提供的用于前后台分离系统的模块处理方法中的任一步骤。
本申请实施例提供的技术方案带来的有益效果至少包括:
在本申请实施例提供的前后台分离系统中,后台的数据中心中存储的模块数据中包括模块的显示方式、模块的功能数据以及模块之间的逻辑关系,也即是后台中同时存储有前台数据和后台数据。由此可知,在本申请实施例中,是以后台作为全部数据的数据中心。如此,前台在检测到针对目标模块的目标操作时,便可控制后台更新前后台数据,而在撤销目标操作时,同样控制后台更新前后台数据,从而保证执行目标操作或撤销目标操作过程中前台交互界面上显示的内容、以及前后台数据之间的一致性。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种前后台分离系统的架构示意图;
图2是本申请实施例提供的一种用于前后台分离系统的模块处理方法流程图;
图3是本申请实施例提供的一种流程图示意图;
图4是本申请实施例提供的另一种流程图示意图;
图5是本申请实施例提供的一种删除模块的示意图;
图6是本申请实施例提供的另一种用于前后台分离系统的模块处理方法流程图;
图7是本申请实施例提供的一种用于前后台分离系统的模块处理装置的结构示意图;
图8是本申请实施例提供的一种终端的结构示意图;
图9是本申请实施例提供的一种服务器结构示意图。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在前后台分离系统中,前台用于做软件界面显示,提供可供用户操作的交互界面,后台提供具体的功能逻辑和记录数据。典型的C/S(client/server,客户端/服务端),B/S(browser/server,浏览器/服务端)系统都属于前后台分离系统。
目前,在机器视觉行业或其它行业,预先提炼出一些不同的功能模块(功能模块也称为功能单元),通过组合这些功能模块实现某种特定组合功能。将功能模块以一定的顺序排列起来,并配置它们之间关系的过程,就是流程配置。提供流程配置功能的软件就是流程配置系统。考虑到流程配置系统的前台提供的交互界面上通常是一个图形化的流程图,因此流程配置系统也称为图形化流程配置系统。
流程配置系统是一种典型的前后台分离系统。本申请实施例提供的模块处理方法就可以应用于在流程配置系统中。可选地,本申请实施例提供的模块处理方法也可以应用在其他的前后台分离系统中,本申请实施例对此不作限定。
为了后续便于说明,在此对本申请实施例涉及的两个概念先做简单介绍。
撤销:用户与软件系统进行交互时,因用户的需要,将软件的状态回退到最后一步操作之前的状态,这就是一次撤销。撤销可以串连,即可以撤销多次,回到多次操作之前的状态。
重做:与撤销动作相反,当软件因撤销到达某种状态时,因用户的需要,将软件状态前进到最后一次撤销之前的状态,就是重做。重做也可以串连,即重做多次,恢复被撤销多次之前的状态。
撤销或重做的目的是将软件的状态重置到最后一个操作到之前N个操作之间的任意一个操作后的状态上,即让用户有机会对自己的行为反悔。
在前后台分离系统中,前台提供可供用户操作的交互界面,后台提供数据逻辑功能及存储。在这样的系统中,如何在实现撤销或重做的同时还能保证前后台数据同步,以及在流程配置系统由于单个功能模块发生改变引发多个功能模块跟随改变的情况下,如何实现用户触发的操作的撤销或重做,这两个技术都是目前研究的热点。本申请实施例提供的模块处理方法可以实现上述两个技术,具体实现方式将在后续实施例中详细说明。
图1是本申请实施例提供的一种前后台分离系统的架构示意图。如图1所示,该前后台分离系统包括前台和后台。
其中,前台提供的交互界面上显示有模块1和模块2,以及模块1和模块2之间的连接关系。同时模块1是基于具体的显示方式显示的,模块2也是基于具体的显示方式显示的。图1中示例出了模块2的显示方式,该显示方式具体包括模块2的左上角的位置坐标为(200,300),模块2的高度(height)为30、模块2的宽度(width)为90,模块2的颜色(color)为橙色。
上述模块1和模块2的显示方式便可称为前台数据。其中,前台数据也称为界面数据。
后台提供具体的逻辑功能。如图1所示,后台中存储有这样一段代码,该代码如下:
(流程0:
模块1的功能数据
模块2的功能数据
连接关系:模块1指向模块2)。
该代码所指示的意义为:前台显示的为一个流程图,该流程图中包括两个功能模块,分别为模块1和模块2,且连接关系为模块1指向模块2,也即是,模块1的输出为模块2的输入。
上述代码中的模块1的功能数据指示模块1的内部执行逻辑,该内部执行逻辑用于指示如何基于模块1的输入得到模块1的输出。模块2的功能数据指示模块2的内部执行逻辑,该内部执行逻辑用于指示如何基于模块2的输入得到模块2的输出。上述代码通常称为后台数据,也即是,在本申请实施例中后台数据指示前台交互界面上显示的多个模块中每个模块的功能数据以及多个模块之间的逻辑关系。其中,后台数据也称为底层数据,后台也称为底层。
如图1所示,前台的交互界面中放了两个模块,其中模块2的左上角是在坐标(200,300),宽度为90,高度为30,颜色为橙色。后台存储模块之间的逻辑关系以及各个模块的功能数据。当将模块2删除时,对于后台来说,是后台数据中少了一个模块2的功能数据,以及一个连接关系。做撤销操作时,除了需要在后台恢复模块2的功能数据、以及模块2和模块1之间的连接关系,还要将前台交互界面上的位置,长宽,颜色也都恢复才能完全恢复到删除操作之前。
在这种场景下,如果将前台数据存储在前台,后台数据存储在后台,那么在撤销删除操作时,需要分别在前台恢复前台数据,在后台恢复功能数据和逻辑关系,这样很容易导致前后台数据的不一致。因此,在本申请实施例中,将所有数据配置为存储在唯一的中心,该中心即为后台。如此,将前台数据也存储在后台,撤销的时候只需恢复后台中存储的数据即可,然后前台再从后台获取前台数据。也即是,前台仅仅用于从后台获取前台数据并做展现,不作数据的存储,从而解决数据可能不一致的问题。由于在本申请实施例中,前台数据和后台数据均存储在后台,为了后续便于说明,将后台存储的数 据统称为模块数据。也即是,模块数据包括前台数据和后台数据。具体地,任一模块的模块数据中包括该模块的显示方式、该模块的功能数据以及该模块和各其他模块之间的逻辑关系。
需要说明的是,图1所示的前后台分离系统仅仅一种示例,并不构成对本申请实施例涉及的前后台分离系统的限定。
图2是本申请实施例提供的一种用于前后台分离系统的模块处理方法流程图。该方法应用于前后台分离系统中,前后台分离系统包括前台和后台。前台显示有交互界面,交互界面用于显示多个模块。后台配置有数据中心,该数据中心用于存储多个模块中各个模块的模块数据,任一模块的模块数据中包括该模块的显示方式、该模块的功能数据以及该模块和各其他模块之间的逻辑关系。具体地,如图2所示,该方法包括如下几个步骤。
步骤201:响应于针对目标模块的目标操作,前台基于目标操作控制后台更新数据中心中和目标模块对应的数据,前台基于更新后的和目标模块对应的数据,更新交互界面,目标模块为多个模块中的一个或多个模块,目标操作为针对目标模块的任意操作。
其中,和目标模块对应的数据包括数据中心中目标模块的模块数据,以及其他模块的模块数据中和目标模块有关的数据,该内容将在后面详细解释说明,在此先不阐述。
上述目标操作可以为针对目标模块的删除操作,也可以为针对目标模块的添加操作,或者针对目标模块的显示颜色等属性的修改操作。其中,删除操作具体是指删除交互界面上显示的目标模块,添加操作具体是指在交互界面上中添加目标模块。
示例地,在目标操作为针对目标模块的删除操作的情况下,步骤201具体是指:前台基于目标操作控制后台删除数据中心中目标模块的模块数据、以及其他模块的模块数据中和目标模块有关的数据,基于删除数据后的数据中心重新显示交互界面。
又示例地,在目标操作为针对目标模块的添加操作的情况下,步骤201具体是指:前台基于目标操作控制后台在数据中心中添加目标模块的模块数据,以及在其他模块的模块数据中添加和目标模块有关的数据,基于添加数据后的数据中心,重新显示交互界面。
在一种可能的实现方式中,交互界面中显示有模块删除控件以及模块添加控件,当前台检测到用户针对该模块删除控件以及模块添加控件的选择操作时,便可确定检测到针对目标模块的目标操作,此时,便可通过步骤201执行目标操作。
前台在检测到该目标操作之后,前台基于目标操作控制后台更新数据中心中和目标模块对应的数据,基于更新后的数据中心中和目标模块对应的数据,更新交互界面,从而实现交互界面、前后台数据的一致性。
上述和目标模块对应的数据包括目标模块的模块数据,以及其他模块的模块数据中和目标模块有关的数据。其中,目标模块的模块数据包括目标模块的功能数据、目标模块的显示方式以及目标模块和各其他模块之间的逻辑关系。目标模块的功能数据指示目标模块的内部执行逻辑,该内部执行逻辑用于指示如何基于目标模块的输入得到目标模块的输出。目标模块的显示方式示例地包括目标模块的显示位置、显示大小以及显示颜色等等。各其他模块的模块数据中和目标模块有关的数据包括该其他模块和目标模块之间的逻辑关系。
在一种可能的实现方式中,目标模块和各其他模块之间的逻辑关系包括目标模块和该其他模块之间的连接关系。该连接关系指示交互界面上目标模块和该其他模块之间的连线关系,该连线关系具体指示在流程图的执行过程中目标模块和该其他模块之间的执行顺序。比如,目标模块为图1所示的模块1,其他模块为模块2,则目标模块和其他模块的连接关系可以指示先执行模块1的内部执行逻辑,再执行模块2的内部执行逻辑。
在前后台分离系统为流程配置系统的情况下,图3是本申请实施例提供的一种流程图示意图,在前台看到的流程图通常如图3所示。而图3所示的流程图中各个模块之间 的连接关系仅仅代表了执行顺序,模块与模块之间是有数据交互的,前面模块的输出需要作为后序模块的输入或参数参与运算,否则这个流程就没有意义。如果加上输入输出与模块本身的参数,实际的流程图会比图3所示的流程图复杂很多。
图4是本申请实施例提供的另一种流程图示意图。如图4所示,模块与模块之间除了连接关系之外,还有内部复杂的参数、输入、输出之间的订阅关系。比如,某个模块的内部参数可能是执行顺序中上一个模块的输出,该模块的输出又可能是执行顺序中下一个模块的内部参数,或者某个模块的输出可能是执行顺序中下一个模块的输入等等。也即是,某个模块有可能订阅之前的某个模块的输入或输出。所以流程图其实是一个非常复杂的单向网络。当删除某一个模块时,不仅影响模块本身,还影响流程图上所有后序模块与它,以及它前序模块的订阅关系。
因此,在另一种可能的实现方式中,目标模块和各其他模块之间的逻辑关系除了包括上述目标模块和该其他模块之间的连接关系外,还可以包括目标模块和该其他模块之间的订阅关系。该订阅关系指示目标模块的内部参数、输入中的至少一个与该其他模块的输出之间的关联关系、和/或、目标模块的输出与该其他模块的内部参数、输入中的至少一个之间的关联关系、和/或、目标模块的输入和该其他模块的输出之间的关联关系。
也即是,在本申请实施例中,对于任一模块,该模块和各其他模块之间的逻辑关系包括该模块和该其他模块之间的连接关系,以及该模块和该其他模块之间的订阅关系。该连接关系指示显示界面上该模块和该其他模块之间的连线关系。订阅关系指示该模块的内部参数和该其他模块的输出之间的关联关系、和/或、该模块的输出和该其他模块的内部参数之间的关联关系、和/或、该模块的输出和该其他模块的输入之间的关联关系、和/或、该模块的输入和该其他模块的输出之间的关联关系。也即,订阅关系指示该模块的内部参数、输入中的至少一个与该其他模块的输出之间的关联关系、和/或、该模块的输出与该其他模块的内部参数、输入中的至少一个之间的关联关系。
需要说明的是,每个模块的内部参数可以为1个、也可以为多个。此外,每个模块的输出可以为1个或多个,每个模块的输入也可以为1个或多个。前述的关联关系是一个上位概念的关联关系,可以包括具体的一个参数和另一个具体的参数之间的关联关系也可以包括多个参数分别和其他参数之间的关联关系。比如,目标模块的内部参数和其他模块的输出之间的关联关系可以是指:其他某个模块的一个输出为目标模块的一个内部参数,或者,其他某个模块的两个输出分别为目标模块的两个内部参数,或者,其他两个模块各自的一个输出分别为目标模块的两个内部参数中的一个。前述示例仅仅用于举例说明,并不构成对本申请实施例涉及的关联关系的限定。
步骤202:在检测到针对目标操作的撤销指令的情况下,前台基于撤销指令控制后台恢复数据中心中和目标模块对应的数据,前台基于恢复后的和目标模块对应的数据,更新交互界面。
在一种可能的实现方式中,交互界面中显示有撤销操作控件,当前台检测到用户针对该撤销操作控件的选择操作时,便可确定检测到针对目标操作的撤销指令,此时,便可通过步骤202执行针对目标操作的撤销过程。
在目标操作为针对目标模块的删除操作的情况下,上述步骤202具体是指:前台基于撤销指令控制后台在数据中心中重新添加和目标模块对应的数据。
在目标操作为针对目标模块的添加操作的情况下,上述步骤202具体是指:前台基于撤销指令控制后台在数据中心中删除和目标模块对应的数据。
在本申请实施例中,上述步骤201和步骤202具体可以以前台为操作中心,也可以以后台为操作中心。其中,以前台为操作中心是指由前台来记录执行目标操作的各个具体操作,以后台为中心是指由后台来记录执行目标操作的各个具体操作,也即是两者的区别在于记录具体操作的文件是保存在前台还是后台。下面分两种实现方式分别说明。
(1)以前台为中心
此时,上述步骤201的实现过程可以为:前台基于目标操作向后台发送一个或多个第一数据更新指令,一个或多个第一数据更新指令中任一第一数据更新指令指示后台更新和目标模块对应的数据中的部分数据;前台基于发送该一个或多个第一数据更新指令生成操作记录。
比如,在目标操作为模块删除或模块添加的场景中,前台向后台发送第一逻辑关系更新指令和第一模块更新指令,并生成发送第一逻辑关系更新指令和第一模块更新指令的操作记录。第一逻辑关系更新指令指示后台基于目标操作更新数据中心各其他模块的模块数据中该其他模块和目标模块之间的逻辑关系,第一模块更新指令指示后台基于目标操作更新数据中心中目标模块的模块数据。
需要说明的是,上述操作记录用于指示各个第一数据更新指令的发送前后顺序,以及每个指令所指示数据变化情况。
此时,上述步骤202的实现过程可以为:前台基于操作记录指示的目标操作的逆操作向后台发送一个或多个第二数据更新指令,一个或多个第二数据更新指令中任一第二数据更新指令指示后台将各其他模块的模块数据中该其他模块和目标模块之间的逻辑关系恢复至执行目标操作之前的状态、或者指示将目标模块的模块数据恢复至执行目标操作之前的状态。
比如,在目标操作为模块删除或模块添加的场景中,前台基于操作记录所指示的目标操作的逆操作向后台发送第二逻辑关系更新指令和第二模块更新指令。第二逻辑关系更新指令指示后台将数据中心各其他模块的模块数据中目标模块和该其他模块之间的逻辑关系恢复至执行目标操作之前的状态,第二模块更新指令指示后台将数据中心中目标模块的模块数据恢复至执行目标操作之前的状态,以便于后续前台从后台获取更新后的和目标模块对应的数据,基于更新后的和目标模块对应的数据更新交互界面。
具体地,在目标操作为针对目标模块的删除操作的情况下,在执行目标操作时,前台是先向后台发送第一逻辑关系更新指令,再发送第一模块更新指令。如此,便可控制后台先删除各其他模块的模块数据中目标模块和该其他模块之间的逻辑关系,再删除目标模块的模块数据,并生成先发送第一逻辑关系更新指令,再发送第一模块更新指令的操作记录。而在撤销目标操作时,基于前述操作记录所指示的目标操作的逆操作,前台是先向后台发送第二模块更新指令,再发送第二逻辑关系更新指令。如此,便可控制后台先恢复数据中心中目标模块的模块数据,再恢复各其他模块的模块数据中目标模块和该其他模块之间的逻辑关系。
同样地,在目标操作为针对目标模块的添加操作的情况下,在执行目标操作时,前台是先向后台发送第一模块更新指令,再发送第一逻辑关系更新指令。如此,便可控制后台先在数据中心中添加目标模块的模块数据,再在数据中心各其他模块的模块数据中添加目标模块和该其他模块之间的逻辑关系,并生成先发送第一模块更新指令,再发送第一逻辑关系更新指令的操作记录。而在撤销目标操作时,基于前述操作记录所指示的目标操作的逆操作,前台是先向后台发送第二逻辑关系更新指令,再发送第二模块更新指令。如此,便可控制后台先删除数据中心各其他模块的模块数据中目标模块和该其他模块之间的逻辑关系,再删除数据中心中目标模块的模块数据。
按照上述顺序发送指令的目的在于:前台在撤销目标操作时,可以完全基于目标操作的逆操作来实现,以避免撤回不到执行目标操作前的状态。
比如,目标操作为对于图1所示模块2的删除操作时,如果以前台为中心,步骤201和步骤202的具体过程如下。
在执行目标操作时,包括如下几个过程:
1)前台向后台发送获取模块数据命令,前台接收后台发送的目标模块对应的数据,该目标模块对应的数据包括目标模块的模块数据、以及各其他模块的模块数据中和目标模块有关的数据;
2)前台对获取的目标模块对应的数据进行分析,确定要删除目标模块需要先删除各其他模块的模块数据中目标模块和该其他模块之间的逻辑关系,然后再删除目标模块的模块数据。基于该分析结果,前台向后台发送删除连线命令,也即是,发送上述第一逻辑关系更新指令,以指示后台删除数据中心中该其他模块的模块数据中目标模块和该其他模块之间的逻辑关系,并生成发送该第一逻辑关系更新指令对应的操作记录,为了后续便于说明,将该操作记录称为第一操作记录。其中,后台在删除逻辑关系时,先备份目标模块相关的连接数据至其他存储地方,也即是备份指示目标模块与各其他模块之间的逻辑关系,然后再将后台数据中目标模块相关的连接数据删除,以便于后续快速恢复删除的数据。
3)前台向后台发送删除模块命令,也即是,发送上述第一模块更新指令,以指示后台删除目标模块的模块数据,并生成发送该第一逻辑关系更新指令对应的操作记录,为了后续便于说明,将该操作记录称为第二操作记录。其中,后台删除目标模块的模块数据时,后台备份目标模块的模块数据至其他存储地方,然后再删除后台数据中的目标模块的模块数据,以便于后续快速恢复删除的数据。
在撤销目标操作时,包括如下几个过程:
1)由于第一操作记录在第二操作记录之前生成,为了实现上述目标操作的逆操作,前台先基于第二操作记录向后台发送导入模块命令,也即是,发送上述第二模块更新指令,以指示后台在数据中心中添加目标模块的模块数据。
2)然后前台基于第一操作记录向后台发送模块1与模块2建立连接命令,也即是,发送上述第二逻辑关系更新指令,以指示后台在数据中心各其他模块的模块数据中添加中目标模块和该其他模块之间的逻辑关系。
3)前台向后台获取模块界面数据,该模块界面数据即为目标模块的模块数据中目标模块的显示方式,基于获取的显示方式在交互界面上重新显示目标模块。
上述整个过程以前台为驱动,后台被动响应,提供一些数据获取、导入的基本接口。
目前,前台向后台发送指令是通过调用后台的接口来实现的,也即是,后台提供一系列接口。当前台需要发送指令时,调用后台的某个接口发送该指令以控制后台执行某些具体操作。比如,后台提供逻辑关系删除接口以及模块删除接口,这种场景下,如果目标操作为删除模块,前台向后台发送的第一逻辑关系更新指令便可通过调用该逻辑关系删除接口来实现,前台向后台发送的第一模块更新指令便可通过调用该模块删除接口来实现。
上述以前台为中心的实现方式中,具体操作有哪几步,以及影响范围前台最清楚,后台只提供接口,不用关心具体业务,因此撤销过程中系统更容易稳定。
(2)以后台为中心
此时,上述步骤201的实现过程可以为:前台基于目标操作更新交互界面,然后前台向后台发送更新指令,该更新指令指示后台基于目标操作更新数据中心各其他模块的模块数据中该其他模块和目标模块之间的逻辑关系、以及数据中心中目标模块的模块数据。同时后台生成和前述每个操作对应的操作记录。
相应地,上述步骤202的实现过程可以为:前台向后台发送恢复指令,该恢复指令指示:后台根据本地存储的操作记录所指示的目标操作的逆操作,将数据中心各其他模块的模块数据中该其他模块和目标模块之间的逻辑关系、以及数据中心中目标模块的模块数据恢复至执行目标操作之前的状态。前台从后台获取更新后的目标模块的模块数据中的显示方式,基于更新后的显示方式更新交互界面。
比如,目标操作为对于图1所示模块2的删除操作时,如果以后台为中心,步骤201和步骤202的具体过程如下。
在执行目标操作时,包括如下几个过程:
1)前台检测到模块清理指令后,先删除交互界面上的目标模块,然后向后台发送模 块删除指令,该模块删除指令携带目标模块的标识。
2)后台接收到模块删除指令后,先备份各其他模块的模块数据中与目标模块相关的连接数据至其他存储地方,然后再将数据中心中各其他模块的模块数据中与目标模块相关的连接数据删除,并生成与该连接数据删除操作对应的操作记录,标记为第三操作记录。其中,各其他模块的模块数据中与目标模块相关的连接数据指示目标模块和该其他模块之间的逻辑关系。
3)后台备份目标模块的模块数据至其他存储地方,并删除数据中心中目标模块的模块数据,并生成与该模块数据删除操作对应的操作记录,标记为第四操作记录。
在撤销目标操作时,包括如下几个过程:
1)前台向后台发送撤销命令。
2)后台查询操作记录,基于上述第四操作记录找到最后一个操作为删除模块的模块数据,执行删除模块的模块数据的逆操作,也即是从备份的数据中将目标模块的模块数据导入数据中心。
3)后台查询操作记录,基于上述第三操作记录找到删除模块数据的上一个操作为删除模块连接数据,执行删除模块连接数据的逆操作,也即是从备份的数据中将各其他模块的模块数据中与目标模块相关的连接数据添加至数据中心。
4)后台通知前台撤销完毕,前台向后台获取最新的目标模块的显示方式,更新交互界面。
整个过程以前台发送指令为驱动,后台提供全套数据记录与逆操作,实现数据删除与恢复。前台做数据查询与更新。需要说明的是,在前述以前台为中心的实现方式中具体操作有哪几步,以及影响范围前台最清楚,便于开发人员随时了解目标操作的实际处理情况并对目标操作的实际处理情况进行掌控。因此,在应用本申请实施例时,可以考虑使用以前台为中心的实现方式。
此外,上述涉及的删除目标模块对应的数据实际实现方式可以有多种。如图4所示,实际的流程图是非常复杂的,这种情况下,如果目标操作为针对目标模块的删除操作,为了应对这种复杂关系下的撤销重做,针对比较复杂的删除然后撤销场景,有两种策略。
1)假删策略。当基于目标操作删除目标模块时,只是将这个目标模块的模块数据置为删除标记,并不真正删除,然后清理各其它模块与被删的目标模块之间的逻辑关系。当撤销目标操作时,将删除标记去除,并恢复数据中心中各其它模块与该目标模块之间的逻辑关系。
也即是,在假删策略中,前述前台基于目标操作依次向后台发送一个或多个第一数据更新指令的具体实现方式可以为:前台先向后台发送第一逻辑关系更新指令,再发送第一模块更新指令之后,后台在接收到第一逻辑关系更新指令时,后台删除各其它模块的模块数据中该其他模块与目标模块之间的逻辑关系,后台在接收到第一模块更新指令时,为数据中心中目标模块的模块数据添加删除标记。
相应地,前台基于操作记录指示的目标操作的逆操作依次向后台发送一个或多个第二数据更新指令的具体实现方式可以为:基于操作记录所指示的目标操作的逆操作,前台先向后台发送第二模块更新指令,再发送第二逻辑关系更新指令,后台在接收到第二模块更新指令时,删除目标模块的模块数据的删除标记,后台在接收到第二逻辑关系更新指令时,在各其它模块的模块数据中添加该其他模块与目标模块之间的逻辑关系。
2)导出导入策略。当基于目标操作删除目标模块时,将这个目标模块对应的数据导出,然后再清理掉该目标模块对应的数据。当撤销时,导入该目标模块的模块数据,并基于之前导出的数据恢复各其它模块与该目标模块之间的连接和订阅关系。也即是,在删除数据时,先将相关的数据导出,然后再直接删除数据中心中的相关数据。
也即是,在导出导入策略中,前台基于目标操作依次向后台发送一个或多个第一数据更新指令的具体实现方式可以为:前台先向后台发送第一逻辑关系更新指令,再发送 第一模块更新指令,以控制后台先删除数据中心各其他模块的模块数据中目标模块和该其他模块之间的逻辑关系,再删除目标模块的模块数据。
相应地,前台基于操作记录指示的目标操作的逆操作依次向后台发送一个或多个第二数据更新指令的具体实现方式可以为:基于操作记录所指示的目标操作的逆操作,前台先向后台发送第二模块更新指令,再发送第二逻辑关系更新指令,以控制后台先恢复数据中心中目标模块的模块数据,再恢复各其他模块的模块数据中目标模块和该其他模块之间的逻辑关系。
另外,在上述假删策略中,由于前后台数据同步的关系,当删除一个模块后,若前后台只做标记删除,那么在执行整个流程图的过程时,需要对标记删除模块做特殊处理,将它忽略掉,不触发执行。当这种特殊数据多了之后,会影响前后台数据的可维护性,造成不稳定。因此,在应用本申请实施例时,可以考虑通过导入导出策略来删除目标模块。
此外,在上述导出导入策略中,为了便于后续快速恢复删掉的数据,前台在先向后台发送第一逻辑关系更新指令,再发送第一模块更新指令之前,前台可以控制后台将数据中心中和所述目标模块对应的数据导出备份至参考存储位置。后续前台先向后台发送第二模块更新指令,再发送第二逻辑关系更新指令之后,响应于接收到的第二模块更新指令,后台从参考存储位置将目标模块的模块数据导入至数据中心,响应于接收到的第二逻辑关系更新指令,后台从参考存储位置将目标模块和各其他模块之间的逻辑关系导入至数据中心。
此外,在本申请实施例中,在目标操作为模块删除操作的情况下,可以同时对一批模块执行同一目标操作,也即是,存在批量删除操作的场景。在执行批量删除操作时,步骤201和步骤202中的目标模块的数量为多个。
这种场景下,同样可以有两种策略来实现上述目标操作的执行以及撤销目标操作。一种是以操作为中心,一种是以数据为中心。
第一种策略:以操作为中心。
其中,以操作为中心是指:在执行针对多个目标模块的目标操作时,将目标操作拆分为针对单个模块的多个子操作,也即是每个子操作仅仅针对一个模块,然后按照多个子操作的执行顺序依次执行这多个子操作,从而实现针对多个目标模块的目标操作。在执行针对多个目标模块的目标操作时,每执行一个子操作,均生成并存储针对该子操作的一个操作记录。在撤销针对这多个目标模块的目标操作时,按照存储的操作记录所指示的子操作的逆操作完成撤销动作。
在以操作为中心的策略中,前述前台先向后台发送第一逻辑关系更新指令的具体实现方式可以为:前台向后台发送订阅关系删除指令A,订阅关系删除指令A指示后台针对各目标模块,删除后执行模块分别与先执行模块和目标模块之间的订阅关系,后执行模块为前台显示的流程图中位于目标模块后执行的模块,先执行模块为流程图中位于目标模块前执行的模块;前台向后台发送订阅关系删除指令B,订阅关系删除指令B指示后台删除多个目标模块之间的订阅关系;前台向后台发送订阅关系删除指令C,订阅关系删除指令C指示后台删除各目标模块与先执行模块之间的订阅关系;前台向后台发送连接关系删除指令A,连接关系删除指令A指示后台删除后执行模块分别与各目标模块之间的连接关系;前台向后台发送连接关系删除指令B,连接关系删除指令B指示后台删除多个目标模块之间的连接关系;前台向后台发送连接关系删除指令C,连接关系删除指令C指示后台删除各目标模块与先执行模块之间的连接关系。
前台在通过上述实现方式发送第一逻辑关系更新指令之后,再向后台发送第一模块更新指令,以控制后台删除多个目标模块中各个目标模块的模块数据中的剩余数据。
也即是,在以操作为中心的策略中,前台先对多个目标模块之间、以及多个目标模块中每个目标模块和和各其他模块之间的订阅关系以及连线关系进行分析,通过多条第 一逻辑关系更新指令删掉这些订阅关系以及连线关系,然后再删除各个目标模块的模块数据。
第二种策略:以数据为中心。
以数据为中心是指:在执行针对多个目标模块的目标操作时,将多个目标模块看做一个整体,此时,如果需要删除这多个目标模块,则以整体方式删除这多个目标模块的模块数据,然后再更新这多个目标模块中边缘目标模块和其他模块之间的逻辑关系。其中,边缘目标模块为这多个目标模块中和其他模块存在逻辑关系的目标模块。在更新模块数据以及更新逻辑关系时同样生成操作记录,在撤销针对这多个目标模块的目标操作时,按照存储的操作记录所指示的目标操作的逆操作完成撤销动作。
在以数据为中心的策略中,前台先向后台发送第一逻辑关系更新指令,再发送第一模块更新指令的具体实现方式可以为:前台向后台发送第一订阅关系删除指令,第一订阅关系删除指令指示后台删除各其他模块的模块数据中该其他模块和边缘目标模块之间的订阅关系;前台向后台发送第一连接关系删除指令,第一连接关系删除指令指示后台删除各其他模块的模块数据中该其他模块和边缘目标模块之间的连接关系;前台向后台发送第一模块删除指令,第一模块删除指令指示后台删除多个目标模块的模块数据。
也即是,在以数据为中心的策略中,前台只需对多个目标模块中边缘目标模块和和其他模块之间的订阅关系以及连线关系进行分析,通过多条第一逻辑关系更新指令删掉这些订阅关系以及连线关系,然后再删除各个目标模块的模块数据。无需对各个目标模块内部的订阅关系或连线关系进行逐个删除,从而节省了目标操作所需的时长。
图5是本申请实施例提供的一种删除模块的示意图,适用于删除操作、添加操作撤销、删除操作重做等。如图5所示,当删除流程图中模块2至模块5时,有两种策略。
一、以操作为中心,将批量操作分解为针对单个模块的子操作的组合,各个子操作具体如下:
1)依次删除模块6~10与模块1~5的订阅关系,也即是分别删除模块6-10中每个模块和模块1-5中每个模块之间的订阅关系;
2)依次删除模块3~5与模块1~2的订阅关系,也即是分别删除模块3-5中每个模块和模块1-2中每个模块之间的订阅关系;
3)删除模块2与模块1的订阅关系;
4)依次删除模块6与模块3的连线,模块7与模块4的连线,模块8与模块5的连线,也即是分别删除模块6和模块3之间的连接关系,模块7和模块4之间的连接关系,模块8和模块5之间的连接关系;
5)依次删除模块3~5与模块2的连线,也即是分别删除模块3-5中每个模块和模块2之间的连接关系;
6)删除模块2与模块1的连线,也即是删除模块2和模块1之间的连接关系;
7)依次删除模块3~5,也即是删除模块3~5中每个模块的模块数据;
8)删除模块2,也即是删除模块2的模块数据。
撤销时,按8)到1)的顺序逆向做一遍,将模块数据、连接关系、订阅关系一个个添加回来,从而实现撤销针对模块2至模块5的删除操作。
二、以数据为中心,批量导入导出策略:
1)将数据中心中模块2~5各自的模块数据作为一个整体导出备份至参考位置。
2)将模块6~10的模块数据中与模块1~5之间的订阅关系删除,并生成操作记录。也即是,将模块6-10看做一个整体,将模块1-5也看做一个整体,删除模块6-10这个整体的模块数据中和模块1-5这个整体之间的订阅关系,该订阅关系具体是模块2-5中边缘模块3/4/5和其他模块6-10之间的订阅关系。
3)将其他模块的模块数据中与模块2~5之间的连接关系删除,并删除模块2~5各自的模块数据,并生成操作记录。
撤销时:
1)将模块2~5各自的模块数据作为一个整体导入;
2)用操作记录恢复其它模块与模块2~5的连线。具体包括模块1的模块数据中与模块2-5之间的连接关系,以及模块6-10中任一模块的模块数据中与模块2-5之间的连接关系;
3)用操作记录恢复模块6~10与模块1~5的订阅关系。具体包括模块1的模块数据中与模块2-5之间的订阅关系,以及模块6-10中任一模块的模块数据中与模块2-5之间的订阅关系。
上述第一种策略中将批量操作转换成很多单一操作的问题在于,处理顺序决定了撤销顺序,一旦顺序出错,在恢复连接关系时发现模块还未恢复,就会导致出错。即使全部恢复完,也可能会少了某个模块与模块之间的连接关系,从而不能将流程图彻底恢复到之前的状态。而上述第二种策略中批量导入导出策略只需要记录被导出的整体与周边的关系,被导出的整体内部关系已经包含在导出模块的模块数据中。在撤销或重做时,只需要先导入模块的模块数据,再恢复各其它模块与该整体的外围关系即可。
此外,在本申请实施例中,第一种策略中以操作为中心的策略适合用在单个模块的数据变化的撤销重做场景。比如:将某个模块的位置或颜色修改后,执行位置或颜色变化的逆操作是最经济有效的方法。
因此,在一种可能的实现方式中,在目标模块的数量为一个的情况下,前台基于目标操作向后台发送一个或多个第一数据更新指令之前,前台可以将目标操作拆分一个或多个子操作。这种场景下,前述一个或多个第一数据更新指令和一个或多个子操作分别对应,后台基于一个或多个子操作完成目标操作。也即是,将目标操作拆分为多个子操作,然后逐步执行这多个子操作,并生成操作记录,以便于后续基于这多个子操作的操作记录撤销目标操作。
可选地,在撤销操作后,用户还可以反悔该撤销操作,也即是重新执行该操作。此时可以通过图6所示的步骤203实现上述重做过程。
步骤203:在检测到针对目标操作的重做指令的情况下,前台基于目标操作控制后台更新数据中心中和目标模块对应的数据,前台基于更新后的和目标模块对应的数据,更新交互界面。
步骤203的实现方式具体和步骤201的实现方式基本相同,在此不再赘述。
综上所述,在本申请实施例提供的前后台分离系统中,后台的数据中心中存储的模块数据中包括模块的显示方式、模块的功能数据以及模块之间的逻辑关系,也即是后台中同时存储有前台数据和后台数据。由此可知,在本申请实施例中,是以后台作为全部数据的数据中心。如此,前台在检测到针对目标模块的目标操作时,便可控制后台更新前后台数据,而在撤销目标操作时,同样控制后台更新前后台数据,从而保证执行目标操作或撤销目标操作过程中前台交互界面上显示的内容、以及前后台数据之间的一致性。
下面对本申请实施例提供的各个技术效果进行总结说明。
本申请实施例的创新点是对前后台分离系统的撤销或重做提出了几种现实可行的实现策略。
1)前后台都有数据时,可采用数据单中心策略,以后台来存储全部数据。
2)前后台分离时,对于操作记录,可以前台为中心。撤销或重做时,由前台来驱动整个撤销过程。
3)对于复杂、关系多的流程图,在删除撤销场景时,可采用导出导入数据方式而非假删策略。
4)对于复杂、关系多的流程图,批量的数据删除撤销时,可采用导出导入数据方式,而非操作组合方式。
5)对于流程图中,单数据变化,可采用以操作为中心的策略。
通过以上策略能将前后台分离系统的撤销或重做较好的实现,平衡实现复杂度,内存占用,系统稳定性。
上述所有可选技术方案,均可按照任意结合形成本申请的可选实施例,本申请实施例对此不再一一赘述。
图7是本申请实施例提供的一种用于前后台分离系统的模块处理装置的结构示意图,该装置可以由软件、硬件或者两者的结合实现。该装置应用于前后台分离系统中,前后台分离系统包括前台和后台,前台显示有交互界面,交互界面用于显示多个模块,后台配置有数据中心,数据中心用于存储多个模块各个模块的模块数据,任一模块的模块数据中包括该模块的显示方式、该模块的功能数据以及该模块与各其他模块之间的逻辑关系。
如图7所示,该装置700包括如下几个模块:
第一控制模块701,用于响应于针对目标模块的目标操作,使前台基于所述目标操作控制所述后台更新所述数据中心中和所述目标模块对应的数据,并使前台基于更新后的和所述目标模块对应的数据,更新所述交互界面,所述目标模块为所述多个模块中一个或多个模块,所述目标操作为针对所述目标模块的任意操作;
第二控制模块702,用于在检测到针对所述目标操作的撤销指令的情况下,使前台基于所述撤销指令控制所述后台恢复所述数据中心中和所述目标模块对应的数据,并使前台基于恢复后的和所述目标模块对应的数据,更新所述交互界面。
基于上述装置,在一种可能的实现方式中,如图7所示,该装置还包括:
第三控制模块703,用于在检测到针对所述目标操作的重做指令的情况下,使前台基于所述目标操作控制所述后台更新数据中心中和所述目标模块对应的数据,并使前台基于更新后的和所述目标模块对应的数据,更新所述交互界面。
基于上述装置,在一种可能的实现方式中,所述第一控制模块用于:
使前台基于所述目标操作依次向所述后台发送一个或多个第一数据更新指令,所述一个或多个第一数据更新指令中任一第一数据更新指令指示所述后台更新和所述目标模块对应的数据中的部分数据;
使前台基于发送所述一个或多个数据更新指令生成操作记录;
相应地,所述第二控制模块用于:
使前台基于所述操作记录指示的目标操作的逆操作依次向所述后台发送一个或多个第二数据更新指令,所述一个或多个第二数据更新指令中任一第二数据更新指令指示所述后台将所述数据中心中和所述目标模块对应的数据中的部分数据恢复至执行所述目标操作之前的状态。
基于上述装置,在一种可能的实现方式中,在所述目标操作为针对所述目标模块的添加操作的情况下,所述第一控制模块用于:
使前台先向所述后台发送第一模块更新指令,再发送第一逻辑关系更新指令,以控制所述后台先在所述数据中心中添加所述目标模块的模块数据,再在各其他模块的模块数据中添加所述目标模块和所述其他模块之间的逻辑关系;
相应地,所述第二控制模块用于:
使前台基于所述操作记录所指示的目标操作的逆操作,先向所述后台发送第二逻辑关系更新指令,再发送第二模块更新指令,以控制所述后台先删除所述数据中心各其他模块的模块数据中所述目标模块和所述其他模块之间的逻辑关系,再删除所述数据中心中所述目标模块的模块数据。
基于上述装置,在一种可能的实现方式中,在所述目标操作为针对所述目标模块的删除操作的情况下,所述第一控制模块用于:
使前台先向后台发送第一逻辑关系更新指令,再发送第一模块更新指令,以控制所述后台先删除所述数据中心各其他模块的模块数据中所述目标模块和所述其他模块之 间的逻辑关系,再删除数据中心中所述目标模块的模块数据;
相应地,所述第二控制模块用于:
使前台基于所述操作记录所指示的目标操作的逆操作,先向所述后台发送第二模块更新指令,再发送第二逻辑关系更新指令,以控制所述后台先恢复所述数据中心中所述目标模块的模块数据,再恢复各其他模块的模块数据中所述目标模块和所述其他模块之间的逻辑关系。
基于上述装置,在一种可能的实现方式中,在所述目标操作为针对所述目标模块的删除操作的情况下,所述第一控制模块用于:
使前台先向后台发送第一逻辑关系更新指令,再发送第一模块更新指令,以控制所述后台在接收到所述第一逻辑关系更新指令时删除数据中心各其它模块的模块数据中所述其他模块与所述目标模块之间的逻辑关系,以及控制所述后台在接收到所述第一模块更新指令时,为所述数据中心中所述目标模块的模块数据添加删除标记;
相应地,所述第二控制模块用于:
使前台基于所述操作记录所指示的目标操作的逆操作,先向所述后台发送第二模块更新指令,再发送第二逻辑关系更新指令,以控制所述后台在接收到所述第二模块更新指令时删除数据中心中所述目标模块的模块数据的删除标记,以及控制所述后台在接收到所述第二逻辑关系更新指令时在数据中心各其他模块的模块数据中添加所述其他模块与所述目标模块之间的逻辑关系。
基于上述装置,在一种可能的实现方式中,所述装置还包括:
导出模块,用于在所述前台先向后台发送所述第一逻辑关系更新指令,再发送所述第一模块更新指令之前,使所述前台控制所述后台将所述数据中心中和所述目标模块对应的数据导出备份至参考存储位置,所述目标模块对应的数据包括所述目标模块的模块数据、以及各其他模块的模块数据中所述目标模块和所述其他模块之间的逻辑关系;
导入模块,用于:
在所述前台先向所述后台发送所述第二模块更新指令,再发送所述第二逻辑关系更新指令之后,响应于接收到的第二模块更新指令,使所述后台从所述参考存储位置将所述目标模块的模块数据导入至所述数据中心,响应于接收到的第二逻辑关系更新指令,使所述后台从所述参考存储位置将所述目标模块和各所述其他模块之间的逻辑关系导入至所述数据中心。
基于上述装置,在一种可能的实现方式中,所述多个模块中任一模块和各其他模块之间的逻辑关系包括所述任一模块和各其他模块之间的连接关系,以及所述任一模块和所述各其他模块之间的订阅关系。所述连接关系指示所述交互界面上所述任一模块和各其他模块之间的连线关系,所述订阅关系指示所述任一模块的内部参数、输入中的至少一个与各其他模块的输出之间的关联关系、和/或、所述任一模块的输出与各其他模块的内部参数、输入中的至少一个之间的关联关系。
基于上述装置,在一种可能的实现方式中,在所述目标模块的数量为多个的情况下,所述第一控制模块用于:
使所述前台向所述后台发送第一订阅关系删除指令,所述第一订阅关系删除指令指示所述后台删除各其他模块的模块数据中所述其他模块和边缘目标模块之间的订阅关系,所述边缘目标模块为所述多个目标模块中和所述其他模块存在逻辑关系的目标模块;
使所述前台向所述后台发送第一连接关系删除指令,所述第一连接关系删除指令指示所述后台删除各其他模块的模块数据中所述其他模块和边缘目标模块之间的连接关系;
使前台向所述后台发送第一模块删除指令,所述第一模块删除指令指示所述后台删除所述多个目标模块的模块数据。
基于上述装置,在一种可能的实现方式中,在所述目标模块的数量为多个的情况下, 所述第一控制模块用于:
使所述前台向所述后台发送订阅关系删除指令A,所述订阅关系删除指令A指示所述后台针对各所述目标模块,删除后执行模块分别与先执行模块和所述目标模块之间的订阅关系,所述后执行模块为所述前台显示的流程图中位于所述目标模块后执行的模块,所述先执行模块为流程图中位于所述目标模块前执行的模块;
使所述前台向所述后台发送订阅关系删除指令B,所述订阅关系删除指令B指示所述后台删除所述多个目标模块之间的订阅关系;
使所述前台向所述后台发送订阅关系删除指令C,所述订阅关系删除指令C指示所述后台删除各所述目标模块与所述先执行模块之间的订阅关系;
使所述前台向所述后台发送连接关系删除指令A,所述连接关系删除指令A指示所述后台删除后执行模块分别与各所述目标模块之间的连接关系;
使所述前台向所述后台发送连接关系删除指令B,所述连接关系删除指令B指示所述后台删除所述多个目标模块之间的连接关系;
使所述前台向所述后台发送连接关系删除指令C,所述连接关系删除指令C指示所述后台删除各所述目标模块与所述先执行模块之间的连接关系;
使所述前台向所述后台发送第一模块删除指令,所述第一模块删除指令指示删除所述多个目标模块的模块数据中的剩余数据。
综上所述,在本申请实施例提供的前后台分离系统中,后台的数据中心中存储的模块数据中包括模块的显示方式、模块的功能数据以及模块之间的逻辑关系,也即是后台中同时存储有前台数据和后台数据。由此可知,在本申请实施例中,是以后台作为全部数据的数据中心。如此,前台在检测到针对目标模块的目标操作时,便可控制后台更新前后台数据,而在撤销目标操作时,同样控制后台更新前后台数据,从而保证执行目标操作或撤销目标操作过程中前台交互界面上显示的内容、以及前后台数据之间的一致性。
需要说明的是:上述实施例提供的用于前后台分离系统的模块处理装置在处理针对模块的操作时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的用于前后台分离系统的模块处理装置与用于前后台分离系统的模块处理方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图8是本申请实施例提供的一种终端800的结构示意图。前述实施例涉及的前台均可以通过图8所示的结构来实现。该终端800可以是:智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。终端800还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。
通常,终端800包括有:处理器801和存储器802。
处理器801可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器801可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、可编程逻辑阵列(Programmable Logic Array)中的至少一种硬件形式来实现。处理器801也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器801可以集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器801还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器802可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器802还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器802中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器801所执行以实现本申请中方法实施例提供的用于前后台分离系统的模块处理方法。
在一些实施例中,终端800还可选包括有:外围设备接口803和至少一个外围设备。处理器801、存储器802和外围设备接口803之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口803相连。具体地,外围设备包括:射频电路804、显示屏805、摄像头组件806、音频电路807、定位组件808和电源809中的至少一种。
外围设备接口803可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器801和存储器802。在一些实施例中,处理器801、存储器802和外围设备接口803被集成在同一电路模块或电路板上;在一些其他实施例中,处理器801、存储器802和外围设备接口803中的任意一个或两个可以在单独的电路模块或电路板上实现,本实施例对此不加以限定。
射频电路804用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路804通过电磁信号与通信网络以及其他通信设备进行通信。射频电路804将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路804包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码电路模块组、用户身份模块卡等等。射频电路804可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:城域网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路804还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。
显示屏805用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏805是触摸显示屏时,显示屏805还具有采集在显示屏805的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器801进行处理。此时,显示屏805还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏805可以为一个,设置终端800的前面板;在另一些实施例中,显示屏805可以为至少两个,分别设置在终端800的不同表面或呈折叠设计;在另一些实施例中,显示屏805可以是柔性显示屏,设置在终端800的弯曲表面上或折叠面上。甚至,显示屏805还可以设置成非矩形的不规则图形,也即异形屏。显示屏805可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。
摄像头组件806用于采集图像或视频。可选地,摄像头组件806包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件806还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。
音频电路807可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器801进行处理,或者输入至射频电路804以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端800的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器801 或射频电路804的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路807还可以包括耳机插孔。
定位组件808用于定位终端800的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。
电源809用于为终端800中的各个组件进行供电。电源809可以是交流电、直流电、一次性电池或可充电电池。当电源809包括可充电电池时,该可充电电池可以支持有线充电或无线充电。该可充电电池还可以用于支持快充技术。
在一些实施例中,终端800还包括有一个或多个传感器810。该一个或多个传感器810包括但不限于:加速度传感器811、陀螺仪传感器812、压力传感器813、指纹传感器814、光学传感器815以及接近传感器816。
加速度传感器811可以检测以终端800建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器811可以用于检测重力加速度在三个坐标轴上的分量。处理器801可以根据加速度传感器811采集的重力加速度信号,控制显示屏805以横向视图或纵向视图进行用户界面的显示。加速度传感器811还可以用于游戏或者用户的运动数据的采集。
陀螺仪传感器812可以检测终端800的机体方向及转动角度,陀螺仪传感器812可以与加速度传感器811协同采集用户对终端800的3D动作。处理器801根据陀螺仪传感器812采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。
压力传感器813可以设置在终端800的侧边框和/或显示屏805的下层。当压力传感器813设置在终端800的侧边框时,可以检测用户对终端800的握持信号,由处理器801根据压力传感器813采集的握持信号进行左右手识别或快捷操作。当压力传感器813设置在显示屏805的下层时,由处理器801根据用户对显示屏805的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。
指纹传感器814用于采集用户的指纹,由处理器801根据指纹传感器814采集到的指纹识别用户的身份,或者,由指纹传感器814根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器801授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器814可以被设置终端800的正面、背面或侧面。当终端800上设置有物理按键或厂商Logo时,指纹传感器814可以与物理按键或厂商Logo集成在一起。
光学传感器815用于采集环境光强度。在一个实施例中,处理器801可以根据光学传感器815采集的环境光强度,控制显示屏805的显示亮度。具体地,当环境光强度较高时,调高显示屏805的显示亮度;当环境光强度较低时,调低显示屏805的显示亮度。在另一个实施例中,处理器801还可以根据光学传感器815采集的环境光强度,动态调整摄像头组件806的拍摄参数。
接近传感器816,也称距离传感器,通常设置在终端800的前面板。接近传感器816用于采集用户与终端800的正面之间的距离。在一个实施例中,当接近传感器816检测到用户与终端800的正面之间的距离逐渐变小时,由处理器801控制显示屏805从亮屏状态切换为息屏状态;当接近传感器816检测到用户与终端800的正面之间的距离逐渐变大时,由处理器801控制显示屏805从息屏状态切换为亮屏状态。
本领域技术人员可以理解,图8中示出的结构并不构成对终端800的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
本申请实施例还提供了一种非临时性计算机可读存储介质,当所述存储介质中的指 令由终端的处理器执行时,使得终端能够执行上实施例提供的用于前后台分离系统的模块处理方法。
本申请实施例还提供了一种包含指令的计算机程序产品,当其在终端上运行时,使得终端执行上述实施例提供的用于前后台分离系统的模块处理方法。
图9是本申请实施例提供的一种服务器结构示意图。前述实施例涉及的后台均可以通过图9所示的结构来实现。该服务器可以是后台服务器集群中的服务器。具体来讲:
服务器900包括中央处理单元(CPU)901、包括随机存取存储器(RAM)902和只读存储器(ROM)903的系统存储器904,以及连接系统存储器904和中央处理单元901的系统总线905。服务器900还包括帮助计算机内的各个器件之间传输信息的基本输入/输出系统(I/O系统)906,和用于存储操作系统913、应用程序914和其他程序模块915的大容量存储设备907。
基本输入/输出系统906包括有用于显示信息的显示器908和用于用户输入信息的诸如鼠标、键盘之类的输入设备909。其中显示器908和输入设备909都通过连接到系统总线905的输入输出控制器910连接到中央处理单元901。基本输入/输出系统906还可以包括输入输出控制器910以用于接收和处理来自键盘、鼠标、或电子触控笔等多个其他设备的输入。类似地,输入输出控制器910还提供输出到显示屏、打印机或其他类型的输出设备。
大容量存储设备907通过连接到系统总线905的大容量存储控制器(未示出)连接到中央处理单元901。大容量存储设备907及其相关联的计算机可读介质为服务器900提供非易失性存储。也就是说,大容量存储设备907可以包括诸如硬盘或者CD-ROM驱动器之类的计算机可读介质(未示出)。
不失一般性,计算机可读介质可以包括计算机存储介质和通信介质。计算机存储介质包括以用于存储诸如计算机可读指令、数据结构、程序模块或其他数据等信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动介质。计算机存储介质包括RAM、ROM、EPROM、EEPROM、闪存或其他固态存储其技术,CD-ROM、DVD或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。当然,本领域技术人员可知计算机存储介质不局限于上述几种。上述的系统存储器904和大容量存储设备907可以统称为存储器。
根据本申请的各种实施例,服务器900还可以通过诸如因特网等网络连接到网络上的远程计算机运行。也即服务器900可以通过连接在系统总线905上的网络接口单元911连接到网络912,或者说,也可以使用网络接口单元911来连接到其他类型的网络或远程计算机系统(未示出)。
上述存储器还包括一个或者一个以上的程序,一个或者一个以上程序存储于存储器中,被配置由CPU执行。所述一个或者一个以上程序包含用于进行本申请实施例提供的用于前后台分离系统的模块处理方法。
本申请实施例还提供了一种非临时性计算机可读存储介质,当所述存储介质中的指令由服务器的处理器执行时,使得服务器能够执行上述实施例提供的用于前后台分离系统的模块处理方法。
本申请实施例还提供了一种包含指令的计算机程序产品,当其在服务器上运行时,使得服务器执行上述实施例提供的用于前后台分离系统的模块处理方法。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请实施例的较佳实施例,并不用以限制本申请实施例,凡在本申请实施例的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (23)

  1. 一种用于前后台分离系统的模块处理方法,其特征在于,所述前后台分离系统包括前台和后台,所述前台显示有交互界面,所述交互界面用于显示多个模块,所述后台配置有数据中心,所述数据中心用于存储各所述多个模块的模块数据,所述模块数据中包括所述模块的显示方式、所述模块的功能数据以及所述模块与各其他模块之间的逻辑关系;
    所述方法包括:
    响应于针对目标模块的目标操作,所述前台基于所述目标操作控制所述后台更新所述数据中心中和所述目标模块对应的数据,所述前台基于更新后的和所述目标模块对应的所述数据,更新所述交互界面,所述目标模块为所述多个模块中的一个或多个模块;
    在检测到针对所述目标操作的撤销指令的情况下,所述前台基于所述撤销指令控制所述后台恢复所述数据中心中和所述目标模块对应的所述数据,所述前台基于恢复后的和所述目标模块对应的所述数据,更新所述交互界面。
  2. 如权利要求1所述的方法,其特征在于,所述前台基于所述撤销指令控制所述后台恢复所述数据中心中和所述目标模块对应的所述数据之后,所述方法还包括:
    在检测到针对所述目标操作的重做指令的情况下,所述前台基于所述目标操作控制所述后台更新所述数据中心中和所述目标模块对应的所述数据,所述前台基于更新后的和所述目标模块对应的所述数据,更新所述交互界面。
  3. 如权利要求1或2所述的方法,其特征在于,
    所述前台基于所述目标操作控制所述后台更新所述数据中心中和所述目标模块对应的所述数据,包括:
    所述前台基于所述目标操作向所述后台发送一个或多个第一数据更新指令,所述一个或多个第一数据更新指令中任一第一数据更新指令指示所述后台更新和所述目标模块对应的数据中的部分数据;
    所述前台基于发送所述一个或多个数据更新指令生成操作记录;
    所述前台基于所述撤销指令控制所述后台恢复所述数据中心中和所述目标模块对应的所述数据,包括:
    所述前台基于所述操作记录指示的所述目标操作的逆操作向所述后台发送一个或多个第二数据更新指令,所述一个或多个第二数据更新指令中任一第二数据更新指令指示所述后台将所述数据中心中和所述目标模块对应的所述数据中的所述部分数据恢复至执行所述目标操作之前的状态。
  4. 如权利要求3所述的方法,其特征在于,在所述目标操作为针对所述目标模块的添加操作的情况下,
    所述前台基于所述目标操作向所述后台发送一个或多个第一数据更新指令,包括:
    所述前台先向所述后台发送第一模块更新指令,再发送第一逻辑关系更新指令,以控制所述后台先在所述数据中心中添加所述目标模块的所述模块数据,再在各所述其他模块的所述模块数据中添加所述目标模块和所述其他模块之间的所述逻辑关系;
    所述前台基于所述操作记录指示的所述目标操作的逆操作向所述后台发送一个或多个第二数据更新指令,包括:
    所述前台先向所述后台发送第二逻辑关系更新指令,再发送第二模块更新指令,以控制所述后台先删除所述数据中心各所述其他模块的所述模块数据中所述目标模块和所述其他模块之间的所述逻辑关系,再删除所述数据中心中所述目标模块的所述模块数据。
  5. 如权利要求3所述的方法,其特征在于,在所述目标操作为针对所述目标模块的删除操作的情况下,
    所述前台基于所述目标操作向所述后台发送一个或多个第一数据更新指令,包括:
    所述前台先向后台发送第一逻辑关系更新指令,再发送第一模块更新指令,以控制所述后台先删除所述数据中心各所述其他模块的所述模块数据中所述目标模块和所述其他模块之间的所述逻辑关系,再删除所述数据中心中所述目标模块的所述模块数据;
    所述前台基于所述操作记录指示的所述目标操作的逆操作向所述后台发送一个或多个第二数据更新指令,包括:
    所述前台先向所述后台发送第二模块更新指令,再发送第二逻辑关系更新指令,以控制所述后台先恢复所述数据中心中所述目标模块的所述模块数据,再恢复各所述其他模块的所述模块数据中所述目标模块和所述其他模块之间的逻辑关系。
  6. 如权利要求5所述的方法,其特征在于,
    所述前台先向后台发送所述第一逻辑关系更新指令,再发送所述第一模块更新指令之前,所述方法还包括:
    所述前台控制所述后台将所述数据中心中和所述目标模块对应的所述数据导出备份至参考存储位置,所述目标模块对应的所述数据包括所述目标模块的模块数据、以及各所述其他模块的所述模块数据中所述目标模块和所述其他模块之间的所述逻辑关系;
    所述前台先向所述后台发送所述第二模块更新指令,再发送所述第二逻辑关系更新指令之后,所述方法还包括:
    响应于接收到的所述第二模块更新指令,所述后台从所述参考存储位置将所述目标模块的所述模块数据导入至所述数据中心,响应于接收到的所述第二逻辑关系更新指令,所述后台从所述参考存储位置将所述目标模块和各所述其他模块之间的所述逻辑关系导入至所述数据中心。
  7. 如权利要求3所述的方法,其特征在于,在所述目标操作为针对所述目标模块的删除操作的情况下,
    所述前台基于所述目标操作向所述后台发送一个或多个第一数据更新指令,包括:
    所述前台先向后台发送第一逻辑关系更新指令,再发送第一模块更新指令,以控制所述后台在接收到所述第一逻辑关系更新指令时删除所述数据中心各所述其他模块的所述模块数据中所述其他模块与所述目标模块之间的所述逻辑关系,以及控制所述后台在接收到所述第一模块更新指令时,为所述数据中心中所述目标模块的所述模块数据添加删除标记;
    所述前台基于所述操作记录指示的所述目标操作的逆操作向所述后台发送一个或多个第二数据更新指令,包括:
    所述前台先向所述后台发送第二模块更新指令,再发送第二逻辑关系更新指令,以控制所述后台在接收到所述第二模块更新指令时删除所述数据中心中所述目标模块的所述模块数据的所述删除标记,以及控制所述后台在接收到所述第二逻辑关系更新指令时在所述数据中心各所述其他模块的所述模块数据中添加所述其他模块与所述目标模块之间的所述逻辑关系。
  8. 如权利要求1-3任一所述的方法,其特征在于,所述模块和各所述其他模块之间的所述逻辑关系包括所述模块和各所述其他模块之间的连接关系,以及所述模块和各所述其他模块之间的订阅关系;
    所述连接关系指示所述交互界面上所述模块和各所述其他模块之间的连线关系,
    所述订阅关系指示所述模块的内部参数、输入中的至少一个与各所述其他模块的输出之间的关联关系、和/或、所述模块的输出与各所述其他模块的内部参数、输入中的至少一个之间的关联关系。
  9. 如权利要求8所述的方法,其特征在于,在所述目标模块的数量为多个的情况 下,所述前台基于所述目标操作向所述后台发送多个第一数据更新指令,包括:
    所述前台向所述后台发送第一订阅关系删除指令,所述第一订阅关系删除指令指示所述后台删除各所述其他模块的所述模块数据中所述其他模块和边缘目标模块之间的订阅关系,所述边缘目标模块为所述多个目标模块中和所述其他模块存在逻辑关系的目标模块;
    所述前台向所述后台发送第一连接关系删除指令,所述第一连接关系删除指令指示所述后台删除各所述其他模块的所述模块数据中所述其他模块和所述边缘目标模块之间的连接关系;
    所述前台向所述后台发送第一模块删除指令,所述第一模块删除指令指示所述后台删除所述多个目标模块的所述模块数据。
  10. 如权利要求8所述的方法,其特征在于,在所述目标模块的数量为多个的情况下,所述前台基于所述目标操作向所述后台发送多个第一数据更新指令,包括:
    所述前台向所述后台发送订阅关系删除指令A,所述订阅关系删除指令A指示所述后台针对各所述目标模块,删除后执行模块分别与先执行模块和所述目标模块之间的订阅关系,所述后执行模块为所述前台显示的流程图中位于所述目标模块后执行的模块,所述先执行模块为流程图中位于所述目标模块前执行的模块;
    所述前台向所述后台发送订阅关系删除指令B,所述订阅关系删除指令B指示所述后台删除所述多个目标模块之间的订阅关系;
    所述前台向所述后台发送订阅关系删除指令C,所述订阅关系删除指令C指示所述后台删除各所述目标模块与所述先执行模块之间的订阅关系;
    所述前台向所述后台发送连接关系删除指令A,所述连接关系删除指令A指示所述后台删除所述后执行模块分别与各所述目标模块之间的连接关系;
    所述前台向所述后台发送连接关系删除指令B,所述连接关系删除指令B指示所述后台删除所述多个目标模块之间的连接关系;
    所述前台向所述后台发送连接关系删除指令C,所述连接关系删除指令C指示所述后台删除各所述目标模块与所述先执行模块之间的连接关系;
    所述前台向所述后台发送第一模块删除指令,所述第一模块删除指令指示删除所述多个目标模块的所述模块数据中的剩余数据。
  11. 一种用于前后台分离系统的模块处理装置,其特征在于,所述前后台分离系统包括前台和后台,所述前台显示有交互界面,所述交互界面用于显示多个模块,所述后台配置有数据中心,所述数据中心用于存储各所述多个模块的模块数据,所述模块数据中包括所述模块的显示方式、所述模块的功能数据以及所述模块与各其他模块之间的逻辑关系;
    所述装置包括:
    第一控制模块,用于响应于针对目标模块的目标操作,使所述前台基于所述目标操作控制所述后台更新所述数据中心中和所述目标模块对应的数据,并使所述前台基于更新后的和所述目标模块对应的所述数据,更新所述交互界面,所述目标模块为所述多个模块中一个或多个模块;
    第二控制模块,用于在检测到针对所述目标操作的撤销指令的情况下,使所述前台基于所述撤销指令控制所述后台恢复所述数据中心中和所述目标模块对应的所述数据,并使所述前台基于恢复后的和所述目标模块对应的所述数据,更新所述交互界面。
  12. 如权利要求11所述的装置,其特征在于,所述装置还包括:
    第三控制模块,用于在检测到针对所述目标操作的重做指令的情况下,使所述前台基于所述目标操作控制所述后台更新所述数据中心中和所述目标模块对应的所述数据,并使所述前台基于更新后的和所述目标模块对应的所述数据,更新所述交互界面。
  13. 如权利要求11或12所述的装置,其特征在于,
    所述第一控制模块用于:
    使所述前台基于所述目标操作向所述后台发送一个或多个第一数据更新指令,所述一个或多个第一数据更新指令中任一第一数据更新指令指示所述后台更新和所述目标模块对应的数据中的部分数据;
    使所述前台基于发送所述一个或多个数据更新指令生成操作记录;
    所述第二控制模块用于:
    使所述前台基于所述操作记录指示的所述目标操作的逆操作向所述后台发送一个或多个第二数据更新指令,所述一个或多个第二数据更新指令中任一第二数据更新指令指示所述后台将所述数据中心中和所述目标模块对应的所述数据中的所述部分数据恢复至执行所述目标操作之前的状态。
  14. 如权利要求13所述的装置,其特征在于,在所述目标操作为针对所述目标模块的添加操作的情况下,
    所述第一控制模块用于:
    使所述前台先向所述后台发送第一模块更新指令,再发送第一逻辑关系更新指令,以控制所述后台先在所述数据中心中添加所述目标模块的所述模块数据,再在所述各其他模块的所述模块数据中添加所述目标模块和所述其他模块之间的所述逻辑关系;
    所述第二控制模块用于:
    使所述前台先向所述后台发送第二逻辑关系更新指令,再发送第二模块更新指令,以控制所述后台先删除所述数据中心各所述其他模块的所述模块数据中所述目标模块和所述其他模块之间的所述逻辑关系,再删除所述数据中心中所述目标模块的所述模块数据。
  15. 如权利要求13所述的装置,其特征在于,在所述目标操作为针对所述目标模块的删除操作的情况下,
    所述第一控制模块用于:
    使所述前台先向后台发送第一逻辑关系更新指令,再发送第一模块更新指令,以控制所述后台先删除所述数据中心中所述各其他模块的所述模块数据中所述目标模块和所述其他模块之间的所述逻辑关系,再删除所述数据中心中所述目标模块的所述模块数据;
    所述第二控制模块用于:
    使所述前台先向所述后台发送第二模块更新指令,再发送第二逻辑关系更新指令,以控制所述后台先恢复所述数据中心中所述目标模块的所述模块数据,再恢复各所述其他模块的所述模块数据中所述目标模块和所述其他模块之间的逻辑关系。
  16. 如权利要求13所述的装置,其特征在于,所述装置还包括:
    导出模块,用于:
    在所述前台先向后台发送所述第一逻辑关系更新指令,再发送所述第一模块更新指令之前,使所述前台控制所述后台将所述数据中心中和所述目标模块对应的所述数据导出备份至参考存储位置,所述目标模块对应的所述数据包括所述目标模块的模块数据、以及各其他模块的所述模块数据中所述目标模块和所述其他模块之间的所述逻辑关系;
    导入模块,用于:
    在所述前台先向所述后台发送所述第二模块更新指令,再发送所述第二逻辑关系更新指令之后,响应于接收到的第二模块更新指令,使所述后台从所述参考存储位置将所述目标模块的所述模块数据导入至所述数据中心,响应于接收到的所述第二逻辑关系更新指令,使所述后台从所述参考存储位置将所述目标模块和各所述其他模块之间的所述逻辑关系导入至所述数据中心。
  17. 如权利要求13所述的装置,其特征在于,在所述目标操作为针对所述目标模 块的删除操作的情况下,
    所述第一控制模块用于:
    使所述前台先向后台发送第一逻辑关系更新指令,再发送第一模块更新指令,以控制所述后台在接收到所述第一逻辑关系更新指令时删除所述数据中心各所述其他模块的所述模块数据中所述其他模块与所述目标模块之间的所述逻辑关系,以及控制所述后台在接收到所述第一模块更新指令时,为所述数据中心中所述目标模块的所述模块数据添加删除标记;
    所述第二控制模块用于:
    使所述前台先向所述后台发送第二模块更新指令,再发送第二逻辑关系更新指令,以控制所述后台在接收到所述第二模块更新指令时删除所述数据中心中所述目标模块的所述模块数据的所述删除标记,以及控制所述后台在接收到所述第二逻辑关系更新指令时在所述数据中心各所述其他模块的所述模块数据中添加所述其他模块与所述目标模块之间的所述逻辑关系。
  18. 如权利要求11-13任一所述的装置,其特征在于,所述模块和各所述其他模块之间的所述逻辑关系包括所述模块和各所述其他模块之间的连接关系,以及所述模块和各所述其他模块之间的订阅关系;
    所述连接关系指示所述交互界面上所述模块和各所述其他模块之间的连线关系,
    所述订阅关系指示所述模块的内部参数、输入中的至少一个与各所述其他模块的输出之间的关联关系、和/或、所述模块的输出与各所述其他模块的内部参数、输入中的至少一个之间的关联关系。
  19. 如权利要求18所述的装置,其特征在于,在所述目标模块的数量为多个的情况下,所述第一控制模块用于:
    使所述前台向所述后台发送第一订阅关系删除指令,所述第一订阅关系删除指令指示所述后台删除各所述其他模块的所述模块数据中所述其他模块和边缘目标模块之间的订阅关系,所述边缘目标模块为所述多个目标模块中和所述其他模块存在逻辑关系的目标模块;
    使所述前台向所述后台发送第一连接关系删除指令,所述第一连接关系删除指令指示所述后台删除各所述其他模块的所述模块数据中所述其他模块和所述边缘目标模块之间的连接关系;
    使所述前台向所述后台发送第一模块删除指令,所述第一模块删除指令指示所述后台删除所述多个目标模块的所述模块数据。
  20. 如权利要求18所述的装置,其特征在于,在所述目标模块的数量为多个的情况下,所述第一控制模块用于:
    使所述前台向所述后台发送订阅关系删除指令A,所述订阅关系删除指令A指示所述后台针对各所述目标模块,删除后执行模块分别与先执行模块和所述目标模块之间的订阅关系,所述后执行模块为所述前台显示的流程图中位于所述目标模块后执行的模块,所述先执行模块为流程图中位于所述目标模块前执行的模块;
    使所述前台向所述后台发送订阅关系删除指令B,所述订阅关系删除指令B指示所述后台删除所述多个目标模块之间的订阅关系;
    使所述前台向所述后台发送订阅关系删除指令C,所述订阅关系删除指令C指示所述后台删除各所述目标模块与所述先执行模块之间的订阅关系;
    使所述前台向所述后台发送连接关系删除指令A,所述连接关系删除指令A指示所述后台删除所述后执行模块分别与各所述目标模块之间的连接关系;
    使所述前台向所述后台发送连接关系删除指令B,所述连接关系删除指令B指示所述后台删除所述多个目标模块之间的连接关系;
    使所述前台向所述后台发送连接关系删除指令C,所述连接关系删除指令C指示所 述后台删除各所述目标模块与所述先执行模块之间的连接关系;
    使所述前台向所述后台发送第一模块删除指令,所述第一模块删除指令指示删除所述多个目标模块的所述模块数据中的剩余数据。
  21. 一种用于前后台分离系统的模块处理装置,其特征在于,所述装置包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为执行上述权利要求1至权利要求10中的任一项权利要求所述的方法的步骤。
  22. 一种非易失性计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有指令,所述指令被处理器执行时实现上述权利要求1至权利要求10中的任一项权利要求所述的方法的步骤。
  23. 一种包含指令的计算机程序产品,其特征在于,当所述指令在计算机上运行时,使得所述计算机执行上述权利要求1至权利要求10中的任一项权利要求所述的方法的步骤。
PCT/CN2022/138610 2021-12-20 2022-12-13 用于前后台分离系统的模块处理方法、装置及存储介质 WO2023116505A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111564941.4A CN114253442A (zh) 2021-12-20 2021-12-20 用于前后台分离系统的模块处理方法、装置及存储介质
CN202111564941.4 2021-12-20

Publications (1)

Publication Number Publication Date
WO2023116505A1 true WO2023116505A1 (zh) 2023-06-29

Family

ID=80796078

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/138610 WO2023116505A1 (zh) 2021-12-20 2022-12-13 用于前后台分离系统的模块处理方法、装置及存储介质

Country Status (2)

Country Link
CN (1) CN114253442A (zh)
WO (1) WO2023116505A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114253442A (zh) * 2021-12-20 2022-03-29 杭州海康机器人技术有限公司 用于前后台分离系统的模块处理方法、装置及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164525A (zh) * 2013-03-26 2013-06-19 北界创想(北京)软件有限公司 Web应用发布方法和装置
CN106372139A (zh) * 2016-08-27 2017-02-01 乐视控股(北京)有限公司 操作通知的生成方法、前台数据的更新方法及数据库系统
US20190272193A1 (en) * 2017-01-06 2019-09-05 Tencent Technology (Shenzhen) Company Limited Responsive application task management
CN112685487A (zh) * 2021-01-15 2021-04-20 金现代信息产业股份有限公司 在浏览器环境下通过IndexedDB模拟关系型数据库的方法和装置
CN114253442A (zh) * 2021-12-20 2022-03-29 杭州海康机器人技术有限公司 用于前后台分离系统的模块处理方法、装置及存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108920653A (zh) * 2018-07-03 2018-11-30 武汉斗鱼网络科技有限公司 一种页面生成方法、装置、服务器及存储介质
CN112597417B (zh) * 2020-12-18 2024-03-12 北京达佳互联信息技术有限公司 页面更新方法、装置、电子设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164525A (zh) * 2013-03-26 2013-06-19 北界创想(北京)软件有限公司 Web应用发布方法和装置
CN106372139A (zh) * 2016-08-27 2017-02-01 乐视控股(北京)有限公司 操作通知的生成方法、前台数据的更新方法及数据库系统
US20190272193A1 (en) * 2017-01-06 2019-09-05 Tencent Technology (Shenzhen) Company Limited Responsive application task management
CN112685487A (zh) * 2021-01-15 2021-04-20 金现代信息产业股份有限公司 在浏览器环境下通过IndexedDB模拟关系型数据库的方法和装置
CN114253442A (zh) * 2021-12-20 2022-03-29 杭州海康机器人技术有限公司 用于前后台分离系统的模块处理方法、装置及存储介质

Also Published As

Publication number Publication date
CN114253442A (zh) 2022-03-29

Similar Documents

Publication Publication Date Title
CN112162671B (zh) 直播数据处理方法、装置、电子设备及存储介质
CN108845856B (zh) 基于对象的同步更新方法、装置、存储介质及设备
CN110308956B (zh) 一种应用界面显示方法、装置及移动终端
WO2022134632A1 (zh) 作品处理方法及装置
CN110288689B (zh) 对电子地图进行渲染的方法和装置
CN113204298A (zh) 显示发布进度的方法、装置、电子设备及存储介质
WO2021244267A1 (zh) 应用程序的移植方法、装置、设备及介质
CN111949680A (zh) 数据处理方法、装置、计算机设备及存储介质
CN111897465B (zh) 弹窗显示方法、装置、设备及存储介质
WO2023116505A1 (zh) 用于前后台分离系统的模块处理方法、装置及存储介质
CN109783176B (zh) 切换页面的方法和装置
KR101186334B1 (ko) 휴대 단말기 및 그 동작 제어방법
CN110868642B (zh) 视频播放方法、装置及存储介质
CN110086814B (zh) 一种数据获取的方法、装置及存储介质
CN112181915A (zh) 执行业务的方法、装置、终端和存储介质
CN114594885A (zh) 应用图标的管理方法、装置、设备及计算机可读存储介质
CN112260845B (zh) 进行数据传输加速的方法和装置
CN113485596A (zh) 虚拟模型的处理方法、装置、电子设备及存储介质
CN111294320B (zh) 数据转换的方法和装置
CN113268234A (zh) 页面生成方法、装置、终端和存储介质
CN113535039A (zh) 更新页面的方法、装置、电子设备及计算机可读存储介质
CN113408989A (zh) 汽车数据的比对方法、装置及计算机存储介质
CN108519913B (zh) 应用程序的运行状态管理方法、装置、存储介质及终端
CN111158791A (zh) 配置文件更新方法、装置及系统、存储介质
CN110942426A (zh) 图像处理的方法、装置、计算机设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22909819

Country of ref document: EP

Kind code of ref document: A1