Data adaptation processing method, workflow system, electronic device and storage medium
The server synchronizes and adapts data operation information between PCs and mobile terminals, solving the problem of data operation errors caused by differences in screen size and interaction methods, and achieving the consistency and correctness of data on different terminal devices. , ensuring the correct operation of the workflow system.
Patent Information
- Application Number
- CN202011593513.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-29
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-12-29
AI Technical Summary
When operating data on the PC client and mobile terminal client of the same software system, differences in screen size and interaction methods lead to errors in data operation and data adaptation processing cannot be achieved.
The server synchronizes and adapts data operation information between PCs and mobile terminals, generates and sends adapted module information, and ensures the consistency and correctness of data on different terminal devices.
It avoids errors in the workflow system during data display, new addition and other operations, ensures the correctness and consistency of data, and ensures the correct operation of data access operations on different clients.
Smart Images

Figure CN112633844B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data adaptation processing method, a workflow system, an electronic device and a storage medium. Background Art
[0002] With the increasing popularity of mobile terminals, a large number of software systems provide both personal computer (PC) clients and mobile terminal clients, so that users can flexibly use the software system according to their personal needs or preferences. For example, in a workflow application, users can flexibly choose to create and maintain workflows on the PC client or the mobile client.
[0003] At present, due to the differences in screen size and interaction methods between PC and mobile terminals, for the same software system, the operations supported by the PC end are different from those supported by the mobile terminal. For example, in a software system involving workflow, the user can drag a module on the interface on the PC client but does not establish a connection between the module and other modules. Correspondingly, the PC client can save and display the information of the module. On the mobile client, only the information of the modules that have established a connection relationship can be displayed.
[0004] Therefore, how to adapt the data of the PC client and the mobile terminal client to avoid errors when performing data operations on different clients of the same software system is an urgent problem to be solved. Summary of the invention
[0005] The purpose of this application is to provide a data adaptation processing method, a workflow system, an electronic device and a storage medium to address the deficiencies in the above-mentioned prior art, so as to avoid errors when operating data on different clients of the same software system.
[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] In a first aspect, an embodiment of the present application provides a data adaptation processing method, which is applied to a workflow system, wherein the workflow system includes: a server, a first terminal device, and a second terminal device.
[0008] The method comprises:
[0009] The first terminal device and the second terminal device respectively respond to the user's operation, generate data operation information and send the data operation information to the server, wherein the data operation information includes: information of adding a module, updating a module, deleting a module or viewing a module;
[0010] The server receives the data operation information, and updates module storage information based on the data operation information, and / or sends module information to the first terminal device or the second terminal device based on the module storage information, wherein the module information is module information adapted to a client of the first terminal device or the second terminal device;
[0011] The first terminal device and the second terminal device respectively receive response information sent by the server, where the response information is used to indicate the module information and / or whether the operation is successful.
[0012] As an optional implementation, the module storage information includes: a module information set and a module mapping table, the module information set includes at least one module, each module includes the following information: an identifier of the module, whether the module has an associated module, and a position of the module in the canvas of the second terminal device, and the module mapping table is used to record the association relationship between modules;
[0013] The server receives the data operation information, updates module storage information based on the data operation information, and / or sends module information to the first terminal device or the second terminal device based on the module storage information, including:
[0014] The server receives first request information sent by the first terminal device, where the first request information is used to request to obtain information of modules having an associated relationship;
[0015] The server determines at least one associated module pair according to the first request information, the module information set and the module mapping table, wherein each of the associated module pairs includes two modules having an associated relationship, and the module information set and the module mapping table are generated based on an operation of a user on the first terminal device and / or the second terminal device;
[0016] The server sends a first response message to the first terminal device, wherein the first response message includes information of the at least one association module pair;
[0017] The first terminal device receives the response information sent by the server, including:
[0018] The first terminal device reads the information of the at least one associated module pair from the first response information and displays the information of the at least one associated module pair.
[0019] As an optional implementation manner, the server determines at least one associated module pair according to the first request information, the module information set and the module mapping table, including:
[0020] The server traverses the modules in the module information set one by one according to the first request information; if the first module in the module information set has an associated module, the server reads the associated module of the first module from the module mapping table, and combines the first module and the associated module of the first module into an associated module pair, wherein the first module is any module in the module information set.
[0021] As an optional implementation manner, the server receives the data operation information, updates the module storage information based on the data operation information, and / or sends the module information to the first terminal device or the second terminal device based on the module storage information, including:
[0022] The server receives second request information sent by the first terminal device, where the second request information is used to request adding information of a target new module and information of an associated new module associated with the target new module;
[0023] The server adds the information of the target new module to the module information set, adds the information of the associated new module to the module information set, and adds the association relationship between the target new module and the associated new module to the module mapping table according to the information of the target new module, the information of the associated new module and the module information set;
[0024] The server sends a second response message to the second terminal device, where the second response message is used to indicate whether the module is added successfully.
[0025] As an optional implementation manner, the server adds the information of the target new module to the module information set according to the information of the target new module, the information of the associated new module and the module information set, including:
[0026] If the information of the target new module does not exist in the module information set, the server generates the position of the target new module in the canvas of the second terminal device, and adds the information of the target new module to the module information set, wherein the added information of the target new module includes: the identification of the target new module, the associated module of the target new module and the position of the target new module in the canvas of the second terminal device.
[0027] As an optional implementation manner, the server generates a position of the target new module in the canvas of the second terminal device, including:
[0028] If the module does not exist in the canvas of the second terminal device, the server generates a position of the target new module in the canvas of the second terminal device with the preset initial coordinates as a starting point.
[0029] As an optional implementation manner, the server generates a position of the target new module in the canvas of the second terminal device with the preset initial coordinates as the starting point, including:
[0030] If there is a module in the canvas of the second terminal device, the server determines the current occupied area of the canvas based on the positions of the modules in the upper left corner and the lower right corner of the canvas of the second terminal device, and generates the position of the target new module in the canvas of the second terminal device with one end of the currently occupied area as the starting point.
[0031] As an optional implementation manner, the server adds the information of the target new module to the module information set according to the information of the target new module, the information of the associated new module and the module information set, including:
[0032] If the target new module exists in the module information set, the server updates the information of the target new module in the module information set, and the updated information of the target new module includes: the identification of the target new module, the associated module of the target new module and the position of the target new module in the canvas of the second terminal device.
[0033] As an optional implementation manner, the server receives the data operation information, updates the module storage information based on the data operation information, and / or sends the module information to the first terminal device or the second terminal device based on the module storage information, including:
[0034] The server receives third request information sent by the first terminal device, where the third request information is used to request updating of a target update module in the module information set;
[0035] The server updates the information of the target update module in the module information set according to the third request information.
[0036] As an optional implementation manner, the server receives the data operation information, updates the module storage information based on the data operation information, and / or sends the module information to the first terminal device or the second terminal device based on the module storage information, including:
[0037] The server receives fourth request information sent by the first terminal device, where the fourth request information is used to request deletion of a target deletion module and an association relationship between the target deletion modules;
[0038] The server deletes the target deletion module from the module information set according to the fourth request information, and deletes the association relationship of the target deletion module in the module mapping table.
[0039] As an optional implementation manner, the server sends first response information to the first terminal device, including:
[0040] Based on a target display format of the first terminal device, converting the at least one associated module pair into data having the target display format;
[0041] The data having the target display format is sent to the first terminal device.
[0042] In a second aspect, an embodiment of the present application provides a workflow system, including: a first terminal device, a second terminal device, and a server.
[0043] The first terminal device is used to execute the method steps performed by the first terminal device in the first aspect above;
[0044] The second terminal device is used to execute the method steps performed by the second terminal device in the first aspect above;
[0045] The server is used to execute the method steps executed by the server in the first aspect above.
[0046] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the terminal device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the method steps executed by the first terminal device, the second terminal device or the server in the first aspect above.
[0047] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, executes the method steps performed by the first terminal device, the second terminal device or the server in the first aspect above.
[0048] The beneficial effects of this application are:
[0049] After the first terminal device and the second terminal device send data operation information to the server, the server can update the module storage information based on the data operation information, and / or send module information adapted to the client of each terminal device to the first terminal device or the second terminal device based on the module storage information. Through this adaptation processing, errors in the workflow system during data access operations such as data display and data addition can be avoided, thereby ensuring the correct operation of the workflow system.
[0050] In addition, after receiving the first request information sent by the first terminal device for requesting to obtain the module information with an associated relationship, the server can filter out the modules with an associated relationship from the module information set information based on the module information set and the module mapping table and form at least one associated module pair, and the server can then send the information of the at least one associated module pair to the first terminal device and the first terminal device will display it. After this data display adaptation processing, the filtering of the modules without an associated relationship is realized, so that the first terminal device can correctly display the module information.
[0051] In addition, the server can add module information based on the module information set and the modules newly added by the user on the first terminal device. Since the module information set records the information of modules that have no associated relationship, the server can add module information based on the perception of modules that have no associated relationship. Therefore, the correctness of the module information saved by the server can be guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 This is a sample diagram of the interface of the PC client of workflow system A;
[0054] Figure 2 This is a sample diagram of the interface of the mobile client of workflow system A;
[0055] Figure 3 An exemplary system architecture diagram of a workflow system 100 provided in an embodiment of the present application;
[0056] Figure 4 An interactive flow chart of the data adaptation processing method provided in the embodiment of the present application;
[0057] Figure 5A flowchart of a data adaptation processing method provided in an embodiment of the present application;
[0058] Figure 6 A schematic diagram of a data addition adaptation process of a data adaptation processing method provided in an embodiment of the present application;
[0059] Figure 7 A schematic diagram of the structure of an electronic device 70 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0061] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0062] In order to enable those skilled in the art to use the content of this application, the following implementation is provided in conjunction with a specific application scenario "workflow application". For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is mainly described around workflow, it should be understood that this is only an exemplary embodiment.
[0063] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0064] Before describing the technical solution of the embodiment of the present application, the application scenario of the application is first described in combination with the workflow application.
[0065] A workflow is a process of organizing a group of tasks to complete a certain operation. The triggering order and triggering conditions of the tasks are defined in the workflow. Each task can be completed by one or more software systems, by one or a group of people, or by one or more people in collaboration with a software system. Among them, a task may involve multiple devices or modules. For example, if a task is "when humidity sensor A in a specific area detects that the humidity in the area reaches value B, turn on air conditioner C", then the task involves humidity sensor A and air conditioner C. When defining a workflow, it is necessary to first establish an association between humidity sensor A and air conditioner C, and add the triggering conditions of the task and the triggering order in the entire workflow to the association. Therefore, in a workflow system, establishing associations for devices or modules is an important part of defining a workflow.
[0066] At present, most workflow systems provide a visual interface for users to define workflows. Users can establish associations between devices or modules and define trigger conditions, trigger sequences, etc. in the visual interface. For the same workflow system that supports both PC and mobile clients, due to differences in screen size and interaction methods between PC and mobile phones, the operations that users can perform on PC and mobile clients may not be the same. For example, on a PC client, a user can drag a module on the interface but does not establish an association between the module and other modules. Accordingly, the PC client can save and display the information of the module. On a mobile client, users cannot drag modules that do not have an association relationship on the interface, and the mobile interface can only display information about modules that have established a connection relationship. The following is an explanation in conjunction with the legend. Figure 1 This is a sample diagram of the PC client interface of workflow system A. Figure 2 This is a sample diagram of the interface of the mobile client of workflow system A.
[0067] like Figure 1 As shown in the figure, the user dragged three modules on the interface of the PC client, namely, humidity sensor B, air conditioner C and timer D in area A. The user established an association relationship between humidity sensor B and air conditioner C in humidity area A through a connection, and set the humidity value that triggers the switch of air conditioner C on humidity sensor B. At the same time, the timer D dragged by the user on the interface has not established an association relationship with any other module, that is, no workflow has been defined for timer D. Figure 2 As shown, in the mobile client, users can establish associations between modules and add trigger conditions by clicking and dragging. The mobile client displays the associations between modules and trigger conditions in a list on its interface. The mobile client does not support displaying Figure 1The information of modules such as timer D that have no associated relationship is shown.
[0068] For the same workflow system that supports both PC client and mobile client, after the user drags the module and / or establishes the relationship between modules on the PC client and mobile client, the user's operation results will be uploaded and saved to the server of the workflow system. Then, the PC client and mobile client will read the data from the server and display it later. Figure 1 and Figure 2 For example, the user executes Figure 1 After the operation in the example, the server will save the association between humidity sensor B and air conditioner C and the triggering conditions, and will also save the information of timer D that has no association. When the user logs in to the mobile client again, the mobile client needs to read the module information from the server for display, but the mobile client does not support the display of the information of timer D that has no association. Therefore, it is necessary to adapt the data display of the PC client and the mobile client to avoid errors when displaying data on different clients of the same workflow system.
[0069] In addition, for modules that do not have an association relationship established on the PC client, the server has already saved the module information, but the mobile client cannot perceive its existence. The user may re-establish an association relationship for the module on the mobile client and report the module information to the server. At this time, if the corresponding data addition and adaptation processing is not performed, an error will occur when the server saves the module information.
[0070] In view of this, an embodiment of the present application provides a data adaptation processing method, by which the server adapts the data from the client and / or the data that needs to be sent to the client, thereby avoiding errors in the workflow system during data access operations such as data display and data addition, thereby ensuring the correct operation of the workflow system.
[0071] Figure 3 An exemplary system architecture diagram of a workflow system 100 provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the workflow system 100 includes: a server 110 , a network 120 , a PC client 130 and a mobile terminal client 140 .
[0072] In some embodiments, server 110 may be a single server or a server group. The server group may be centralized or distributed (for example, server 110 may be a distributed system). In some embodiments, server 110 may be implemented on a cloud platform; by way of example only, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an inter-cloud, a multi-cloud, etc., or any combination thereof. In some embodiments, server 110 may be implemented on a cloud platform having the Figure 7 One or more of the components shown are implemented on an electronic device 70 .
[0073] In some embodiments, the server 110 may include a processor. The processor may process information and / or data related to the data request to perform one or more functions described in the present application. For example, the processor may perform data display adaptation processing based on the first request information from the PC client 130. In some embodiments, the processor may include one or more processing cores (e.g., a single-core processor (S) or a multi-core processor (S)). By way of example only, the processor may include a central processing unit (CPU), an application specific integrated circuit (ASIC), an application specific instruction set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a controller, a microcontroller unit, a reduced instruction set computer (RISC), or a microprocessor, or any combination thereof.
[0074] In some embodiments, PC client 130 and mobile terminal client 140 can communicate with server 110 via network 120 respectively. Network 120 can be used for information and / or data exchange. In some embodiments, network 120 can be any type of wired or wireless network, or a combination thereof. As an example only, network 120 can include wired network, wireless network, optical fiber network, telecommunication network, intranet, Internet, local area network (LAN), wide area network (WAN), wireless local area network (WLAN), metropolitan area network (MAN), wide area network (WAN), public switched telephone network (PSTN), Bluetooth network, ZigBee network, or near field communication (NFC) network, etc., or any combination thereof. In some embodiments, network 120 can include one or more network access points. For example, network 120 can include wired or wireless network access points, such as base stations and / or network switching nodes.
[0075] In some embodiments, the PC client 130 may be a client running on a PC. In the embodiments of the present application, the PC may include a desktop computer, a laptop computer, etc. The user may conveniently perform operations such as dragging modules through peripheral components such as a mouse and a keyboard. In some embodiments, the PC client 130 may be a client running on a PC. In the embodiments of the present application, the PC may include a desktop computer, a laptop computer, etc. Figure 7 One or more of the components shown are implemented on an electronic device 70 .
[0076] In some embodiments, the mobile terminal client 140 may be a client running on a mobile terminal. In the embodiments of the present application, the mobile terminal may be a device that can be operated directly on the mobile terminal without the need for a mouse and keyboard, as opposed to a PC. Exemplary mobile terminals may include: mobile phones, tablet computers, smart home devices, wearable devices, virtual reality devices, augmented reality devices, etc. For ease of description, the following embodiments of the present application are described by taking the mobile terminal as a mobile phone and the mobile terminal client as a mobile phone client as an example. In some embodiments, the mobile terminal client 140 may be a device that has the computer system described in the present application. Figure 7 One or more of the components shown are implemented on an electronic device 70 .
[0077] The following is combined with the above Figure 1 The content described in the workflow system 100 shown is a detailed description of the data adaptation processing method provided in the embodiment of the present application.
[0078] Figure 4 The interactive flow chart of the data adaptation processing method provided in the embodiment of the present application is as follows: Figure 4 As shown, the method includes:
[0079] S401: The first terminal device and the second terminal device respectively respond to the user's operation, generate data operation information and send the data operation information to the server.
[0080] The above data operation information includes: information of newly added modules, information of updated modules, information of deleted modules or information of viewed modules.
[0081] In an embodiment of the present application, the first terminal device may refer to the terminal device where the aforementioned mobile terminal client is located, and the first terminal device may be, for example, a mobile phone, etc. The second terminal device may refer to the terminal device where the aforementioned PC client is located, and the second terminal device may be, for example, a desktop computer, etc.
[0082] It is worth noting that the module described in the embodiment of the present application refers to an element in the workflow system that can be operated by the user to define the workflow. Figure 1 The humidity sensor B and the air conditioner C shown in the example are both modules in the workflow system.
[0083] S402. The server receives the data operation information, updates the module storage information based on the data operation information, and / or sends the module information to the first terminal device or the second terminal device based on the module storage information.
[0084] The module information is module information adapted to the client of the first terminal device or the second terminal device.
[0085] In addition, the module storage information is information of the module stored on the server, and may include basic information of the module and associated information of the module. The basic information of the module may include, for example, the position of the module in the canvas of the second terminal device.
[0086] It should be understood that the information based on the server may be different depending on the data operation information. Exemplarily, if the data operation information is information about viewing a module, the server only needs to send the module information to the first terminal device or the second terminal device based on the module storage information. If the data operation information is information about a newly added module, the server may update the module storage information based on the data operation information and send the module information to the first terminal device or the second terminal device based on the updated module storage information.
[0087] The module information is module information that matches the client of the first terminal device or the second terminal device. Optionally, the server can determine whether to perform adaptation processing on the saved module storage information according to the type of the client, so that the module information sent to each terminal device matches the respective client.
[0088] S403: The first terminal device and the second terminal device respectively receive response information sent by the server, where the response information is used to indicate the above module information and / or whether the operation is successful.
[0089] Optionally, for the operation of viewing a module, the server may indicate the module information through the response information, and for the operation of adding, updating or deleting a module, the server may indicate whether the operation is successful through the response information.
[0090] In this embodiment, after the first terminal device and the second terminal device send data operation information to the server, the server can update the module storage information based on the data operation information, and / or send module information adapted to the client of each terminal device to the first terminal device or the second terminal device based on the module storage information. Through this adaptation processing, errors in the workflow system during data access operations such as data display and data addition can be avoided, thereby ensuring the correct operation of the workflow system.
[0091] The following describes the process of adapting the server based on various data operation information.
[0092] The following is the adaptation process for viewing module information.
[0093] Optionally, the module storage information includes: a module information set and a module mapping table. The module information set includes at least one module, and each module includes the following information: the module identifier, whether the module has an associated module, and the location of the module in the canvas of the second terminal device. The module mapping table is used to record the association relationship between modules.
[0094] Figure 5 A flow chart of the data adaptation processing method provided in the embodiment of the present application is as follows: Figure 5 As shown, an optional manner of the aforementioned step S402 includes:
[0095] S501. A server receives first request information sent by a first terminal device, where the first request information is used to request to obtain module information having an associated relationship.
[0096] Optionally, the first terminal device may generate a first request message and send the first request message to the server when it is necessary to display the information of the module with which an association relationship has been established. The first request message is used to indicate the information of the aforementioned viewing module. For the first terminal device, since the first terminal device only displays modules with an association relationship, the first request message is used to request the information of the module with an association relationship. Exemplarily, after the user logs in to the client on the first terminal device, he clicks a specific button to enter the "Defined Workflow" interface, which triggers the first terminal device to generate and send the first request message to the server to obtain the information of the module with an association relationship and display it on the interface.
[0097] S502: The server determines at least one associated module pair according to the first request information, the module information set and the module mapping table.
[0098] Each of the above-mentioned associated module pairs includes two modules with an associated relationship. The above-mentioned module information set and module mapping table are generated based on the user's operation on the first terminal device and / or the second terminal device. In addition, as mentioned above, the module information set includes at least one module, and each module includes the following information: the identification of the module, whether the module has an associated module, and the position of the module in the canvas of the second terminal device. The above-mentioned module mapping table is used to record the association relationship between modules.
[0099] The canvas refers to the visual space used in the second terminal device for interactive operations such as module placement, dragging, and connection.
[0100] As mentioned above, the data operated by the user on the PC client and the mobile client will be uploaded to the server for storage, and these data can be saved in the above-mentioned module information set and module mapping table. Exemplarily, after the user drags a module A that has no association relationship with other modules to the canvas of the PC client, and then drags module B and module C, and establishes the association relationship between module B and module C and sets the trigger condition, the PC client will send the identifier of module A and the position of module A in the canvas to the server, and will send the identifier of module B, the position of module B in the canvas, the identifier of module C, the position of module C in the canvas, and the association relationship between module B and module C and the trigger condition set by the user to the server. After receiving this information, the server can add the information of module A, module B and module C in the module information table, as shown in Table 1 below.
[0101] Table 1
[0102]
[0103] In addition, the server also adds the mapping relationship between module B and module C in the above module mapping table.
[0104] After the user establishes an association between the two modules on the mobile client, the mobile client sends the data of the user's operation to the server, and the server also uses the same storage method as in Table 1 above to store it. However, it is worth noting that the server needs to first perform data addition adaptation processing on the data sent by the client before storing it. The specific data addition adaptation processing will be described in detail in the following embodiments.
[0105] In this step, after receiving the above-mentioned first request information, the server can learn that the first terminal device needs to obtain information about modules with associated relationships, and then the server can filter out modules with associated relationships from the modules recorded in the module information set based on the above-mentioned module information set and the module mapping table, and form one or more associated module pairs. The information of each associated relationship pair may include: the identifiers of the two modules in the module association pair and the above-mentioned triggering conditions, etc.
[0106] Optionally, the identifier of a module in the embodiment of the present application may refer to the number or name of the module.
[0107] S503: The server sends a first response message to the first terminal device, where the first response message includes information of the at least one associated module pair.
[0108] Correspondingly, the first terminal device may receive the first response information, read the information of the at least one associated module pair therefrom, and display the information of the at least one associated module pair. Figure 2 The illustrated method displays information of each associated module pair on the mobile client interface.
[0109] In this embodiment, after receiving the first request information sent by the first terminal device for requesting to obtain the module information with an associated relationship, the server can filter out the modules with an associated relationship from the module information set information based on the module information set and the module mapping table and form at least one associated module pair, and the server can then send the information of the at least one associated module pair to the first terminal device and the first terminal device will display it. After this data display adaptation processing, the filtering of the modules without an associated relationship is realized, so that the first terminal device can correctly display the module information.
[0110] As an optional implementation, when the server determines the at least one associated module pair according to the first request information, the module information set and the module mapping table in the above step S402, it can be determined in the following manner.
[0111] Optionally, the server may traverse the modules of the module information set one by one according to the first request information. Any traversed module is called a first module, and the following processing may be performed on the first module.
[0112] By using the information "whether there is an associated module" of the first module recorded in the module information set, it is determined whether the first module has an associated module. If there is no associated module for the first module, the first module is skipped and the determination of the next module is continued; if there is an associated module for the first module, the associated module of the first module is read from the above module mapping table, and the first module and the associated module of the first module are combined into an associated module pair. It should be understood that when forming an associated module pair, the information such as the triggering conditions of the modules in the associated module pair recorded in the module information set needs to be used as the information of the associated module pair.
[0113] It is worth noting that, for the second terminal device, an optional manner in which the server sends the viewing module information to the second terminal device is:
[0114] When the second terminal device needs to display the information of the modules with associated relationships and modules without associated relationships that the user has added on the canvas, it can send a request message to the server, and the module information is used to indicate the information of the module to be viewed. The server can directly send the module information recorded in the module information table to the second terminal device, and the second terminal device can display it accordingly.
[0115] In this embodiment, by traversing the module information set one by one and selecting modules with associated modules to form associated module pairs, the integrity of the associated module pairs obtained can be guaranteed. At the same time, the information of the associated module pairs can include information such as the triggering conditions of the modules, so the integrity of the information of the associated module pairs can also be guaranteed.
[0116] The following describes a process in which the server performs data addition adaptation processing on the information of the newly added module to solve the aforementioned problem of "if the corresponding data addition adaptation processing is not performed, an error will occur when the server saves the information of the module".
[0117] Figure 6 A schematic diagram of a data addition adaptation process of a data adaptation processing method provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, an optional manner of the above step S402 includes:
[0118] S601. A server receives second request information sent by a first terminal device, where the second request information is used to request adding information of a target new module and information of associated new modules associated with the target new module.
[0119] Optionally, after the user establishes an association relationship between the two modules on the interface of the first terminal device, the first terminal device may be triggered to send the second request information to the server. The second request information is used to indicate the information of the newly added module. The first terminal device may carry the identifiers of the two modules in the second request information, and the two modules are respectively referred to as the target newly added module and the associated newly added module. In addition, the second request information may also carry information such as the triggering conditions of the target newly added module and / or the associated newly added module.
[0120] S602. The server adds the information of the target new module to the module information set, adds the information of the associated new module to the module information set, and adds the association relationship between the target new module and the associated new module to the module mapping table based on the information of the target new module, the information of the associated new module and the module information set.
[0121] As mentioned above, the module information set is generated based on the user's operation on the first terminal device and / or the second terminal device, that is, the module information set can record the data of the user's operation on the first terminal device and the second terminal device at the same time, and the operation data can include the information of the module newly added by the user and the association relationship between the modules, etc. Therefore, the server has already recorded the data of the user's operation before the time of receiving the second request information in the module information set. Furthermore, when the server receives the second request information, it can add the information of the target newly added module and the information of the associated newly added module to the module information set based on the existing information in the module information set, the information of the target newly added module and the information of the associated newly added module, so as to avoid errors when the data is added.
[0122] S603: The server sends a second response message to the second terminal device, where the second response message is used to indicate whether the module is added successfully.
[0123] Optionally, when the server adds the information of the target new module and the information of the associated new module to the module information set, and / or adds the association between the two to the module mapping table, the addition may be successful, or it may fail due to an error for some reason. In this case, the server can send a response message to the second terminal device indicating the success or failure of the new module.
[0124] Correspondingly, the second terminal device receives the second response information and can input prompt information of success or failure of adding the new module to the user based on the second response information.
[0125] It is worth noting that for the second terminal device, when the user adds information of modules with associated relationships and / or modules without associated relationships on the second terminal device, a request message can be sent to the server, and the server can directly add this information to the module information set and the module association table.
[0126] As mentioned above, for the module that does not have an association relationship established on the PC client, the server has saved the information of the module, specifically, the information of the module is saved in the module information set, but the mobile client cannot perceive its existence. The user may re-establish an association relationship for the module on the mobile client and report the information of the module to the server. At this time, if the corresponding data addition adaptation processing is not performed, it will also cause an error when the server saves the information of the module. Using this embodiment, the server can add module information based on the module information set and the module newly added by the user on the first terminal device. Since the information of the module that does not have an association relationship is recorded in the module information set, the server can add module information based on the module that does not have an association relationship, so the correctness of the server saving the module information can be guaranteed.
[0127] The process of adding the information of the target new module to the module information set by the server is the same as the process of adding the information of the associated new module to the module information set. The process of adding the information of the target new module to the module information set is described below. The process of adding the information of the associated new module can refer to this process and will not be described separately.
[0128] Optionally, the server may first determine whether the information of the target new module already exists in the module information set based on the identifier of the target new module, and respectively perform the following two operations according to the determination result.
[0129] In the first method, if the information of the target new module does not exist in the module information set, the position of the target new module in the canvas of the second terminal device is generated, and the information of the target new module is added to the module information set.
[0130] The added information of the target newly added module includes: an identifier of the target newly added module, a module associated with the target newly added module, and a position of the target newly added module in the canvas of the second terminal device.
[0131] If the information of the target new module does not exist in the module information set, it means that the user has not dragged the target new module to the canvas on the second terminal device. Therefore, the server can generate a position for the target new module when it is displayed on the canvas of the second terminal device, and then add the information such as the identification of the target new module, its position on the canvas, and the associated relationship to the module information set.
[0132] The manner in which the server generates the position of the target newly added module in the canvas of the second terminal device will be described in detail in the following embodiments.
[0133] In this embodiment, when the information of the target newly added module does not exist in the module information set, the server generates the position of the target newly added module in the canvas of the second terminal device, and adds the information including the position to the module information set. Then, when the second terminal device requests to obtain the information of the module and display it on the second terminal device, the second terminal device can directly display the module at the position of the module recorded in the module information set, thereby ensuring the correct display of the module on the canvas of the second terminal device.
[0134] In the second manner, if the target new module exists in the module information set, the information of the target new module in the module information set is updated.
[0135] The updated information of the target newly added module includes: an identifier of the target newly added module, a module associated with the target newly added module, and a position of the target newly added module in the canvas of the second terminal device.
[0136] If the above-mentioned target new module exists in the module information set, and at the same time the server receives a new request for the association relationship of the target new module sent by the first terminal device, it means that the user has dragged the target new module on the canvas on the second terminal device in advance and has not established its association relationship with other modules. Correspondingly, when the server adds the information of the target new module to the module information set, it will record that there is no associated module for the target new module. Therefore, the first terminal device will not perceive the existence of the module, and the user can establish an association relationship for the module on the first terminal device and send a second request information to the server. In this case, the server may not need to add a new record to the module information set, but update the original information of the above-mentioned target new module in the module information set. Specifically, the original information "there is no associated module for the target new module" is modified to "there is an associated module for the target new module". In addition, information such as trigger conditions can also be added to the record row corresponding to the target new module as information of the target new module.
[0137] In this embodiment, when the above-mentioned target new module exists in the module information set, the server can ensure that the information of the target new module is correct by updating the information of the target new module in the model information set, thereby avoiding errors caused by repeated addition of modules.
[0138] The following describes the process in which the server generates the position of the target new module in the canvas of the second terminal device in the first manner.
[0139] Optionally, the server may generate the position of the target new module in the canvas of the second terminal device in the following two ways.
[0140] In the first manner, if no module exists in the canvas of the second terminal device, the position of the target newly added module in the canvas of the second terminal device is generated with the preset initial coordinates as the starting point.
[0141] Optionally, the above-mentioned preset initial coordinates may be, for example, the center coordinates of the canvas. The server may establish a cross coordinate axis with the coordinates as the center point, and in the coordinate axis, the coordinates of the center point may be (0, 0).
[0142] Furthermore, when the server generates the position of the target newly added module in the canvas of the second terminal device based on the initial coordinates as the starting point, the server can add coordinate data for the target newly added module in sequence with the initial coordinates as the starting point. The generated coordinate position of the target newly added module can include, for example, the coordinates of the upper left corner and the lower right corner of the module. Alternatively, it can also include only the coordinates of the upper left corner or the lower right corner of the module, and the server calculates the overall position of the module in the canvas based on the preset module area.
[0143] In the second method, if there is a module in the canvas of the second terminal device, the current occupied area of the canvas is determined according to the positions of the modules in the upper left corner and the lower right corner of the canvas of the second terminal device, and the position of the target new module in the canvas of the second terminal device is generated with one end of the currently occupied area as the starting point.
[0144] Optionally, the server may use the coordinates of the upper left corner of the module in the upper left corner of the canvas as a vertex, and the coordinates of the lower right corner of the module in the lower right corner of the canvas as another vertex, and use these two vertices to determine a rectangle, and the area where the rectangle is located is the above-mentioned currently occupied area.
[0145] Correspondingly, one end of the currently occupied area may refer to the coordinates of the upper left corner vertex or the lower right corner vertex of the rectangle.
[0146] Taking the coordinates of the upper left corner of the rectangle as an example, the server can use the coordinates as the starting point and determine the upper left corner and lower right corner of the module in combination with the area of the module. This process can prevent the target new module from covering the existing module when it is displayed on the canvas.
[0147] Through the above two methods, modules can be added to the canvas respectively without covering the original modules.
[0148] The above describes the process of the server performing data viewing adaptation and data addition processing adaptation based on the information of the viewing module and the information of the newly added module of the first terminal device and the second terminal device. In addition to the above processing, the server can also perform adaptation processing on the information of the update module and the information of the deletion module of the first terminal device and the second terminal device. The following are respectively described.
[0149] As an optional implementation, the server may also receive a third request message sent by the first terminal device, the third request message being used to request the target update module in the update module information set. Accordingly, the server may update the information of the target update module in the module information set according to the third request message.
[0150] Optionally, when the user updates information on a module with which an association has been established on the interface of the first terminal device, the first terminal device is triggered to send the third request information to the server. The third request information may carry the identifier of the target update module and the updated information. Exemplarily, if the user modifies the trigger condition of a module A with which an association has been established, the first terminal device may send the third request information to the server, and carry the identifier of module A and the updated trigger condition.
[0151] After receiving the third request information, the server can parse it to obtain the identifier of the target update module and the updated information. The server can then find the record of the target update module in the module information set based on the identifier of the target update module, and use the updated information to replace the original information in the record, thereby realizing the update of information.
[0152] Optionally, the server may also send response information to the first terminal device to indicate whether the update of the above-mentioned target update module is successful.
[0153] It is worth noting that, for the second terminal device, the above method can also be used to update the module information, which will not be described in detail.
[0154] As an optional implementation, the server may also receive a fourth request message sent by the first terminal device, the fourth request message being used to request the deletion of the target deletion module and the association relationship of the target deletion module. Accordingly, the server may delete the target deletion module from the module information set according to the fourth request message, and delete the association relationship of the target deletion module from the module mapping table.
[0155] Optionally, when the user performs a deletion operation on a module with which an association relationship has been established on the interface of the first terminal device, the first terminal device is triggered to send the fourth request information to the server. The fourth request information may carry an identifier of the target module to be deleted.
[0156] After receiving the fourth request information, the server can parse the target deletion module to obtain the identifier of the target deletion module. The server can then find the record of the target deletion module in the module information set based on the identifier of the target update module, delete the record, and delete the mapping relationship corresponding to the target deletion module in the module mapping table. It is worth noting that if there is no other association relationship between the module associated with the target deletion module in the module information set, the server will delete the module from the module information set at the same time.
[0157] Optionally, the server may also send a response message to the first terminal device to indicate whether the deletion of the above-mentioned target deletion module is successful.
[0158] It is worth noting that, for the second terminal device, the above method can also be used to delete the module information, which will not be described in detail.
[0159] As an optional implementation, the server may process the first request information, the second request information, the third request information, and the fourth request information based on the conversion interface.
[0160] The conversion interface may be an application program (Application, APP for short) interface for implementing corresponding processing of the first request information, the second request information, the third request information, and the fourth request information, and the conversion interface is provided by the server.
[0161] Optionally, the first terminal device may use the conversion interface to send the first request information, the second request information, the third request information and the fourth request information to the server, and use different tags to distinguish the information. The server accordingly uses the tag-based identification information and triggers processing for the information.
[0162] In one example, when the server sends the second request information, it can use the conversion interface to send the request information and carry a "create" tag. After receiving the information and identifying "create", the server can execute the newly added adaptation processing of the module accordingly.
[0163] In another example, when the server sends the third request information, it can use the conversion interface to send the request information and carry the "edit" tag. After receiving the information and identifying "edit", the server can execute the module information update process accordingly.
[0164] In another example, when the server sends the fourth request information, it can use the conversion interface to send the request information and carry a "delete" tag. After receiving the information and identifying "delete", the server can execute the module information deletion process accordingly.
[0165] As an optional implementation, an optional manner of the aforementioned step S403 includes:
[0166] Based on a target display format of the first terminal device, the at least one associated module pair is converted into data having the target display format, and the data having the target display format is sent to the first terminal device.
[0167] Optionally, the target display format can be sent in advance by the first terminal device to the server. The target display format refers to the data format used by the first terminal device. The server converts the information obtained from the module information set into the format used by the first terminal device. After receiving the information, the first terminal device can directly use the data for data display, etc.
[0168] The present application embodiment also provides an electronic device 70, such as Figure 7 As shown, it is a schematic diagram of the structure of an electronic device 70 provided in an embodiment of the present application. The electronic device may be the aforementioned first terminal device, second terminal device or server, and the electronic device includes: a processor 71, a memory 72, and a bus 73. The memory 72 stores machine-readable instructions executable by the processor 71 (for example, Figure 6When the electronic device 70 is running, the processor 71 communicates with the memory 72 through the bus 73. When the electronic device is the aforementioned first terminal device, the machine-readable instructions are executed by the processor 71 to perform the method steps performed by the first terminal device in the above-mentioned method embodiment. When the electronic device is the aforementioned second terminal device, the machine-readable instructions are executed by the processor 71 to perform the method steps performed by the second terminal device in the above-mentioned method embodiment. When the electronic device is the aforementioned server, the machine-readable instructions are executed by the processor 71 to perform the method steps performed by the server in the above-mentioned method embodiment.
[0169] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method steps performed by the first terminal device, the second terminal device or the server in the above-mentioned data adaptation processing method are executed.
[0170] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0171] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or part of the technical solution that contributes to the prior art or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.
[0172] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A data adaptation processing method, It is characterized in that Applied to a workflow system, the workflow system comprises: a server, a first terminal device and a second terminal device, wherein the first terminal device is a terminal device where a mobile terminal client is located, and the second terminal device is a terminal device where a personal computer client is located; The method comprises: The first terminal device and the second terminal device respectively respond to the user's operation, generate data operation information and send the data operation information to the server, wherein the data operation information includes: information of adding a module, updating a module, deleting a module or viewing a module; The server receives the data operation information, and updates the module storage information based on the data operation information, and / or sends the module information to the first terminal device or the second terminal device based on the module storage information, wherein the module information is the module information adapted to the client of the first terminal device or the second terminal device, the module storage information is the information of the module stored on the server, the module storage information includes the basic information of the module and the association information of the module, the module storage information includes: a module information set and a module mapping table, the module information set includes at least one module, each of the modules includes the following information: an identifier of the module, whether the module has an associated module, and a position of the module in the canvas of the second terminal device, the module mapping table is used to record the association relationship between modules, and the module information set and the module mapping table are generated based on the operation of the user on the first terminal device and / or the second terminal device; The first terminal device and the second terminal device respectively receive response information sent by the server, where the response information is used to indicate the module information and / or whether the operation is successful.
2. The method according to claim 1, It is characterized in that The server receives the data operation information, updates module storage information based on the data operation information, and / or sends module information to the first terminal device or the second terminal device based on the module storage information, including: The server receives first request information sent by the first terminal device, where the first request information is used to request to obtain information of modules having an associated relationship; The server determines at least one associated module pair according to the first request information, the module information set and the module mapping table, wherein each associated module pair includes two modules having an associated relationship; The server sends a first response message to the first terminal device, wherein the first response message includes information of the at least one association module pair; The first terminal device receives the response information sent by the server, including: The first terminal device reads the information of the at least one associated module pair from the first response information and displays the information of the at least one associated module pair.
3. The method according to claim 2, It is characterized in that The server determines at least one associated module pair according to the first request information, the module information set and the module mapping table, including: The server traverses the modules in the module information set one by one according to the first request information; if the first module in the module information set has an associated module, the server reads the associated module of the first module from the module mapping table, and combines the first module and the associated module of the first module into an associated module pair, wherein the first module is any module in the module information set.
4. The method according to claim 2, It is characterized in that The server receives the data operation information, updates module storage information based on the data operation information, and / or sends module information to the first terminal device or the second terminal device based on the module storage information, including: The server receives second request information sent by the first terminal device, where the second request information is used to request adding information of a target new module and information of an associated new module associated with the target new module; The server adds the information of the target new module to the module information set, adds the information of the associated new module to the module information set, and adds the association relationship between the target new module and the associated new module to the module mapping table according to the information of the target new module, the information of the associated new module and the module information set; The server sends a second response message to the second terminal device, where the second response message is used to indicate whether the module is added successfully.
5. The method according to claim 4, It is characterized in that The server adds the information of the target new module to the module information set according to the information of the target new module, the information of the associated new module and the module information set, including: If the information of the target new module does not exist in the module information set, the server generates the position of the target new module in the canvas of the second terminal device, and adds the information of the target new module to the module information set, wherein the added information of the target new module includes: the identification of the target new module, the associated module of the target new module and the position of the target new module in the canvas of the second terminal device.
6. The method according to claim 5, It is characterized in that The server generates a position of the target new module in the canvas of the second terminal device, including: If the module does not exist in the canvas of the second terminal device, the server generates a position of the target new module in the canvas of the second terminal device with the preset initial coordinates as a starting point.
7. The method according to claim 5, It is characterized in that The server generates a position of the target new module in the canvas of the second terminal device with the preset initial coordinates as the starting point, including: If there is a module in the canvas of the second terminal device, the server determines the current occupied area of the canvas based on the positions of the modules in the upper left corner and the lower right corner of the canvas of the second terminal device, and generates the position of the target new module in the canvas of the second terminal device with one end of the currently occupied area as the starting point.
8. The method according to claim 4, It is characterized in that The server adds the information of the target new module to the module information set according to the information of the target new module, the information of the associated new module and the module information set, including: If the target new module exists in the module information set, the server updates the information of the target new module in the module information set, and the updated information of the target new module includes: the identification of the target new module, the associated module of the target new module and the position of the target new module in the canvas of the second terminal device.
9. The method according to claim 2, It is characterized in that The server receives the data operation information, updates module storage information based on the data operation information, and / or sends module information to the first terminal device or the second terminal device based on the module storage information, including: The server receives third request information sent by the first terminal device, where the third request information is used to request updating of a target update module in the module information set; The server updates the information of the target update module in the module information set according to the third request information.
10. The method according to claim 2, It is characterized in that The server receives the data operation information, updates module storage information based on the data operation information, and / or sends module information to the first terminal device or the second terminal device based on the module storage information, including: The server receives fourth request information sent by the first terminal device, where the fourth request information is used to request deletion of a target deletion module and an association relationship between the target deletion modules; The server deletes the target deletion module from the module information set according to the fourth request information, and deletes the association relationship of the target deletion module in the module mapping table.
11. The method according to any one of claims 2 to 10, It is characterized in that The server sends first response information to the first terminal device, including: Based on a target display format of the first terminal device, converting the at least one associated module pair into data having the target display format; The data having the target display format is sent to the first terminal device.
12. A workflow system, It is characterized in that include: A first terminal device, a second terminal device, and a server; The first terminal device is used to execute the method steps performed by the first terminal device in the data adaptation processing method according to any one of claims 1 to 11; The second terminal device is used to execute the method steps performed by the second terminal device in the data adaptation processing method according to any one of claims 1 to 11; The server is used to execute the method steps executed by the server in the data adaptation processing method described in any one of claims 1-11.
13. An electronic device, It is characterized in that include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the terminal device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to execute the method steps executed by the first terminal device, the method steps executed by the second terminal device, or the method steps executed by the server in the data adaptation processing method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the method steps executed by the first terminal device, the method steps executed by the second terminal device, or the method steps executed by the server in the data adaptation processing method as described in any one of claims 1 to 11.
