CN114675982A - General method and system for acquiring data of service integration system - Google Patents

General method and system for acquiring data of service integration system Download PDF

Info

Publication number
CN114675982A
CN114675982A CN202011567695.3A CN202011567695A CN114675982A CN 114675982 A CN114675982 A CN 114675982A CN 202011567695 A CN202011567695 A CN 202011567695A CN 114675982 A CN114675982 A CN 114675982A
Authority
CN
China
Prior art keywords
data
entity
target
event
subsystem
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
CN202011567695.3A
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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN202011567695.3A priority Critical patent/CN114675982A/en
Publication of CN114675982A publication Critical patent/CN114675982A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications

Abstract

The invention discloses a general method and a general device for acquiring data of a service integration system, which relate to the technical field of data processing, realize data interaction among subsystems, are not limited by service scenes, do not need to consume a large amount of reconstruction cost for the subsystems, and are convenient for effectively controlling the quality of data interaction by utilizing the data integration system, and the main technical scheme of the invention is as follows: when a trigger specified event is generated on a subsystem, acquiring event data corresponding to the trigger specified event, wherein the event data at least comprises an event identifier; searching a preset callback function matched with the event identifier according to the event identifier, wherein the preset callback function comprises callback target entity data and a target address; according to the recalled target entity data, acquiring content information corresponding to entity attributes contained in the target entity data from one or more subsystems; and sending the content information to a subsystem corresponding to the target address. The invention is mainly applied to realizing data interaction between subsystems in the service integration system.

Description

General method and system for acquiring data of service integration system
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a general method and a system for data acquisition in a service integration system.
Background
Many modern large information systems are formed by integrating multiple subsystems, which are often heterogeneous and require a large amount of data interaction between them.
At present, a customized scheme is designed and code implementation is performed for different integrated service scenarios, and generally, data interaction of a plurality of subsystems needs to be researched to clear up a service flow, then a specific API is agreed and written in each subsystem, and a logic chain according to which data is called is written in advance according to different service flows, so that data exchange can be successfully realized through mutual calling.
However, for a logic chain according to which a specific API is agreed and written in each subsystem in advance and data is written in advance according to different business processes and called, the subsystems are usually required to be modified in advance and a great modification cost is consumed, and even though data interaction between different subsystems is successfully realized, the conventional method is lack of overall management of the whole data interaction operation, so that the quality of the data interaction operation is difficult to control.
Disclosure of Invention
In view of this, the present invention provides a general method and system for data acquisition of a service integration system, and the main objective of the present invention is to use a preset callback function to integrate related data from one or more subsystems and send the integrated data to another subsystem when a subsystem triggers a specific event, so as to implement data interaction between subsystems, and is not limited by service scenarios, and does not require a large amount of modification cost for the subsystems, and the data integration system is also convenient to effectively control the quality of data interaction.
In order to achieve the above purpose, the present invention mainly provides the following technical solutions:
a first aspect of the present application provides a general method for acquiring data of a service integration system, where the method includes:
when a trigger specified event is generated on a subsystem, acquiring event data corresponding to the trigger specified event, wherein the event data at least comprises an event identifier;
searching a preset callback function matched with the event identifier according to the event identifier, wherein the preset callback function comprises callback target entity data and a target address, entity attributes contained in the target entity data are selected from entity data registered in advance by different subsystems, the entity data registered in advance by each subsystem is used for describing entity attributes of data information stored in the subsystem, and the target address refers to an address of the subsystem which is reached by transmitting the data information by using the preset callback function;
according to the target entity data of the call-back, acquiring content information corresponding to entity attributes contained in the target entity data from one or more subsystems;
and sending the content information to a subsystem corresponding to the target address.
In some variations of the first aspect of the present application, the method further comprises:
acquiring entity data corresponding to each subsystem, wherein the entity data comprise entity attributes marked as primary keys, other entity attributes and interface addresses, and the interface addresses are used for acquiring content information corresponding to the entity attributes contained in the entity data from the corresponding subsystems;
if different entity data contain the same entity attribute, establishing an association relation existing between the entity data according to the same entity attribute;
and performing registration operation on the entity data and the association relation existing between the entity data.
In some modified embodiments of the first aspect of the present application, before the searching for the preset callback function matching the event identifier according to the event identifier, the method further includes:
setting an event identifier;
one or more preset callback functions are configured in advance according to the event identifier;
and establishing a preset mapping relation between the event identifier and the preset callback function.
In some modified embodiments of the first aspect of the present application, the pre-configuring one or more callback functions according to the event identifier includes:
pushing an event identifier and registered entity data to a user by using an interactive interface, wherein the registered entity data comprises entity attributes;
receiving entity attributes selected by a user from the registered entity data under different event identifiers, and establishing a mapping relation between the event identifiers and the selected entity attributes;
filling the selected entity attributes into a preset callback function template and filling a preset target address in the preset callback function template to configure and complete a preset callback function;
and according to the mapping relation between the event identifier and the selected entity attribute, establishing association between the event identifier and the preset callback function to obtain the preset callback function corresponding to the event identifier.
In some modified embodiments of the first aspect of the present application, the searching for the preset callback function matching the event identifier according to the event identifier includes:
when a trigger specified event is generated on a subsystem, taking an event identifier obtained from event data corresponding to the trigger specified event as a target event identifier;
and determining a preset callback function corresponding to the target event identifier by searching a preset mapping relation between the event identifier and the preset callback function.
In some modified embodiments of the first aspect of the present application, the obtaining, from one or more subsystems and according to the target entity data of the callback, content information corresponding to entity attributes included in the target entity data includes:
acquiring entity attributes contained in target entity data;
determining target registered entity data to which the entity attribute belongs by searching entity data registered in advance by different subsystems;
determining a target subsystem corresponding to the entity data registered by the target;
acquiring an interface address from the entity data registered by the target;
and acquiring content information corresponding to the entity attribute from the target subsystem according to the interface address.
A second aspect of the present application provides a data acquisition generic system of a service integration system, including:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring event data corresponding to a trigger specified event when the trigger specified event is generated on a subsystem, and the event data at least comprises an event identifier;
the searching unit is used for searching a preset callback function matched with the event identifier according to the event identifier acquired by the acquiring unit, wherein the preset callback function comprises callback target entity data and a target address, the entity attribute contained in the target entity data is selected from entity data registered in advance in different subsystems, the entity data registered in advance in each subsystem is used for describing the entity attribute of data information stored in the subsystem, and the target address refers to the address of the subsystem which transmits the data information to the subsystem by using the preset callback function;
the obtaining unit is further configured to obtain, from one or more subsystems, content information corresponding to entity attributes included in target entity data according to the recalled target entity data;
and the sending unit is used for sending the content information acquired by the acquiring unit to the subsystem corresponding to the target address.
In some variations of the second aspect of the present application, the system further comprises:
the acquiring unit is further configured to acquire entity data corresponding to each subsystem, where the entity data includes an entity attribute identified as a primary key, other entity attributes, and an interface address, and the interface address is used to acquire content information corresponding to the entity attribute included in the entity data from the corresponding subsystem;
the establishing unit is used for establishing an association relation existing between the entity data according to the same entity attribute if the entity data acquired by different acquiring units contain the same entity attribute;
and the registration unit is used for executing registration operation on the association relationship existing between the entity data acquired by the acquisition unit and the entity data established by the establishment unit.
In some variations of the second aspect of the present application, the system comprises:
a setting unit for setting an event identifier;
the configuration unit is used for configuring one or more preset callback functions in advance according to the event identifier;
the establishing unit is further configured to establish a preset mapping relationship between the event identifier and the preset callback function.
In some modified embodiments of the second aspect of the present application, the configuration unit includes:
the pushing module is used for pushing the event identification and the registered entity data to a user by using an interactive interface, wherein the registered entity data comprise entity attributes;
the establishing module is used for establishing a mapping relation between the event identifier and the selected entity attribute by receiving the entity attribute selected by the user from the registered entity data under different event identifiers;
the configuration module is used for filling the selected entity attributes into a preset callback function template and filling a preset target address in the preset callback function template to configure and finish the preset callback function;
and the association module is used for establishing association between the event identifier and the preset callback function according to the mapping relation between the event identifier and the selected entity attribute to obtain the preset callback function corresponding to the event identifier.
In some variations of the second aspect of the present application, the lookup unit comprises:
the system comprises a determining module, a judging module and a judging module, wherein the determining module is used for taking an event identifier acquired from event data corresponding to a trigger specified event as a target event identifier when the trigger specified event is generated on a subsystem;
the obtaining module is further configured to obtain a preset callback function corresponding to the target event identifier by searching for a preset mapping relationship between the event identifier and the preset callback function.
In some modified embodiments of the second aspect of the present application, the acquiring unit includes:
the acquisition module is used for acquiring entity attributes contained in the target entity data;
the determining module is used for determining the registered entity data of the target to which the entity attribute belongs by searching the entity data registered in advance by different subsystems;
the determining module is further configured to determine a target subsystem corresponding to the target registered entity data;
the acquisition module is further configured to acquire an interface address from the target registered entity data;
the obtaining module is further configured to obtain content information corresponding to the entity attribute from the target subsystem according to the interface address.
A third aspect of the present application provides a storage medium, where the storage medium includes a stored program, and when the program runs, a device in which the storage medium is located is controlled to execute the above-mentioned general data acquisition method for a service integration system.
A fourth aspect of the present application provides an electronic device comprising at least one processor, and at least one memory, a bus, connected to the processor;
the processor and the memory are communicated with each other through the bus;
the processor is configured to invoke program instructions in the memory to perform the data acquisition generic method of the service integration system as described above.
By the technical scheme, the technical scheme provided by the invention at least has the following advantages:
the invention provides a general method and a general system for acquiring data of a service integration system, wherein the general method and the general system are characterized in that a data integration system is set up in advance, when a subsystem triggers a specified event in the service integration system, an event identifier corresponding to the specified event is obtained, and then a corresponding preset callback function is triggered and called, so that content information corresponding to entity attributes contained in target entity data is acquired from one or more subsystems according to the callback target entity data contained in the callback function, and the content information is sent to the subsystem corresponding to the destination address pointed by the callback function. Compared with the prior art, the data interaction method has the advantages that the technical problems that a large amount of subsystem transformation cost is required to be consumed and the data interaction quality is inconvenient to control in a service integration system for achieving subsystem data interaction are solved, the data integration system can integrate relevant data from one or more subsystems and send the data to another subsystem by using the preset callback function, and accordingly data interaction between the subsystems is achieved and is not limited by service scenes.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart of a general method for acquiring data of a service integration system according to an embodiment of the present invention;
fig. 2 is a flowchart of a data acquisition generic method of another service integration system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating data interaction between a data integration system and a subsystem according to an exemplary embodiment of the present invention;
fig. 4 is a block diagram illustrating a data acquisition general system of a service integration system according to an embodiment of the present invention;
fig. 5 is a block diagram illustrating a data acquisition general system of another service integration system according to an embodiment of the present invention;
fig. 6 is a general electronic device for data acquisition of a service integration system according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The embodiment of the invention provides a general data acquisition method of a service integration system, as shown in fig. 1, the execution main body of the method is a pre-established data integration system, when a subsystem triggers a specified event, the data integration system can integrate relevant data from one or more subsystems by using a preset callback function and send the data to another subsystem, and the embodiment of the invention provides the following specific steps:
in the embodiment of the present invention, a data integration system is pre-established, data communication is established between the data integration system and a subsystem in a service integration system, and a general data acquisition method of the service integration system implemented by using the data integration system is explained in detail with reference to step 101-104.
101. When a trigger specified event is generated on a subsystem, event data corresponding to the trigger specified event is acquired, and the event data at least comprises an event identifier.
In the embodiment of the present invention, according to different requirements of specific service scenarios, the number of subsystems required in the service integration system and the functions of each subsystem are also different, for example: the service integration system for an e-commerce service scene can comprise a customer management subsystem, an online store management subsystem and the like.
The specified event refers to that the occurrence of the event causes data exchange between different subsystems, and as described above, when a user ordering operation event is triggered, the customer management subsystem records customer information corresponding to the user ordering operation event, and the online shop management subsystem should maintain buyer information (i.e., customer information) according to the user ordering operation event, the data exchange between the two systems needs to specify the data exchange of the customer information (i.e., the buyer information), but in the embodiment of the present invention, the data exchange between the subsystems is not directly performed but is implemented by using a pre-built data integration system.
In the embodiment of the present invention, an event trigger may be used to trigger a specific event on a subsystem, and the pre-built data integration system may acquire event data of the specific event and further acquire an event identifier from the event data, as described above, the event identifier of the user ordering operation event is acquired as "order ordering".
102. And searching a preset callback function matched with the event identifier according to the event identifier.
The preset callback function may be a user-defined http callback function, such as a web hook (webhook), which is generally triggered by some events, and when an event is triggered, the system sends an http request according to a url configured by a user and a user-defined parameter, so that corresponding related data can be sent to another system when a specified event occurs in the current system.
The preset callback function comprises callback target entity data and a target address, wherein the target address refers to an address of a subsystem which is reached by using the preset callback function to transfer data information.
The entity attribute contained in the target entity data in the preset callback function is selected from entity data registered in advance by different subsystems, and the target entity data is the user-defined content needing callback.
In the embodiment of the present invention, each subsystem needs to perform an operation of registering entity data on the data integration system in advance, where the entity data is used to describe entity attributes of data information stored in the subsystem.
For example, for the customer management subsystem, its entity data is "customer information" which may contain a plurality of entity attributes, such as "name", "phone", "address", etc., and for the online shop management subsystem, its entity data is "online shopping information" which may contain a plurality of entity attributes, such as "buyer phone", "buyer address", "ordered item", "time to order", etc. The entity data corresponding to each subsystem may be a relational database table, and different entity data (i.e. the relational database table) are associated according to the same entity attribute, such as: the "telephone" and "address" included in the entity data corresponding to the customer management subsystem are the same as the "buyer telephone" and "buyer address" included in the entity data corresponding to the online shop management subsystem.
It should be noted that, the operation of registering entity data on the data integration system is performed in advance, which is convenient for querying what the entity attributes of different subsystems are on the data integration system side, but the entity attribute specifically refers to content information (attribute information), which does not need to be registered (i.e., stored) on the data integration system, but rather, in the subsequent specific operation process performed by using the preset callback function, content information corresponding to the entity attribute is obtained in the designated subsystem. The data integration system obtained by the design does not need to store a large amount of data information, but only registers entity data, and even if the subsystem side has data information updating, the data updating at the subsystem side has no influence on the data integration system as long as the entity attribute is not changed, namely, the entity attribute contained in the entity data registered at the data integration system side is consistent with the subsystem.
It is further explained that, in the embodiment of the present invention, the entity attribute included in the target entity data of the callback may be selected from entity data pre-registered by different subsystems, that is, the entity attribute included in the target entity data of the callback may originate from the same subsystem or different subsystems according to different specific service requirements that are met by the trigger specification event.
In the embodiment of the present invention, a preset mapping relationship between an event identifier and preset callback functions may be preset, that is, one event identifier may correspond to one or more preset callback functions, and according to different requirements of a service, content information corresponding to an entity attribute is acquired from one subsystem or multiple subsystems and is sent to a designated subsystem by using the preset callback function.
103. And according to the recalled target entity data, acquiring content information corresponding to entity attributes contained in the target entity data from one or more subsystems.
In the embodiment of the present invention, since each subsystem registers entity data on the data integration system, and not the entity data includes content information (attribute information) corresponding to an entity attribute, the target entity data that is callback-controlled according to the callback function includes an entity attribute originating from one subsystem or multiple subsystems, and accordingly, the data integration system also operates to acquire the content information corresponding to the entity attribute included in the target entity data from one or multiple subsystems.
104. And sending the content information to a subsystem corresponding to the target address.
In the embodiment of the present invention, after the data integration system acquires the content information in step 103, the content information is sent to the corresponding subsystem according to the target address in the preset callback function, so that one data integration system can integrate the related data from one or more subsystems and send the data to another subsystem by using the preset callback function.
The embodiment of the invention provides a data acquisition universal method of a service integration system, which is characterized in that a data integration system is set up in advance, when a subsystem triggers a specified event in the service integration system, an event identifier corresponding to the specified event is obtained, and then a corresponding preset callback function is triggered and called, so that content information corresponding to entity attributes contained in target entity data is acquired from one or more subsystems according to the target entity data of the callback contained in the callback function, and the content information is sent to the subsystem corresponding to the destination address pointed by the callback function. Compared with the prior art, the embodiment of the invention solves the technical problems that a great deal of subsystem transformation cost is required to be consumed and the data interaction quality is inconvenient to control in a service integration system for realizing the subsystem data interaction.
In order to explain the above embodiments in more detail, the embodiment of the present invention further provides another general method for acquiring data of a service integration system, and as shown in fig. 2, the embodiment of the present invention provides the following specific steps:
201. and acquiring entity data corresponding to each subsystem, wherein the entity data comprises an entity attribute identified as a primary key, other entity attributes and an interface address, and the interface address is used for acquiring content information corresponding to the entity attribute contained in the entity data from the corresponding subsystem.
For entity data corresponding to a subsystem, an entity corresponding to the subsystem needs to be determined first, for example, an entity corresponding to a customer management subsystem is a customer, and entity data is customer information, and then entity attributes contained in the entity data need to be determined. Specifically, the specific method for determining the entity attribute may be: determining entity attributes contained in entity data corresponding to one subsystem according to attributes corresponding to original attribute fields by adopting original attribute fields of data in the subsystems; and (3) preprocessing (correlation operation) is carried out on the content information corresponding to the original attribute field of the data in the subsystem, and the corresponding attribute field is added according to the preprocessing result to be used as an entity attribute contained in the entity data corresponding to one subsystem.
For example, "name" and "phone" are all the original attribute fields of the data in the subsystem, "purchase category corresponds to the order quantity" is: and obtaining a data result through retrieving a plurality of ordering records and carrying out data preprocessing, and newly defining an attribute field for the data result. Specifically, according to the service requirement, the entity attribute contained in the entity data can be maintained in a customized manner.
Explaining the interface address contained in the entity data, since the entity data is registered on the data integration system, but the entity data does not contain the content information (i.e. attribute information) corresponding to the entity attribute, in order to obtain the corresponding content information after the entity data is determined, the interface address corresponding to the obtained entity data can be also registered during the registration operation, and specifically, the interface address can be registered by using the rest api of the http protocol.
In the embodiment of the present invention, each subsystem needs to perform the operation of registering entity data on the data integration system in advance, and for the specific operation process of acquiring entity data corresponding to one subsystem, the operation can be completed on the subsystem side, or completed by performing a data preprocessing operation by a third party.
202. And if the different entity data contain the same entity attribute, establishing the association relation existing between the entity data according to the same entity attribute.
It should be noted that the entity data corresponding to each subsystem may be a relational database table, and then the entity data including the entity attribute (entity primary key) identified as the primary key may be defined, and the association relationship existing between the entity data corresponding to different subsystems may be established according to the entity primary key and the different entity data including the same entity attribute.
203. And performing registration operation on the entity data and the association relation existing between the entity data.
For the embodiment of the invention, entity data registration operation is executed on the data integration system side, and the registration content comprises the following steps: entity data corresponding to the subsystem, association existing in different entity data and interface addresses required for acquiring the entity data.
204. When a trigger specified event is generated on a subsystem, event data corresponding to the trigger specified event is acquired, and the event data at least comprises an event identifier.
In the embodiment of the present invention, please refer to step 101 for the explanation of this step, which is not described herein again.
205. And searching a preset callback function matched with the event identifier according to the event identifier.
The preset callback function comprises callback target entity data and a target address, entity attributes contained in the target entity data are selected from entity data registered in advance by different subsystems, the entity data registered in advance by each subsystem are used for describing entity attributes of data information stored in the subsystem, and the target address refers to an address of the subsystem to which the data information is transferred by the preset callback function. For a detailed explanation, please refer to step 102, which is not described herein.
It should be noted that before the service integration system executes a specific service operation, that is, after the data integration system completes entity data registration, some data configuration work needs to be performed on the data integration system, since specific requirements for triggering callback operations by different events are different according to service requirements, in order to meet different callback operation requirements, multiple callback functions may be preset on the data integration system side and stored in a list, and a preset mapping relationship between different events and preset callback functions is configured, where the specific operations may include the following:
firstly, setting an event identifier, and configuring one or more preset callback functions in advance according to the event identifier. Specifically, the event identifier and the registered entity data may be pushed to the user by using an interactive interface, where the registered entity data includes entity attributes, for example, a user interface UI component provided by a framework is used, so that the user can arbitrarily select the entity attributes included in the registered entity data, the selection operation is a human-computer interactive operation, and the data integration system receives user feedback to obtain the entity attributes selected under the event identifier, thereby establishing the preset mapping relationship between the event identifier and the entity attributes.
Secondly, filling a preset callback function template by using the selected entity attributes, wherein the preset callback function template is a user-defined http callback function, such as a web hook (webhook), the webhook is usually triggered by some events, and when the events are triggered, the system sends an http request according to url configured by the user and self-defined parameters, so that corresponding related data can be sent to another system when the current system generates a specified event.
Furthermore, according to the service requirement, a preset target address is filled into the preset callback function template, and then the subsystem to which the callback content points is pointed.
In the above, the selected entity attribute is filled into the preset callback function template and the preset target address is filled in the preset callback function template, so that the preset callback function is configured.
Finally, according to the mapping relation existing between the event identifier and the selected entity attribute, the association between the event identifier and the preset callback function which is configured can be established, and the preset callback function corresponding to the event configuration is completed.
In the embodiment of the invention, according to the specific implementation method for configuring the callback function, a plurality of callback functions can be configured for one event identifier so as to meet different service requirements.
In the embodiment of the present invention, when a trigger-specified event is generated on a subsystem, an event identifier obtained from event data corresponding to the trigger-specified event is used as a target event identifier.
And determining a preset callback function corresponding to the target event identifier by searching a preset mapping relation between the event identifier and the callback function.
206. And according to the recalled target entity data, acquiring content information corresponding to entity attributes contained in the target entity data from one or more subsystems.
In the embodiment of the present invention, the detailed statement for this step may include the following:
firstly, the entity attribute contained in the target entity data is obtained, and according to the step of configuring the callback function, since the entity attribute filled in the callback function can be from one or more subsystems, the content information (attribute information) corresponding to the entity attribute can be searched from the corresponding subsystem according to the interface address corresponding to the entity data registered on the data integration system and further by using the interface address.
207. And sending the content information to a subsystem corresponding to the target address.
In the embodiment of the present invention, after the data integration system acquires the content information in step 206, the content information is sent to the corresponding subsystem according to the target address in the preset callback function, so that one data integration system can integrate the related data from one or more subsystems and send the data to another subsystem by using the preset callback function.
In the embodiment of the present invention, a data integration system as shown in fig. 3 is used to design and implement a common criteria and framework for data exchange, so that the data integration system can be adapted to most business scenarios. The scheme is irrelevant to specific service scenes and data types, and most service integration systems which realize the http protocol can carry out data interaction among different subsystems in a webhook mode by simple configuration.
It should be further noted that the data integration system provided by the embodiment of the present invention does not need to concern about a specific service, and can be applied to any scenario, and once a stable version is released, the data integration system does not need to be modified. By adopting a loose coupling integration scheme based on entity attribute mapping and registering the incidence relation between entity data and entity data, different subsystems can complete data communication under the condition of not changing the current data structure. The callback mechanism based on event triggering and http accords with the technical architecture of most of the current systems, and in most cases, the integrated development work can be completed without introducing additional technical frameworks and components. In addition, a plurality of new subsystems can be accessed according to different requirements of services, so that new entities can be dynamically expanded without changing the structure of the existing system.
Further, as an implementation of the method shown in fig. 1 and fig. 2, an embodiment of the present invention provides a data acquisition general system of a service integration system. The system embodiment corresponds to the method embodiment, and details in the method embodiment are not described in detail again in this system embodiment for easy reading, but it should be clear that the system in this embodiment can correspondingly implement all the contents in the method embodiment. The system is applied to implement data interaction between subsystems in a service integration system, and specifically, as shown in fig. 4, the apparatus includes:
an obtaining unit 31, configured to obtain event data corresponding to a specified trigger event when the specified trigger event is generated on a subsystem, where the event data at least includes an event identifier;
a searching unit 32, configured to search, according to the event identifier acquired by the acquiring unit 31, a preset callback function matched with the event identifier, where the preset callback function includes callback target entity data and a target address, an entity attribute included in the target entity data is selected from entity data pre-registered by different subsystems, the entity data pre-registered by each subsystem is an entity attribute used for describing data information stored in the subsystem, and the target address is an address of a subsystem to which data information is transferred by using the preset callback function;
the obtaining unit 31 is further configured to obtain, according to the target entity data of the callback, content information corresponding to entity attributes included in the target entity data from one or more subsystems;
a sending unit 33, configured to send the content information acquired by the acquiring unit 31 to a subsystem corresponding to the target address.
Further, as shown in fig. 5, the system further includes:
the obtaining unit 31 is further configured to obtain entity data corresponding to each subsystem, where the entity data includes an entity attribute identified as a primary key, other entity attributes, and an interface address, and the interface address is used to obtain content information corresponding to the entity attribute included in the entity data from the corresponding subsystem;
an establishing unit 34, configured to establish an association relationship existing between the entity data according to the same entity attribute if the entity data acquired by the different acquiring units 31 include the same entity attribute;
a registering unit 35, configured to perform a registering operation on an association relationship existing between the entity data acquired by the acquiring unit 31 and the entity data established by the establishing unit 34.
Further, as shown in fig. 5, the system includes:
a setting unit 36 for setting an event identification;
a configuration unit 37, configured to pre-configure one or more preset callback functions according to the event identifier;
the establishing unit 34 is further configured to establish a preset mapping relationship between the event identifier and the preset callback function.
Further, as shown in fig. 5, the configuration unit 37 includes:
a pushing module 371, configured to push the event identifier and the registered entity data to the user by using an interactive interface, where the registered entity data includes an entity attribute;
an establishing module 372, configured to establish, under different event identifiers, a mapping relationship between the event identifier and the selected entity attribute by receiving an entity attribute selected by a user from the registered entity data;
the configuration module 373 is configured to complete the configuration of the preset callback function by filling the selected entity attribute into a preset callback function template and filling a preset target address in the preset callback function template;
and the association module 374, configured to associate the event identifier with the preset callback function according to a mapping relationship existing between the event identifier and the selected entity attribute, so as to obtain the preset callback function corresponding to the event identifier.
Further, as shown in fig. 5, the search unit 32 includes:
a determining module 321, configured to, when a specified trigger event is generated on a subsystem, use an event identifier obtained from event data corresponding to the specified trigger event as a target event identifier;
the obtaining module 322 is further configured to obtain a preset callback function corresponding to the target event identifier by searching for a preset mapping relationship between the event identifier and the preset callback function.
Further, as shown in fig. 5, the acquiring unit 31 includes:
an obtaining module 311, configured to obtain an entity attribute included in the target entity data;
a determining module 312, configured to determine target registered entity data to which the entity attribute belongs by searching entity data pre-registered by different subsystems;
the determining module 312 is further configured to determine a target subsystem corresponding to the target registered entity data;
the obtaining module 311 is further configured to obtain an interface address from the target registered entity data;
the obtaining module 311 is further configured to obtain content information corresponding to the entity attribute from the target subsystem according to the interface address.
In summary, embodiments of the present invention provide a data acquisition general method and system for a service integration system, where a data integration system is pre-established, and when a subsystem triggers a specific event in the service integration system, an event identifier corresponding to the specific event is obtained, and then a corresponding preset callback function is triggered and called, so as to obtain content information corresponding to an entity attribute included in target entity data from one or more subsystems according to target entity data of a callback included in the callback function, and send the content information to a subsystem corresponding to a target address and corresponding to a callback function. Compared with the prior art, the embodiment of the invention solves the technical problems that a great deal of subsystem transformation cost is required to be consumed and the data interaction quality is inconvenient to control in a service integration system for realizing the subsystem data interaction.
The data acquisition general system of the service integration system comprises a processor and a memory, wherein the acquisition unit, the search unit, the sending unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and relevant data from one or more subsystems can be integrated and sent to another subsystem by using a preset callback function through adjusting kernel parameters by using a data integration system when one subsystem triggers a specified event, so that data interaction among the subsystems is realized, the data interaction is not limited by a service scene, the subsystems do not need to consume a large amount of reconstruction cost, and the data integration system is convenient to effectively control the data interaction quality.
An embodiment of the present invention provides a storage medium, on which a program is stored, and the program implements a general method for data acquisition of the service integration system when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the program executes the inspection hall civil supervision method based on the text positioning technology during running.
An embodiment of the present invention provides an electronic device 40, as shown in fig. 6, the device includes at least one processor 401, at least one memory 402 connected to the processor 401, and a bus 403; the processor 401 and the memory 402 complete communication with each other through the bus 403; the processor 401 is configured to call program instructions in the memory 402 to perform the data acquisition generic method of the service integration system described above.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
a general method for data acquisition of a service integration system, the method comprising: when a trigger specified event is generated on a subsystem, acquiring event data corresponding to the trigger specified event, wherein the event data at least comprises an event identifier; searching a preset callback function matched with the event identifier according to the event identifier, wherein the preset callback function comprises callback target entity data and a target address, entity attributes contained in the target entity data are selected from entity data registered in advance by different subsystems, the entity data registered in advance by each subsystem is used for describing entity attributes of data information stored in the subsystem, and the target address refers to an address of the subsystem which is reached by transmitting the data information by using the preset callback function; according to the target entity data of the call-back, acquiring content information corresponding to entity attributes contained in the target entity data from one or more subsystems; and sending the content information to a subsystem corresponding to the target address.
Further, the method further comprises: acquiring entity data corresponding to each subsystem, wherein the entity data comprise entity attributes marked as primary keys, other entity attributes and interface addresses, and the interface addresses are used for acquiring content information corresponding to the entity attributes contained in the entity data from the corresponding subsystems; if different entity data contain the same entity attribute, establishing an association relation existing between the entity data according to the same entity attribute; and performing registration operation on the entity data and the association relation existing between the entity data.
Further, before the searching for the preset callback function matched with the event identifier according to the event identifier, the method further includes: setting an event identifier; one or more preset callback functions are configured in advance according to the event identifier; and establishing a preset mapping relation between the event identifier and the preset callback function.
Further, the pre-configuring one or more preset callback functions according to the event identifier includes: pushing an event identifier and registered entity data to a user by using an interactive interface, wherein the registered entity data comprises entity attributes; establishing a mapping relation between the event identifier and the selected entity attribute by receiving the entity attribute selected by the user from the registered entity data under different event identifiers; filling the selected entity attributes into a preset callback function template and filling a preset target address in the preset callback function template to configure and complete a preset callback function; and according to the mapping relation between the event identifier and the selected entity attribute, establishing association between the event identifier and the preset callback function to obtain the preset callback function corresponding to the event identifier.
Further, the searching for the preset callback function matched with the event identifier according to the event identifier includes: when a trigger specified event is generated on a subsystem, taking an event identifier obtained from event data corresponding to the trigger specified event as a target event identifier; and determining a preset callback function corresponding to the target event identifier by searching a preset mapping relation between the event identifier and the preset callback function.
Further, the obtaining, from one or more subsystems, content information corresponding to entity attributes included in the target entity data according to the target entity data of the callback includes: acquiring entity attributes contained in target entity data; determining target registered entity data to which the entity attribute belongs by searching entity data registered in advance by different subsystems; determining a target subsystem corresponding to the entity data registered by the target; acquiring an interface address from the entity data registered by the target; and acquiring content information corresponding to the entity attribute from the target subsystem according to the interface address.
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.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
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 an entirely hardware embodiment, an entirely 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, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A general method for data acquisition of a service integration system is characterized by comprising the following steps:
when a trigger specified event is generated on a subsystem, acquiring event data corresponding to the trigger specified event, wherein the event data at least comprises an event identifier;
searching a preset callback function matched with the event identifier according to the event identifier, wherein the preset callback function comprises callback target entity data and a target address, entity attributes contained in the target entity data are selected from entity data registered in advance by different subsystems, the entity data registered in advance by each subsystem is used for describing entity attributes of data information stored in the subsystem, and the target address refers to an address of the subsystem which is reached by transmitting the data information by using the preset callback function;
according to the target entity data of the call-back, acquiring content information corresponding to entity attributes contained in the target entity data from one or more subsystems;
and sending the content information to a subsystem corresponding to the target address.
2. The method of claim 1, further comprising:
acquiring entity data corresponding to each subsystem, wherein the entity data comprise entity attributes marked as primary keys, other entity attributes and interface addresses, and the interface addresses are used for acquiring content information corresponding to the entity attributes contained in the entity data from the corresponding subsystems;
if different entity data contain the same entity attribute, establishing an association relation existing between the entity data according to the same entity attribute;
and performing registration operation on the entity data and the association relationship existing between the entity data.
3. The method of claim 2, wherein before said finding a preset callback function matching said event identifier according to said event identifier, said method further comprises:
setting an event identifier;
one or more preset callback functions are configured in advance according to the event identifier;
and establishing a preset mapping relation between the event identifier and the preset callback function.
4. The method of claim 3, wherein pre-configuring one or more preset callback functions according to the event identifier comprises:
pushing an event identifier and registered entity data to a user by using an interactive interface, wherein the registered entity data comprises entity attributes;
establishing a mapping relation between the event identifier and the selected entity attribute by receiving the entity attribute selected by the user from the registered entity data under different event identifiers;
filling the selected entity attributes into a preset callback function template and filling a preset target address in the preset callback function template to configure and complete a preset callback function;
and according to the mapping relation between the event identifier and the selected entity attribute, establishing association between the event identifier and the preset callback function to obtain the preset callback function corresponding to the event identifier.
5. The method of claim 3, wherein said finding a preset callback function matching said event identifier according to said event identifier comprises:
when a trigger specified event is generated on a subsystem, taking an event identifier obtained from event data corresponding to the trigger specified event as a target event identifier;
and determining a preset callback function corresponding to the target event identifier by searching a preset mapping relation between the event identifier and the preset callback function.
6. The method according to claim 2, wherein the obtaining content information corresponding to entity attributes included in the target entity data from one or more subsystems according to the target entity data of the callback comprises:
acquiring entity attributes contained in target entity data;
determining target registered entity data to which the entity attribute belongs by searching entity data registered in advance by different subsystems;
determining a target subsystem corresponding to the entity data registered by the target;
acquiring an interface address from the entity data registered by the target;
and acquiring content information corresponding to the entity attribute from the target subsystem according to the interface address.
7. A data acquisition generic system for a service integration system, the system comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring event data corresponding to a trigger specified event when the trigger specified event is generated on a subsystem, and the event data at least comprises an event identifier;
the searching unit is used for searching a preset callback function matched with the event identifier according to the event identifier acquired by the acquiring unit, wherein the preset callback function comprises callback target entity data and a target address, the entity attribute contained in the target entity data is selected from entity data registered in advance in different subsystems, the entity data registered in advance in each subsystem is used for describing the entity attribute of data information stored in the subsystem, and the target address refers to the address of the subsystem which transmits the data information to by using the preset callback function;
the obtaining unit is further configured to obtain, from one or more subsystems, content information corresponding to entity attributes included in target entity data according to the recalled target entity data;
and the sending unit is used for sending the content information acquired by the acquiring unit to the subsystem corresponding to the target address.
8. The system of claim 7, further comprising:
the acquiring unit is further configured to acquire entity data corresponding to each subsystem, where the entity data includes an entity attribute identified as a primary key, other entity attributes, and an interface address, and the interface address is used to acquire content information corresponding to the entity attribute included in the entity data from the corresponding subsystem;
the establishing unit is used for establishing an association relation existing between the entity data according to the same entity attribute if the entity data acquired by different acquiring units contain the same entity attribute;
and the registration unit is used for executing registration operation on the association relationship existing between the entity data acquired by the acquisition unit and the entity data established by the establishment unit.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the device on which the storage medium is located is controlled to execute the data acquisition generic method of the service integration system according to any one of claims 1-6 when the program runs.
10. An electronic device, comprising at least one processor, and at least one memory, bus connected to the processor;
the processor and the memory complete mutual communication through the bus;
the processor is configured to invoke program instructions in the memory to perform the data acquisition generic method of the service integration system of any of claims 1-6.
CN202011567695.3A 2020-12-25 2020-12-25 General method and system for acquiring data of service integration system Pending CN114675982A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011567695.3A CN114675982A (en) 2020-12-25 2020-12-25 General method and system for acquiring data of service integration system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011567695.3A CN114675982A (en) 2020-12-25 2020-12-25 General method and system for acquiring data of service integration system

Publications (1)

Publication Number Publication Date
CN114675982A true CN114675982A (en) 2022-06-28

Family

ID=82069697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011567695.3A Pending CN114675982A (en) 2020-12-25 2020-12-25 General method and system for acquiring data of service integration system

Country Status (1)

Country Link
CN (1) CN114675982A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115168354A (en) * 2022-07-11 2022-10-11 广州市玄武无线科技股份有限公司 Integrated processing method and device for mobile terminal event stream
CN115904763A (en) * 2023-01-31 2023-04-04 北京微吼时代科技有限公司 Event driving method and system applied to live system and live system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115168354A (en) * 2022-07-11 2022-10-11 广州市玄武无线科技股份有限公司 Integrated processing method and device for mobile terminal event stream
CN115168354B (en) * 2022-07-11 2023-06-30 广州市玄武无线科技股份有限公司 Integrated processing method and device for event stream of mobile terminal
CN115904763A (en) * 2023-01-31 2023-04-04 北京微吼时代科技有限公司 Event driving method and system applied to live system and live system

Similar Documents

Publication Publication Date Title
CN108667925B (en) Method and system for seamless access of WEB application to distributed system
CN108600326B (en) Communication method, device and equipment
US20120017222A1 (en) Interface For Telecommunication Services Using Uniform Resource Identifiers
EP3975474B1 (en) Methods and apparatuses for chaining service data
WO2018113601A1 (en) Service processing method and apparatus
EP3493057A1 (en) Method and apparatus for awakening application by means of mobile browser
CN113364853B (en) Business service system, business request method and gateway equipment
WO2018184535A1 (en) Insurance service processing method and device, server, and storage medium
CN114675982A (en) General method and system for acquiring data of service integration system
CN101727475A (en) Method, device and system for acquiring database access process
CN109814863A (en) A kind of processing method, device, computer equipment and computer storage medium for requesting returned data
CN111786984A (en) Pod communication connection method and device, electronic equipment and storage medium
CN111258565A (en) Method, system, server and storage medium for generating small program
CN113495797A (en) Message queue and consumer dynamic creation method and system
CN109729121B (en) Cloud storage system and method for realizing custom data processing in cloud storage system
CN111459991B (en) Information query method and device
CN112491943A (en) Data request method, device, storage medium and electronic equipment
CN113297305A (en) Session state processing method, device, equipment and storage medium
CN111045928A (en) Interface data testing method, device, terminal and storage medium
CN106656940B (en) Method and apparatus for processing service access requests
US20140201721A1 (en) Framework and repository for analysis of software products
CN111652580B (en) Method and device for processing data of nodes
US10114864B1 (en) List element query support and processing
CN112783842B (en) Log collection method and device
CN109254855B (en) Registration method and device of parameter transmission protocol and electronic equipment

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