CN112367363A - Information sharing method, device, server and storage medium - Google Patents

Information sharing method, device, server and storage medium Download PDF

Info

Publication number
CN112367363A
CN112367363A CN202011149017.5A CN202011149017A CN112367363A CN 112367363 A CN112367363 A CN 112367363A CN 202011149017 A CN202011149017 A CN 202011149017A CN 112367363 A CN112367363 A CN 112367363A
Authority
CN
China
Prior art keywords
context
information
service node
workflow
context information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011149017.5A
Other languages
Chinese (zh)
Inventor
杨峙岳
尹强
刘有
王和平
黄山
冯朝阁
杨永坤
邸帅
卢道和
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN202011149017.5A priority Critical patent/CN112367363A/en
Publication of CN112367363A publication Critical patent/CN112367363A/en
Priority to PCT/CN2021/124096 priority patent/WO2022083512A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application discloses an information sharing method, which is applied to an information sharing server and comprises the following steps: receiving a context identifier and context information sent by a first service node; the context identifier is used for uniquely identifying a target workflow, and the context information is obtained by the first service node executing the target workflow; determining, based on a target workflow, a second service node that executes the target workflow in dependence on context information of the first service node; sending the context identifier and the context information to the second service node; the context identifier is used for enabling the second service node to determine the corresponding target workflow, and enabling the second service node to execute the corresponding target subtask in the target workflow based on the context information. The embodiment of the application also discloses an information sharing device, a server and a storage medium.

Description

Information sharing method, device, server and storage medium
Technical Field
The present application relates to the field of big data technologies, and in particular, to an information sharing method, an information sharing apparatus, a server, and a storage medium.
Background
With the rapid development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually changing to financial technology (Fintech), but higher requirements are also put forward on the technologies due to the requirements of the financial industry on safety and real-time performance. With the popularization and application of big data technology, how to share information in different business systems becomes a technical problem which needs to be solved urgently, and at present, a common mode is mainly to persist the shared information to a database accessible to all business systems through the business systems, and then when other business systems need the shared information, the shared information is obtained from the database.
However, in the currently common manner, when different service systems all use a persistent manner to read shared information from a database, the security of the database is low, so that the shared data information is easily leaked, and the sharable data types in the database are limited, so that the type of context information supported in the current information sharing scheme is single.
Content of application
In order to solve the above technical problems, embodiments of the present application are expected to provide an information sharing method, an information sharing apparatus, a server, and a storage medium, so as to solve the problem that the type of context information supported in the current information sharing scheme is relatively single, effectively enrich the types of context information supported in the information sharing scheme, ensure the security of a database, and effectively reduce the risk of leakage of shared information.
The technical scheme of the application is realized as follows:
in a first aspect, an information sharing method is applied to an information sharing server, and the method includes:
receiving a context identifier and context information sent by a first service node; the context identifier is used for uniquely identifying a target workflow, and the context information is obtained by the first service node executing the target workflow;
determining, based on a target workflow, a second service node that executes the target workflow in dependence on context information of the first service node;
sending the context identifier and the context information to the second service node; the context identifier is used for enabling the second service node to determine the corresponding target workflow, and enabling the second service node to execute the corresponding target subtask in the target workflow based on the context information.
In a second aspect, an information sharing apparatus, the apparatus comprising: the device comprises a receiving unit, a first determining unit and a sending unit; wherein:
the receiving unit is configured to receive the context identifier and the context information sent by the first service node; the context identifier is used for uniquely identifying a target workflow, and the context information is obtained by the first service node executing the target workflow;
the first determining unit is configured to determine, based on the target workflow, a second service node that executes the target workflow in dependence on context information of the first service node;
the sending unit is configured to send the context identifier and the context information to the second service node; the context identifier is used for enabling the second service node to determine a corresponding target workflow, and enabling the second service node to execute a corresponding target subtask in the target workflow based on the context information.
In a third aspect, an information sharing server, the server comprising a memory, a processor, and a communication bus; wherein:
the memory to store executable instructions;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is configured to execute the information sharing program stored in the memory, and implement the steps of the information sharing method according to any one of the above.
In a fourth aspect, a storage medium has stored thereon an information sharing program which, when executed by a processor, implements the steps of the information sharing method as in any one of the above.
In the embodiment of the application, after receiving the context identifier and the context information sent by the first service node, the information sharing server determines, based on the target workflow, a second service node that executes the target workflow depending on the context information of the first service node, and sends the context identifier and the context information to the second service node, so that the second service node realizes a target subtask included in the target workflow based on the context information. Thus, the service nodes share the context information through the information sharing server, can support various types of context information, after receiving the context information, the information sharing server actively sends the context information to the service node which needs to use the context information, the service node which needs not to use the context information inquires the information sharing server to request the context information, thereby effectively improving the efficiency of transmitting the context information to the service node which uses the context information and simplifying the transmission process of the context information, therefore, the transmission time is shortened, the problem that the type of the context information supported in the current information sharing scheme is single is solved, the types of the context information supported in the information sharing scheme are effectively enriched, the security of the database is ensured, and the risk of leakage of the shared information is effectively reduced.
Drawings
Fig. 1 is a schematic flowchart of an information sharing method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another information sharing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another information sharing method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of storing version information corresponding to a workflow after the workflow is released according to an embodiment of the present application;
fig. 5 is a schematic diagram illustrating a flow of transmission in a service node and an information sharing server during context sharing according to an embodiment of the present application;
fig. 6 is a schematic diagram of a data flow in an application scenario according to an embodiment of the present application;
fig. 7 is a schematic diagram of data flow in another application scenario provided in the embodiment of the present application;
fig. 8 is a schematic structural diagram of an information sharing apparatus according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of another information sharing apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an information sharing server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
An embodiment of the present application provides an information sharing method, which is applied to an information sharing server and is shown in fig. 1, and the method includes the following steps:
step 101, receiving a context identifier and context information sent by a first service node.
The context identifier is used for uniquely identifying the target workflow, and the context information is obtained by the first service node executing the target workflow.
In the embodiment of the present application, the information sharing server is a server for providing a microservice. The information sharing servers may be arranged at least one according to actual needs. The information sharing server may provide context information storage services for a plurality of service nodes, wherein different service nodes are used for operating different service systems to provide different service services. The first service node may be a first service node executing the target workflow in the at least one service node executing the target workflow, or may be any one of the service nodes executing the target workflow except for the first service node executing the target workflow.
The context information may be the environment in which the application runs, for example, when the application runs, the stack variables, heap memory, and input/output of the application form the context of the application. The context is used to provide the content required by the application program, including variables and even files, when the application program performs any one of the steps. In a narrow definition, a context generally exists in one process, that is, in one system; in a broad definition, context may be used to ensure that multiple processes are running properly, i.e., for use by multiple systems.
Cross-system context sharing: in the big data field, a plurality of dependent tasks can be organized into a workflow and then executed in a cluster, so that the plurality of dependent tasks organized into the workflow from the cluster perspective are one task, and therefore, the workflow can share information through a common context when being executed by the cluster.
Step 102, determining a second service node which executes the target workflow depending on the context information of the first service node based on the target workflow.
In this embodiment of the present application, the second service node is a service node having a dependency relationship with the first service node, that is, after the target workflow is executed by the first service node, the target workflow needs to be executed by the second service node, and when the second service node executes the target workflow, the second service node needs to rely on the first service node to execute context information generated by the target workflow. In some application scenarios, there may be multiple second service nodes, that is, after the first service node executes the target workflow, there may be multiple second service nodes that need to execute the subtasks in the target workflow based on the context information generated by the first service node executing the target workflow.
The information sharing server may determine the second service node according to a flow direction of the target workflow.
Step 103, sending the context identifier and the context information to the second service node.
The context identifier is used for enabling the second service node to determine a corresponding target workflow, and enabling the second service node to execute a corresponding target subtask in the target workflow based on the context information.
In this embodiment of the application, since the second service node may be configured to execute tasks corresponding to different workflows, after receiving the context identifier and the context information sent by the information server, the second service node may determine a target workflow to be executed according to the context identifier, and execute a corresponding target subtask in the target workflow based on the context information. When the second service node executes the corresponding target subtask in the target workflow based on the context information, the second service node may directly obtain parameter information for executing the corresponding target subtask in the target workflow from the context information, or obtain corresponding file content from an information storage path included in the context information to execute the corresponding target subtask.
In the embodiment of the application, after receiving the context identifier and the context information sent by the first service node, the information sharing server determines, based on the target workflow, a second service node that executes the target workflow depending on the context information of the first service node, and sends the context identifier and the context information to the second service node, so that the second service node realizes a target subtask included in the target workflow based on the context information. Thus, the service nodes share the context information through the information sharing server, can support various types of context information, after receiving the context information, the information sharing server actively sends the context information to the service node which needs to use the context information, the service node which needs not to use the context information inquires the information sharing server to request the context information, thereby effectively improving the efficiency of transmitting the context information to the service node which uses the context information and simplifying the transmission process of the context information, therefore, the transmission time is shortened, the problem that the type of the context information supported in the current information sharing scheme is single is solved, the types of the context information supported in the information sharing scheme are effectively enriched, the security of the database is ensured, and the risk of leakage of the shared information is effectively reduced.
Based on the foregoing embodiments, an embodiment of the present application provides an information sharing method, which is shown in fig. 2 and includes the following steps:
step 201, the information sharing server determines the workflow to be executed, and creates a context identifier for the workflow to be executed.
In the embodiment of the application, the information sharing server determines the to-be-executed workflow which needs to be executed by a plurality of service nodes, wherein the plurality of service nodes agree to share one set of context, so that the information sharing server creates a context identifier for globally and uniquely identifying the context for the context corresponding to the to-be-executed workflow, and thus, the content of the shared context can be registered, obtained or modified when the plurality of service nodes execute the to-be-executed workflow.
Step 202, the information sharing server performs identification processing on the workflow to be executed by using the context identification to obtain the target workflow.
In this embodiment of the present application, the workflow to be executed may be a character string, and therefore, when the workflow to be executed is identified by using the context identifier, the context identifier may be added to the character string of the workflow to be executed, for example, the beginning or end of the character string of the workflow to be executed, so that the target workflow may be obtained. The position of the context identifier added to the character string of the workflow to be executed is agreed between the information sharing server and the plurality of service nodes, so that the service nodes can determine the context identifier from the target workflow after receiving the target workflow.
Step 203, the first service node analyzes the target workflow to obtain the context identifier, and executes the target workflow to obtain the context information.
In the embodiment of the application, after receiving the target workflow, the first service node analyzes the target workflow to obtain the context identifier, so that the storage location of the shared existing context can be determined according to the context identifier. If the first service node needs to obtain some default or initial operation parameters from the shared context, the first service node may obtain corresponding operation parameters from the shared existing context to execute the target workflow, so as to obtain context information obtained by the first service node operating the target workflow. In some application scenarios, the first service node does not need to obtain the corresponding operating parameters from the shared existing context, but can directly execute the target workflow to obtain the context information.
Step 204, the first service node sends the context identifier and the context information to the information sharing server.
In this embodiment of the present application, after the first service node executes the target workflow, the context identifier of the target workflow and the context information obtained by the first service node executing the target workflow are sent to the information sharing server, so that the context information of the first service node is sent to a next service node that needs to execute the target workflow depending on the context information of the first service node through the information sharing server.
Step 205, the information sharing server receives the context identifier and the context information sent by the first service node.
The context identifier is used for uniquely identifying the target workflow, and the context information is obtained by the first service node executing the target workflow.
Step 206, the information sharing server determines a second service node that executes the target workflow depending on the context information of the first service node based on the target workflow.
The information sharing server and the second service node establish communication connection through a full duplex communication protocol Websocket based on a transmission control protocol TCP.
In the embodiment of the application, after receiving the context identifier and the context information, the information sharing server determines a second service node which needs to use the context information of the first service node according to the dependency relationship between the service nodes indicated by the target workflow.
Step 207, the information sharing server sends the context identifier and the context information to the second service node.
The context identifier is used for the second service node to determine a corresponding target workflow, and the second service node is enabled to execute a corresponding target subtask in the target workflow based on the context information.
In the embodiment of the application, after receiving the context identifier and the context information, the information sharing server determines the second service node and directly sends the context identifier and the context information to the second service node, so that the information request process between the second service node and the information sharing server is simplified, the time for the second service node to receive the context information of the first service node is effectively shortened, and the second service node can change correspondingly to the change of the context information of the first service node more quickly.
And step 208, the second service node receives the context identifier and the context information, determines a target workflow based on the context identifier, and executes a corresponding target subtask in the target workflow based on the context information.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
In the embodiment of the application, after receiving the context identifier and the context information sent by the first service node, the information sharing server determines, based on the target workflow, a second service node that executes the target workflow depending on the context information of the first service node, and sends the context identifier and the context information to the second service node, so that the second service node realizes a target subtask included in the target workflow based on the context information. Thus, the service nodes share the context information through the information sharing server, can support various types of context information, after receiving the context information, the information sharing server actively sends the context information to the service node which needs to use the context information, the service node which needs not to use the context information inquires the information sharing server to request the context information, thereby effectively improving the efficiency of transmitting the context information to the service node which uses the context information and simplifying the transmission process of the context information, therefore, the transmission time is shortened, the problem that the type of the context information supported in the current information sharing scheme is single is solved, the types of the context information supported in the information sharing scheme are effectively enriched, the security of the database is ensured, and the risk of leakage of the shared information is effectively reduced.
In addition, it should be noted that, in the conventional technologies including the background technology, information sharing persistence is performed between the service systems, and correspondingly, information sharing is performed subsequently, and also the service systems are shared, and in such a background, the service systems can only pull context information of other systems at regular time according to requirements, because in such an architecture, similar to interaction between nodes, why notification cannot be performed, because who should be notified is unknown.
In the embodiment of the invention, the information sharing is realized through the interaction of the information sharing server and the multi-service nodes, compared with the interaction of multiple nodes, the information is registered in the information sharing server, and when the information sharing is needed, the object needing to be notified can be determined, so that the accurate and active push is realized.
Based on the foregoing embodiments, an embodiment of the present application provides an information sharing method, which is shown in fig. 3 and includes the following steps:
step 301, the information sharing server determines a workflow to be executed, and creates a context identifier for the workflow to be executed.
Step 302, the information sharing server performs identification processing on the workflow to be executed by using the context identification to obtain the target workflow.
Step 303, the first service node obtains the context identifier by parsing from the target workflow, and executes the target workflow to obtain the context information.
Step 304, the first service node sends the context identifier and the context information to the information sharing server.
Step 305, the information sharing server receives the context identifier and the context information sent by the first service node.
The context identifier is used for uniquely identifying the target workflow, and the context information is obtained by the first service node executing the target workflow.
Step 306, the information sharing server determines the current version information of the target workflow.
In the embodiment of the application, the target workflow is a workflow which has been released, so that the version information of the workflow can be determined, and along with the application of the workflow, a developer can continuously increase and improve the functions of the workflow, so that the developer can determine that the workflow corresponds to a version of the workflow after improving and releasing the workflow each time.
As shown in fig. 4, a schematic flow chart of storing version information corresponding to a workflow after the workflow is released according to the present application includes a client device a and an information sharing server B. The user, for example, a developer performs workflow layout a1 on the workflow on the client device a side, performs workflow distribution a2 after the workflow layout is finished, and the information sharing server determines the version information of the distributed workflow and performs archive storage.
Step 307, the information sharing server stores the current version information, the context identifier and the context information in the target storage area.
In the embodiment of the present application, step 307 may be implemented by steps a 11-a 12:
step a11, the information sharing server analyzes the context information, determines the identification information of the context information as a keyword, and determines the information content of the context information as data.
In this embodiment of the application, the identification information of the context information may be identification information for uniquely identifying the context information, for example, the identification information may be a name of the context information, the type of the context information may be a file, a function, or even metadata in a table form, and the identification information of the context information corresponding in turn may be a file name, a function name, or a metadata name, etc. The information content of the context information may be a result set obtained by the first service node executing the target data stream, or may be a resource storage address corresponding to a file obtained when the first service node executes the target data stream data, or may also be a storage address of a corresponding function when the first service node executes the target data stream. In some application scenarios, the memory address may also be represented by a memory path.
Step a12, the information sharing server stores the context identifier, the current version information and the context information to the target storage area by using the storage format of the context identifier, the current version information and the keyword-data pair.
In this embodiment of the present application, the target storage area may be a database that the information sharing server can access, and correspondingly, when the information sharing server stores the context identifier, the current version information, and the context information in the target storage area, the context identifier, the current version information, and the context information are persisted to the database. Therefore, only the information sharing server can access the database, the safety risk caused by the fact that all service nodes can access the database is reduced, and the data safety of the database is effectively guaranteed. Illustratively, as shown in table 1, a schematic diagram of storing context identifier, current version information, and context information in a storage format of context identifier, current version information, and key-data pairs in a target storage area is shown.
TABLE 1
Figure BDA0002740576060000101
Step 308, the information sharing server determines a second service node that depends on the context information of the first service node to execute the target workflow based on the target workflow.
The information sharing server and the second service node establish communication connection through a full duplex communication protocol Websocket based on a transmission control protocol TCP.
Step 309, the information sharing server sends the context identifier and the context information to the second service node.
The context identifier is used for the second service node to determine a corresponding target workflow, and the second service node is enabled to execute a corresponding target subtask in the target workflow based on the context information.
In other embodiments of the present application, step 309 can be implemented by steps b 11-b 12:
step b11, the information sharing server performs a first pre-processing on the context information to obtain the processed context information.
Wherein the first preprocessing is used to change the format of the context information.
In this embodiment of the application, the first preprocessing may be that the information sharing server performs serialization processing on the context information, that is, a serializer is arranged in the information sharing server, and when the context information needs to be sent to the second service node, the serializer is used to perform serialization processing on the context information. In this way, the security of the transmitted data can be guaranteed.
Step b12, the information sharing server sends the context identification and the processed context information to the second service node.
And performing second preprocessing on the processed context information through a second service node to obtain the context information, wherein the second preprocessing is used for changing the format form of the context information, and the function of the second preprocessing is opposite to that of the first preprocessing.
In the embodiment of the application, the information sharing server sends the context identifier and the context information after serialization processing to the second service node, and after receiving the context information after serialization processing, the second service node processes the received processed context information by adopting a second preprocessing, namely, a deserialization processing mode, so as to obtain the context information, and execute the target subtask corresponding to the target workflow based on the context information. Wherein, the deserializer can be arranged in the second service node to realize the deserializing operation. Therefore, the data interaction capacity between the information sharing server and the second service node is effectively improved.
For example, fig. 5 is a schematic diagram illustrating the flow of transmission in the service node and the information sharing server during context sharing. Wherein, the flow direction of the workflow is pointed by the dotted arrow in fig. 5, that is: service node C → service node D → service node E. The following description will be given by taking the case of sharing context information between the service node C and the service node D: the service node C executes the workflow through the operation system C to obtain context information of the workflow, sends context identification and the context information of the workflow to the information sharing server, the information sharing server caches the context identification and the context information, sends a message of changing the context information of the service node C to a context change notification bus, meanwhile conducts persistence processing on the context identification and the context information of the service node C, and then the information sharing server sends the context information and the context identification of the service node C to a context change notification bus of a service node D of the operation system D through a WebSocket mode, so that the service node D can execute the workflow after obtaining the context information of the service node C.
And step 310, if a backspacing instruction sent by the client equipment is received, the information sharing server analyzes the backspacing instruction to obtain historical version information of the historical workflow indicated by the backspacing instruction.
In the embodiment of the application, when the function, effect or efficiency realized when the target workflow runs does not meet the requirement of the developer, the developer can perform control operation on the information sharing server through the client device to call the historical workflow of a certain version in the historical versions to perform corresponding research. Typically, the back-off instruction sent by the client device indicates a historical version adjacent to the target workflow version.
Step 311, the information sharing server obtains the historical workflow, the historical context identifier and the historical context information corresponding to the historical version information from the target storage area.
Wherein the historical context identification is used to uniquely identify the historical workflow.
Step 312, the information sharing server determines a third service node based on the historical workflow.
Step 313, the information sharing server sends the historical context identifier and the historical context information to the third service node.
And the historical context identifier is used for enabling the third service node to determine a corresponding historical workflow and enabling the third service node to execute a corresponding historical subtask in the historical workflow based on the historical context information. And the information sharing server and the third service node establish communication connection through a full duplex communication protocol Websocket based on a transmission control protocol TCP.
In the embodiment of the application, the version information of the workflow and the corresponding historical context information are recorded, and the rollback function is provided, so that when a target workflow has problems and needs to be rolled back, the workflow can be directly rolled back to the historical context information corresponding to the corresponding historical version, and the working efficiency is effectively improved.
It should be noted that, if the second service node also generates corresponding context information after executing the target workflow based on the context information sent by the first service node, the subsequent operation executed by the second service node is the same as the operation executed by the first service node in the present application, and is not described herein again, and this is repeated until the end of executing the target workflow by the last service node to which the target workflow flows.
Based on the foregoing embodiments, an application embodiment of the information sharing method is provided in the embodiments of the present application, and a corresponding data flow process is shown in fig. 6, where a cluster executing a workflow includes 4 service systems and 4 underlying support systems, which are respectively: the system comprises a service system 1, a service system 2, a service system 3, a service system 4, a material resource management system, a custom function management system and a cluster configuration management system. It should be noted that each service system corresponds to one service node. Wherein, the flow direction of the dashed arrow in fig. 6 is the actual flow direction of the workflow, and the corresponding implementation steps are as follows:
step c1, the task arranging system arranges the tasks in the cluster into a workflow form, the context server determines the workflow through the task arranging system, creates a uniform context identifier for the workflow, and writes the context identifier into each task of the workflow.
The workflow is a large task from the cluster point of view when being executed, and the large task can be shared by a uniform context. A uniform context ID can be created and written to each task of the workflow after the creation of the context ID, so that all tasks have a uniform context ID. The context server is the aforementioned information sharing server.
Step c2, when the workflow is executed, and a corresponding task in the workflow is executed in the business system 1, a file is generated, that is, the first context information generated by the business system 1 is the file, the file is first uploaded to the material resource management system for storage, and the first storage identifier of the file in the material resource management system is obtained from the material resource management system.
Step c3, the service system 1 registers the context ID and the first context information in the context server through the context registration request.
The first context information comprises a file name and a storage identifier of the file in the material management system.
Step c4, the context server receives the context registration request of the service system 1, and obtains the context ID and the first context information from the context registration request, and then persists the obtained context ID and the obtained context information in the database.
When the context server persists the first context information in the database, the file name in the first context information is used as a context Key (Key), and the storage identifier of the file in the material management system is context data (Value), so that a Key-Value pair is formed for storage, and thus, the fast storage is realized and the fast search can be realized in the subsequent search process.
Step c5, if the service system 1 further includes the custom function, the service system 1 registers the custom function in the custom function management system, and receives a second storage identifier of the custom function in the custom function management system returned by the custom function management system, and the service system 1 repeatedly executes the operations of steps c3 and c4 based on the custom function. Correspondingly, the first context information may further include a second storage identifier.
Step c6, after receiving the first context information sent by the service system 1, the context server determines the service system 2 which needs to use the first context information of the service system 1 according to the flow direction of the workflow, and sends the context ID and the first context information to the service system 2 in a WebSocket manner.
Step c7, after the business system 2 receives the first context information sent by the context server, the file content corresponding to the file name in the first context information is obtained from the storage identifier of the material management system from the file in the material management system corresponding to the first context information, and based on the file content obtained from the material management system, the corresponding task in the workflow is executed, and the business system 2 generates the second context information.
In some application scenarios, the service system 2 may not generate context information, and correspondingly, the service system 2 may not upload the context information to the context server.
Step c8, the business system 2 registers the context ID and the second context information to the context server.
And step c9, the context server sends the context ID and the second context information to the service system 3 in a WebSocket mode.
The process of registering the context ID and the second context information by the service system 2 and the process of sending the context ID and the second context information to the service system 3 by the context server are the same as the process between the service system 1 and the context server, and are not described in detail here.
Step c10, after the business system 2 executes the corresponding task in the workflow, the workflow enters the business system 3, and the business system 3 executes the corresponding task in the workflow based on the second context information, for example, the business system 3 changes the setting of a certain parameter in the cluster to obtain the changed parameter setting. The service system 3 stores the changed parameter setting to the cluster configuration management system, and receives a storage identifier of the cluster configuration management system for the changed parameter setting.
In some application scenarios, if the service system 3 does not depend on the context information of the previous service system, the corresponding task in the workflow may be directly executed.
Step c11, the service system 3 determines the received storage identifier of the changed parameter setting as the third context information, and registers the third context information and the context ID to the context server.
Step c12, the context server determines the service system 4, and sends the third context information and the context ID to the service system 4 in a WebSocket mode; after the business system 3 finishes executing the corresponding tasks in the workflow, the workflow enters the business system 4, and the business system 4 executes the corresponding tasks in the workflow based on the third context information, so that the tasks in the workflow are completely executed.
Based on the foregoing embodiments, the embodiments of the present application provide a specific embodiment of a context application, which includes four systems: the Structured Query Language (SQL) execution system, the data quality detection system, the visualization system, and the mail sending system execute in sequence, where data flow between 4 systems and the context server is as indicated by solid arrows in fig. 7, and correspondingly, flow of workflows among 4 systems is as indicated by dashed arrows in fig. 7. The method specifically realizes the execution steps of:
and d1, executing the query statement with the selection function by the SQL execution system, namely, the SQL statement beginning with select, and obtaining a result set based on the query statement, wherein the result set is context information corresponding to the SQL execution system. The SQL execution system registers the result set in the context server.
Step d2, the context server persists the result set to the database.
And d3, the context server sends the received result set to the data quality detection system, the data quality detection system verifies the result, and if the verification is successful, the workflow enters the visualization system.
D4, the visualization system visually displays the result set, and makes a picture based on the visually displayed report, wherein the corresponding context information of the visualization system is the picture; the visualization system registers the picture in the context server.
Step d5, the context server persists the picture to the database.
And d6, the context server sends the picture to the mail sending system, so that the mail sending system writes the picture into the mail and sends the picture, thereby completing the work task.
Based on the foregoing embodiments, in a Key-Value pair, the supported context types may include resource files, custom variables, cluster parameter settings, environment variables, and generated result sets, etc. The Key may be used to identify the type corresponding to the context information, and may be a file, a function, or metadata of a table. After the corresponding types are identified, they are uniformly named without conflict, for example, the file is a globally unique file name, and the function is a function name. While Value is various, some types of Value can be referred to table 2.
TABLE 2
Figure BDA0002740576060000161
For example, a Key of a resource file may be a name of the resource file, and a corresponding Value is a resource identifier, that is, a resource id, that is, the resource file has a unique resource id in the whole cluster; key of the result set is a temporary table name such as $ { cs _ tmp _ table } which may be the result set, and the corresponding Value is metadata (metadata) information and a storage address.
In the present application, the type of the context information shared in the embodiment of the present application may be a context type required for each item of computation in a big data field, so that, compared to a current scheme that a reliable coordination system (ZooKeeper) and a service discovery framework (Eureka) of a distributed system are used as an information registry to share a small number of types of context information, the present application considers a plurality of types of context information, such as resource files, configuration parameters, custom variables, and the like, and therefore, more content information is compatible in the design of a data structure, an effective sharing service can be provided for a large number of different types of context information, and the present application has wider practicability.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
In the embodiment of the application, after receiving the context identifier and the context information sent by the first service node, the information sharing server determines, based on the target workflow, a second service node that executes the target workflow depending on the context information of the first service node, and sends the context identifier and the context information to the second service node, so that the second service node realizes a target subtask included in the target workflow based on the context information. Thus, the service nodes share the context information through the information sharing server, can support various types of context information, after receiving the context information, the information sharing server actively sends the context information to the service node which needs to use the context information, the service node which needs not to use the context information inquires the information sharing server to request the context information, thereby effectively improving the efficiency of transmitting the context information to the service node which uses the context information and simplifying the transmission process of the context information, therefore, the transmission time is shortened, the problem that the type of the context information supported in the current information sharing scheme is single is solved, the types of the context information supported in the information sharing scheme are effectively enriched, the security of the database is ensured, and the risk of leakage of the shared information is effectively reduced. And the historical context information of the workflows of different versions is recorded, so that the workflow can be returned to the expected historical version simply and quickly, and the corresponding historical context information is called.
Based on the foregoing embodiments, an embodiment of the present application provides an information sharing apparatus, and as shown in fig. 8, the information sharing apparatus 4 may include: a receiving unit 41, a first determining unit 42, and a transmitting unit 43; wherein:
a receiving unit 41, configured to receive the context identifier and the context information sent by the first service node; the context identifier is used for uniquely identifying the target workflow, and the context information is obtained by the first service node executing the target workflow;
a first determining unit 42, configured to determine, based on the target workflow, a second service node that executes the target workflow in dependence on context information of the first service node;
a sending unit 43, configured to send the context identifier and the context information to the second service node; the context identifier is used for the second service node to determine a corresponding target workflow, and the second service node is enabled to execute a corresponding target subtask in the target workflow based on the context information.
In other embodiments of the present application, referring to fig. 9, before the receiving unit 41, the apparatus further includes: a processing unit 44 and an identification unit 45; wherein:
a processing unit 44, configured to determine a workflow to be executed, and create a context identifier for the workflow to be executed;
and the identifying unit 45 is configured to perform identification processing on the workflow to be executed by using the context identifier, so as to obtain the target workflow.
In other embodiments of the present application, referring to fig. 9, after receiving unit 41, the apparatus further includes: second determination unit 46 and storage unit 47:
a second determining unit 46, configured to determine current version information to which the target workflow currently belongs;
and the storage unit 47 is used for storing the current version information, the context identifier and the context information into the target storage area.
In other embodiments of the present application, a memory cell includes: the device comprises a first processing module and a storage module; wherein:
the first processing module is used for analyzing the context information, determining the identity identification information of the context information as a keyword and determining the information content of the context information as data;
and the storage module is used for storing the context identifier, the current version information and the context information to the target storage area by adopting the storage format of the context identifier, the current version information and the keyword-data pair.
In other embodiments of the present application, referring to fig. 9, the apparatus further includes: an analysis unit 48 and an acquisition unit 49; wherein:
the analysis unit 48 is configured to, if a rollback instruction sent by the client device is received, analyze the rollback instruction to obtain historical version information of the historical workflow indicated by the rollback instruction;
an obtaining unit 49, configured to obtain, from the target storage area, a historical workflow, a historical context identifier, and historical context information corresponding to the historical version information; wherein, the historical context identifier is used for uniquely identifying the historical workflow;
a first determining unit 42, further configured to determine a third service node based on the historical workflow;
a sending unit 43, further configured to send the historical context identifier and the historical context information to the third service node; and the historical context identifier is used for enabling the third service node to determine a corresponding historical workflow and enabling the third service node to execute a corresponding historical subtask in the historical workflow based on the historical context information.
In other embodiments of the present application, the information sharing server and the second service node establish a communication connection through a full duplex communication protocol WebSocket based on a transmission control protocol TCP.
In other embodiments of the present application, the sending unit 43 includes: the second processing module and the sending module; wherein:
the second processing module is used for carrying out first preprocessing on the context information to obtain processed context information; wherein the first preprocessing is used for changing the format of the context information;
a sending module, configured to send the context identifier and the processed context information to a second service node; and performing second preprocessing on the processed context information through a second service node to obtain the context information, wherein the second preprocessing is used for changing the format form of the context information, and the function of the second preprocessing is opposite to that of the first preprocessing.
It should be noted that, in the embodiment, a specific implementation process of information interaction between the units and the modules may refer to an implementation process in the information sharing method provided in the embodiment corresponding to fig. 1 to 3, and details are not described here.
In the embodiment of the application, after receiving the context identifier and the context information sent by the first service node, the information sharing server determines, based on the target workflow, a second service node that executes the target workflow depending on the context information of the first service node, and sends the context identifier and the context information to the second service node, so that the second service node realizes a target subtask included in the target workflow based on the context information. Thus, the service nodes share the context information through the information sharing server, can support various types of context information, after receiving the context information, the information sharing server actively sends the context information to the service node which needs to use the context information, the service node which needs not to use the context information inquires the information sharing server to request the context information, thereby effectively improving the efficiency of transmitting the context information to the service node which uses the context information and simplifying the transmission process of the context information, therefore, the transmission time is shortened, the problem that the type of the context information supported in the current information sharing scheme is single is solved, the types of the context information supported in the information sharing scheme are effectively enriched, the security of the database is ensured, and the risk of leakage of the shared information is effectively reduced. And the historical context information of the workflows of different versions is recorded, so that the workflow can be returned to the expected historical version simply and quickly, and the corresponding historical context information is called.
Based on the foregoing embodiments, embodiments of the present application provide an information sharing server, and as shown in fig. 10, the information sharing server 5 may include: a processor 51, a memory 52, and a communication bus 53, wherein:
a memory 52 for storing executable instructions;
a communication bus 53 for implementing a communication connection between the processor 51 and the memory 52;
the processor 51 is configured to execute the information sharing program stored in the memory 52 to implement the implementation process in the information sharing method provided in the embodiments corresponding to fig. 1 to 3, which is not described herein again.
Based on the foregoing embodiments, embodiments of the present application provide a computer-readable storage medium, referred to as a storage medium for short, where one or more programs are stored in the computer-readable storage medium, and the one or more programs can be executed by one or more processors to implement the implementation process of the information sharing method provided in the embodiments corresponding to fig. 1 to 3, and details are not described here.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.

Claims (10)

1. An information sharing method, applied to an information sharing server, the method comprising:
receiving a context identifier and context information sent by a first service node; the context identifier is used for uniquely identifying a target workflow, and the context information is obtained by the first service node executing the target workflow;
determining, based on a target workflow, a second service node that executes the target workflow in dependence on context information of the first service node;
sending the context identifier and the context information to the second service node; the context identifier is used for enabling the second service node to determine the corresponding target workflow, and enabling the second service node to execute the corresponding target subtask in the target workflow based on the context information.
2. The method of claim 1, wherein prior to receiving the context identifier and the context information sent by the first service node, the method further comprises:
determining a workflow to be executed, and creating a context identifier for the workflow to be executed;
and identifying the workflow to be executed by adopting the context identification to obtain the target workflow.
3. The method of claim 1, wherein after receiving the context identifier and the context information sent by the first service node, the method further comprises:
determining current version information to which the target workflow belongs currently;
and storing the current version information, the context identification and the context information to a target storage area.
4. The method of claim 3, wherein storing the current version information, the context identifier, and the context information in a target storage area comprises:
analyzing the context information, determining the identity identification information of the context information as a keyword, and determining the information content of the context information as data;
and storing the context identifier, the current version information and the context information to the target storage area by adopting a storage format of the context identifier, the current version information and the keyword-data pair.
5. The method of claim 3, further comprising:
if a backspacing instruction sent by client equipment is received, analyzing the backspacing instruction to obtain historical version information of a historical workflow indicated by the backspacing instruction;
acquiring historical workflow, historical context identification and historical context information corresponding to the historical version information from the target storage area; wherein the historical context identifier is used to uniquely identify the historical workflow;
determining a third service node based on the historical workflow;
sending the historical context identifier and the historical context information to the third service node; wherein the historical context identifier is configured to enable the third service node to determine the corresponding historical workflow, and enable the third service node to execute the corresponding historical subtask in the historical workflow based on the historical context information.
6. The method of claim 1, wherein said sending the context identifier and the context information to the second service node comprises:
performing first preprocessing on the context information to obtain processed context information; wherein the first preprocessing is used for changing the format of the context information;
sending the context identifier and the processed context information to the second service node; and performing second preprocessing on the processed context information through the second service node to obtain the context information, wherein the second preprocessing is used for changing the format form of the context information, and the second preprocessing is opposite to the function realized by the first preprocessing.
7. The method according to any of claims 1-6, wherein the information sharing server establishes a communication connection with the second service node via a full duplex communication protocol WebSocket based on a Transmission control protocol TCP.
8. An information sharing apparatus, the apparatus comprising: the device comprises a receiving unit, a first determining unit and a sending unit; wherein:
the receiving unit is configured to receive the context identifier and the context information sent by the first service node; the context identifier is used for uniquely identifying a target workflow, and the context information is obtained by the first service node executing the target workflow;
the first determining unit is configured to determine, based on the target workflow, a second service node that executes the target workflow in dependence on context information of the first service node;
the sending unit is configured to send the context identifier and the context information to the second service node; the context identifier is used for enabling the second service node to determine a corresponding target workflow, and enabling the second service node to execute a corresponding target subtask in the target workflow based on the context information.
9. An information sharing server, the server comprising a memory, a processor, and a communication bus; wherein:
the memory to store executable instructions;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor, configured to execute the information sharing program stored in the memory, and implement the steps of the information sharing method according to any one of claims 1 to 7.
10. A storage medium having stored thereon an information sharing program which, when executed by a processor, implements the steps of the information sharing method according to any one of claims 1 to 7.
CN202011149017.5A 2020-10-23 2020-10-23 Information sharing method, device, server and storage medium Pending CN112367363A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011149017.5A CN112367363A (en) 2020-10-23 2020-10-23 Information sharing method, device, server and storage medium
PCT/CN2021/124096 WO2022083512A1 (en) 2020-10-23 2021-10-15 Information sharing method, apparatus and server, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011149017.5A CN112367363A (en) 2020-10-23 2020-10-23 Information sharing method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN112367363A true CN112367363A (en) 2021-02-12

Family

ID=74511973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011149017.5A Pending CN112367363A (en) 2020-10-23 2020-10-23 Information sharing method, device, server and storage medium

Country Status (2)

Country Link
CN (1) CN112367363A (en)
WO (1) WO2022083512A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112818064A (en) * 2021-02-25 2021-05-18 平安普惠企业管理有限公司 Multi-system data synchronization method, device, equipment and storage medium
CN113360220A (en) * 2021-06-23 2021-09-07 平安普惠企业管理有限公司 Workflow realization method, system, equipment and medium based on global context class
CN113553200A (en) * 2021-07-26 2021-10-26 江苏数兑科技有限公司 Information transmission method and system of cross-application system
WO2022083512A1 (en) * 2020-10-23 2022-04-28 深圳前海微众银行股份有限公司 Information sharing method, apparatus and server, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110347494A (en) * 2019-07-17 2019-10-18 深圳前海微众银行股份有限公司 Context information management method, apparatus, system and computer readable storage medium
CN110414948A (en) * 2019-08-30 2019-11-05 北京字节跳动网络技术有限公司 Information processing method, device, server and computer readable storage medium
CN110717739A (en) * 2019-10-15 2020-01-21 深圳前海微众银行股份有限公司 Workflow issuing method, device, equipment and computer readable storage medium
CN110738389A (en) * 2019-09-03 2020-01-31 深圳壹账通智能科技有限公司 Workflow processing method and device, computer equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120159341A1 (en) * 2010-12-21 2012-06-21 Microsoft Corporation Interactions with contextual and task-based computing environments
CN109547997A (en) * 2017-08-04 2019-03-29 中国移动通信有限公司研究院 Data sharing method, server, computer readable storage medium and system
CN110839079B (en) * 2019-11-15 2022-02-08 深圳前海微众银行股份有限公司 BI node execution method, device, equipment and medium in workflow system
CN112367363A (en) * 2020-10-23 2021-02-12 深圳前海微众银行股份有限公司 Information sharing method, device, server and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110347494A (en) * 2019-07-17 2019-10-18 深圳前海微众银行股份有限公司 Context information management method, apparatus, system and computer readable storage medium
CN110414948A (en) * 2019-08-30 2019-11-05 北京字节跳动网络技术有限公司 Information processing method, device, server and computer readable storage medium
CN110738389A (en) * 2019-09-03 2020-01-31 深圳壹账通智能科技有限公司 Workflow processing method and device, computer equipment and storage medium
CN110717739A (en) * 2019-10-15 2020-01-21 深圳前海微众银行股份有限公司 Workflow issuing method, device, equipment and computer readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022083512A1 (en) * 2020-10-23 2022-04-28 深圳前海微众银行股份有限公司 Information sharing method, apparatus and server, and storage medium
CN112818064A (en) * 2021-02-25 2021-05-18 平安普惠企业管理有限公司 Multi-system data synchronization method, device, equipment and storage medium
CN113360220A (en) * 2021-06-23 2021-09-07 平安普惠企业管理有限公司 Workflow realization method, system, equipment and medium based on global context class
CN113553200A (en) * 2021-07-26 2021-10-26 江苏数兑科技有限公司 Information transmission method and system of cross-application system

Also Published As

Publication number Publication date
WO2022083512A1 (en) 2022-04-28

Similar Documents

Publication Publication Date Title
US10698625B2 (en) Data pipeline architecture for analytics processing stack
CN112367363A (en) Information sharing method, device, server and storage medium
US10776170B2 (en) Software service execution apparatus, system, and method
US20180357111A1 (en) Data center operation
US10776107B2 (en) Microservice-based data processing apparatus, method, and program
CN111190753B (en) Distributed task processing method and device, storage medium and computer equipment
US9684689B2 (en) Distributed parallel processing system having jobs processed by nodes based on authentication using unique identification of data
US11848980B2 (en) Distributed pipeline configuration in a distributed computing system
CN111258565A (en) Method, system, server and storage medium for generating small program
US20200210829A1 (en) Network off-line model processing method, artificial intelligence processing device and related products
CN112905323B (en) Data processing method, device, electronic equipment and storage medium
US20180239617A1 (en) Big data pipeline management within spreadsheet applications
WO2021208844A1 (en) Virtualized container management method and system, and storage medium
US10585678B2 (en) Insertion of custom activities in an orchestrated application suite
WO2020147601A1 (en) Graph learning system
US20200310828A1 (en) Method, function manager and arrangement for handling function calls
WO2024108995A1 (en) Data exchange method and apparatus, and computer device and storage medium
US9323509B2 (en) Method and system for automated process distribution
CN110928941A (en) Data fragment extraction method and device
CN110750362A (en) Method and apparatus for analyzing biological information, and storage medium
CN113495723B (en) Method, device and storage medium for calling functional component
US11614981B2 (en) Handling of metadata for microservices processing
CN111160403B (en) API (application program interface) multiplexing discovery method and device
CN111290868B (en) Task processing method, device and system and flow engine
Sudarsan et al. Building a distributed K‐Means model for Weka using remote method invocation (RMI) feature of Java

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210212

RJ01 Rejection of invention patent application after publication