External device docking method, device, computer equipment and readable storage medium

Through customized templates, the key data in the external device request message is extracted, the access path is built and the plug-in collection is called, which solves the problem of time-consuming docking between enterprise gateways and suppliers, and realizes an efficient docking process and improves efficiency.

CN113190287BActive Publication Date: 2024-12-24PINGAN YIQIANBAO E COMMERCE CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202110481293.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-30
Publication Date
2024-12-24
Estimated Expiration
2041-04-30

AI Technical Summary

Technical Problem

In the prior art, the docking between enterprise gateways and suppliers requires static URL conversion or manual code writing, which consumes a lot of time and energy, affecting the rhythm and efficiency of fast iteration.

Method used

By receiving request messages from external devices, using preset customized templates to extract key data, building access paths, and obtaining pre-cache plug-in collections based on access paths, calling plug-in collections to generate feedback information, and sending them to external devices, avoiding static URL conversion and manual coding.

Benefits of technology

This greatly reduces the time and energy spent on connecting enterprise gateways with suppliers, and improves the iteration rhythm and efficiency of docking services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113190287B_ABST
    Figure CN113190287B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of cloud transmission technology for cloud services, and discloses an external device docking method, apparatus, computer equipment and readable storage medium, including: receiving a request message sent by an external device; extracting key data from the request message through a preset customized template, and constructing an access path according to the key data; obtaining a plug-in set according to the access path, calling the plug-in set to calculate the key data to generate feedback information; and sending the feedback information to the external device. The present invention also relates to blockchain technology, and information can be stored in a blockchain node. The present invention does not require conversion to a business system through a static URL for development, or manual code writing, which greatly reduces the time and effort spent on the docking business between the enterprise gateway and the supplier, and by configuring the fields in the customized template and the plug-ins in the plug-in set, the iteration rhythm and efficiency of the docking business are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud storage technology for cloud services, and in particular to an external device docking method, device, computer equipment and readable storage medium. Background Art

[0002] The existing services in the industry regarding the connection between enterprise gateways and suppliers are used to enable external devices (i.e., suppliers' devices) to call components of internal systems. Usually, due to the different formats and rules of request messages of various external devices and the different plug-ins that need to be called by external devices, the control end of the internal system needs to convert static URLs into business systems for development, or rely on manual coding to achieve the connection between the enterprise gateway and suppliers. This not only consumes a lot of time and energy, but also affects the rapid iteration rhythm and efficiency. Summary of the invention

[0003] The purpose of the present invention is to provide an external device docking method, device, computer equipment and readable storage medium, which are used to solve the problems existing in the prior art of converting static URLs to business systems for development or manually writing codes to achieve the docking of enterprise gateways and suppliers, which consumes a lot of time and energy and affects the rapid iteration rhythm and efficiency.

[0004] To achieve the above object, the present invention provides an external device docking method, comprising:

[0005] Receive request messages sent by external devices;

[0006] Extract key data from the request message through a preset customized template, and construct an access path according to the key data;

[0007] Acquire a plug-in set according to the access path, and call the plug-in set to operate the key data to generate feedback information, wherein the plug-in set has a pre-cached plug-in that operates according to the key data to generate feedback information;

[0008] The feedback information is sent to the external device.

[0009] In the above solution, before receiving the request message sent by the external device, the method further includes:

[0010] Receiving demand information sent by an external device, and acquiring a component corresponding to the demand information; wherein the component is a software unit for completing a specified task formed by encapsulating data and methods;

[0011] Reading configuration information of the component, and performing pluggable configuration on the component according to the configuration information to obtain a plug-in;

[0012] The plug-ins are aggregated to obtain a plug-in set.

[0013] In the above solution, the step of configuring the component to be pluggable according to the configuration information to obtain a plug-in includes:

[0014] Building a definition registry according to the configuration information;

[0015] Instantiate the component according to the definition registry to obtain a component implementation class;

[0016] The component implementation class is recorded into a preset cache module to obtain a plug-in of the component.

[0017] In the above solution, after aggregating the plug-ins to obtain a plug-in set, the method further includes:

[0018] Receiving update information sent by an external device, and extracting the requirement code and the custom code in the update information;

[0019] Acquire a component corresponding to the requirement code and set it as a target component, configure the custom code in the target component to modify the target component and obtain a modified component; wherein the custom code defines a data interface, a data source, a data filter, and a data polling frequency of the component;

[0020] The modified component is configured in a pluggable manner to obtain a modified plug-in, and the modified plug-in is loaded into the plug-in collection to replace the plug-in corresponding to the target component, so as to generate a new plug-in collection.

[0021] In the above solution, the step of extracting key data from the request message by using a preset customized template and constructing an access path according to the key data includes:

[0022] Extracting fields from the customized template, and loading the fields into a preset regular expression to obtain an extraction expression;

[0023] Extract key data from the request message according to the extraction expression;

[0024] The address information is extracted from the key data, and the address information is integrated and arranged according to a preset path specification to construct an access path.

[0025] In the above solution, before acquiring the plug-in set according to the access path, the method further includes:

[0026] Extracting the request signature information from the key data, and determining whether the request signature information is consistent with the preset standard signature information; if not, feeding back rejection information to the external device;

[0027] After sending the feedback information to the external device, the method further includes:

[0028] The feedback information is uploaded to the blockchain.

[0029] In the above solution, the step of acquiring a plug-in set according to the access path and calling the plug-in set to calculate the key data and generate feedback information includes:

[0030] Extracting a third-party identifier in the access path, and acquiring a plug-in set corresponding to the third-party identifier from the cache module;

[0031] Extracting a service ID from the access path, obtaining a plug-in corresponding to the service ID from the plug-in set and setting it as a target plug-in;

[0032] The service request message in the key data is extracted, and the target plug-in is called to run the service request message to generate feedback information.

[0033] To achieve the above object, the present invention further provides an external device docking device, comprising:

[0034] An input module, used for receiving a request message sent by an external device;

[0035] An extraction and construction module, used to extract key data from the request message through a preset customized template, and construct an access path according to the key data;

[0036] A plug-in calling module, used for acquiring a plug-in set according to the access path, and calling the plug-in set to operate the key data to generate feedback information, wherein the plug-in set has a pre-cached plug-in that operates according to the key data to generate feedback information;

[0037] An output module is used to send the feedback information to the external device.

[0038] To achieve the above objectives, the present invention also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor of the computer device implements the steps of the above external device docking method when executing the computer program.

[0039] To achieve the above objectives, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program stored in the computer-readable storage medium is executed by a processor, the steps of the above external device docking method are implemented.

[0040] The external device docking method, device, computer equipment and readable storage medium provided by the present invention can identify the key data of the format and rules of different request messages of each external device through a customized template, and call the plug-in that needs to be called by each external device according to the key data through a plug-in collection with pre-cached plug-ins. Therefore, there is no need to convert to the business system for development through a static URL, or write code manually, so that the external device can call the components of the internal system, thereby realizing the docking of the enterprise gateway and the supplier, which greatly reduces the time and energy consumed by the enterprise gateway and the supplier docking business, and by configuring the fields in the customized template and the plug-in in the plug-in collection, the iteration rhythm and efficiency of the docking business are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 This is a flow chart of Embodiment 1 of the external device docking method of the present invention;

[0042] Figure 2 Schematic diagram of the environment application of the external device docking method in Embodiment 2 of the external device docking method of the present invention;

[0043] Figure 3 is a specific method flow chart of the external device docking method in Embodiment 2 of the external device docking method of the present invention;

[0044] Figure 4 This is a schematic diagram of a program module of a third embodiment of an external device docking device of the present invention;

[0045] Figure 5 Schematic diagram of the hardware structure of the computer device in the fourth embodiment of the computer device of the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0047] The external device docking method, device, computer device and readable storage medium provided by the present invention are applicable to the cloud transmission technology field of cloud services, and provide an external device docking method based on an input module, an extraction and construction module, a plug-in calling module and an output module. The present invention receives a request message sent by an external device, extracts key data from the request message through a preset customized template, constructs an access path according to the key data, obtains a plug-in set according to the access path, calls the plug-in set to calculate the key data to generate feedback information, and sends the feedback information to the external device.

[0048] Embodiment 1:

[0049] See also Figure 1 , a method for connecting an external device to the device according to this embodiment includes:

[0050] S105: Receive a request message sent by an external device.

[0051] S107: extracting key data from the request message through a preset customized template, and constructing an access path according to the key data.

[0052] S109: Acquire a plug-in set according to the access path, and call the plug-in set to operate the key data to generate feedback information, wherein the plug-in set has pre-cached plug-ins that operate according to the key data to generate feedback information.

[0053] S110: Send the feedback information to the external device.

[0054] In an exemplary embodiment, the parameters required for component operation, i.e., the key data, are obtained from the request message through a customized template, and an access path is constructed based on the key data, i.e., the location of the plug-in that the request message needs to call. This not only avoids the problem of the component being unable to run the message due to external devices using different message formats and specifications sending request messages, but also because the customized template normalizes the received request messages, i.e., extracts the key data therein and constructs an access path in the same format based on the key data. The method is simple and reliable, which greatly improves development efficiency and reduces development intensity.

[0055] A plug-in collection is obtained according to the access path, wherein the plug-in collection has a plug-in component set according to the requirements of the external device and used to generate feedback information according to the key data operation, that is, a plug-in, and the plug-in collection is pre-stored in a preset cache module; the plug-in corresponding to the service ID (serviceId) in the key data in the plug-in collection is identified and set as a target component, and the target component is called to run the request service message in the key data to obtain feedback information, so as to ensure that each external device can call the required component and obtain the corresponding feedback information; at the same time, this step runs the key data by calling the plug-in pre-cached in the plug-in collection, so that the request message does not need to call the code running at the bottom layer of the internal system, or call the component running in the middle layer / control layer of the internal system, but only needs to call the pre-cached plug-in to obtain feedback information, thereby improving the speed and efficiency of external devices calling plug-ins.

[0056] In summary, the control end of the internal system only needs to use customized templates to identify the key data of the format and rules of different request messages of each external device, and can call the plug-in that needs to be called by each external device according to the key data by pre-caching the plug-in collection. Therefore, there is no need to convert the static URL to the business system for development, or write code manually, so that the external device can call the components of the internal system, thereby realizing the docking of the enterprise gateway and the supplier, which greatly reduces the time and energy spent on the docking business between the enterprise gateway and the supplier, and by configuring the fields in the customized template and the plug-in in the plug-in collection, the iteration rhythm and efficiency of the docking business are improved.

[0057] By extracting the third-party identifier (cropId) of the key data, the feedback information is sent to an external device corresponding to the third-party identifier (cropId), so as to ensure that the feedback information can be accurately sent to the corresponding external device.

[0058] Embodiment 2:

[0059] This embodiment is a specific application scenario of the above-mentioned embodiment 1. Through this embodiment, the method provided by the present invention can be explained more clearly and specifically.

[0060] In the following, the method provided in this embodiment is specifically described by taking, in a server running an external device docking method, extracting key data from a request message and constructing an access path, then calling a plug-in set corresponding to the access path, and calling the plug-in set to calculate key data and generate feedback information as an example. It should be noted that this embodiment is only exemplary and does not limit the scope of protection of the embodiments of the present invention.

[0061] Figure 2The following is a schematic diagram showing an environmental application of the external device docking method according to the second embodiment of the present application.

[0062] In an exemplary embodiment, the gateway server 2 in which the external device docking method is located is connected to the internal system 3, the external device 4 and the control end 31 of the internal system 3 through a network; the gateway 2 can provide services through one or more networks 3, and the network 3 can include various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices and / or the like. The network 3 can include physical links, such as coaxial cable links, twisted pair cable links, optical fiber links, combinations thereof and / or the like. The network 3 can include wireless links, such as cellular links, satellite links, Wi-Fi links and / or the like; the external device 4 can be a computer device such as a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.

[0063] Figure 3 It is a specific method flow chart of an external device docking method provided by an embodiment of the present invention, and the method specifically includes steps S201 to S210.

[0064] S201: Receive demand information sent by an external device, and obtain a component corresponding to the demand information; wherein the component is a software unit for completing a specified task formed by encapsulating data and methods.

[0065] S202: Reading configuration information of the component, and performing pluggable configuration on the component according to the configuration information to obtain a plug-in;

[0066] S203: Aggregate the plug-ins to obtain a plug-in set.

[0067] In order to avoid compiling a large amount of customized code based on the components in the internal system to make them meet the needs of external devices, resulting in high development intensity and low efficiency, this step obtains components from a preset framework and configures the components in a pluggable manner to obtain plug-ins, thereby decoupling the plug-ins and enabling the plug-ins to be arbitrarily combined according to the needs of external devices. Therefore, only a simple plug-in configuration operation is required to generate a plug-in collection with cached plug-ins, which greatly improves the configuration and use efficiency of components, thereby improving development efficiency and reducing development intensity.

[0068] At the same time, in order to configure the required components in a targeted manner according to the needs of the external device, this step identifies the plug-ins corresponding to the needs and forms a plug-in collection. At this time, the plug-ins in the plug-in collection are all components used to meet the business needs of the external device; the plug-in collection is stored in the cache module to facilitate the external device to call the plug-ins in the combined collection, avoiding calling components from the database / middle layer of the framework, resulting in low calling efficiency.

[0069] In a preferred embodiment, the step S201 of receiving demand information sent by an external device and acquiring a component corresponding to the demand information includes:

[0070] S11: receiving demand information sent by an external device, and extracting a demand number from the demand information.

[0071] S12: Acquire a component corresponding to the requirement number from a preset internal system.

[0072] Exemplarily, the requirement number m in the received requirement information is extracted, and the component bean-m corresponding to the requirement number m is extracted from the internal system.

[0073] The internal system includes but is not limited to the following components: a fuse component, a current limiting component, an anti-brushing component, a risk control component, a decryption component, a signature verification component, a front-end assembly component, an RPC call component, an encryption component, a signature addition component, and a post-assembly component.

[0074] In a preferred embodiment, step S202 reads the configuration information of the component, and performs pluggable configuration on the component according to the configuration information to obtain a plug-in, including:

[0075] S21: Construct a definition registry according to the configuration information.

[0076] S22: Instantiate the component according to the definition registry to obtain a component implementation class.

[0077] S23: entering the component implementation class into a preset cache module to obtain a plug-in of the component.

[0078] Exemplarily, the configuration information bean-m.xml of bean-m is read, the spring container (spring Ioc) is called to build a bean-m definition registry according to bean-m.xml, the spring container is called to instantiate bean-m according to the bean-m definition registry to obtain the bean-m implementation class, and the bean-m implementation class is stored in the cache pool of the spring container (that is, the cache module) to obtain the plug-in bean-m of the component bean-m.

[0079] It should be noted that the spring container, namely spring Ioc (Inverse Of Control), is used to manage objects in the spring framework. The underlying layer can be understood as a map collection module. The spring framework is an open source full-stack application framework and inversion of control container implementation for the Java platform, generally referred to as Spring.

[0080] In a preferred embodiment, step S203 aggregates the plug-ins to obtain a plug-in set; the steps include:

[0081] S31: extracting a third-party identifier in the demand information, wherein the third-party identifier is a unique identifier of the external device.

[0082] S32: Aggregate the plug-ins in the cache module to form a plug-in set, and associate the third-party identifier with the plug-in set.

[0083] Exemplarily, extract the third-party identifier a1 in the demand information, aggregate the plug-ins bean-m, bean-n, and bean-l in the cache pool to obtain the plug-in set bean-mnl, and load the third-party identifier a1 into the name of the plug-in set to obtain the plug-in set bean-mnl-a1.

[0084] Therefore, the control end of the internal system obtains components through demand information, configures the components in a pluggable manner to obtain plug-ins, and aggregates the plug-ins to obtain plug-in collections, thereby achieving the technical effect of quickly configuring the plug-ins required for external devices. By aggregating the plug-in collection in the cache module and associating it with the third-party identifier of the external device, the technical effect of quickly configuring and refreshing the plug-ins required for the external device is achieved.

[0085] In one embodiment, after aggregating the plug-ins to obtain a plug-in set, the method further includes:

[0086] S204: Modify the plug-in in the plug-in set according to the update information sent by the external device.

[0087] To ensure that the plug-ins in the plug-in collection can meet the specific needs of external devices, this step identifies the plug-in corresponding to the update information in the plug-in collection as the component to be modified, and modifies the component to be modified according to the update information to obtain the modified plug-in, and then loads the modified plug-in into the plug-in collection to dynamically refresh the plug-in collection, thereby meeting the specific needs of external devices and expanding the scope of application of the plug-in.

[0088] In a preferred embodiment, the step of modifying the plug-in in the plug-in set according to the update information sent by the external device and loading the modified plug-in into the plug-in set includes:

[0089] S41: receiving update information sent by an external device, and extracting a requirement code and a custom code from the update information;

[0090] S42: Acquire a component corresponding to the requirement code and set it as a target component, configure the custom code in the target component to modify the target component and obtain a modified component; wherein the custom code defines the component's data interface, data source, data filter, and data polling frequency.

[0091] S43: performing pluggable configuration on the modified component to obtain a modified plug-in, and loading the modified plug-in into the plug-in set to replace the plug-in corresponding to the target component, so as to generate a new plug-in set.

[0092] Exemplarily, update information sent by an external device is received, and the requirement code m and custom code A in the update information are extracted; the component bean-m corresponding to the requirement code m is obtained, the custom code A is configured in the component bean-m to obtain the component bean-m1, the spring container is called to read the configuration information bean-m1.xml of bean-m1, and the bean-m1 definition registry is constructed according to bean-m1.xml, and the bean-m1 is instantiated according to the bean-m definition registry to obtain the bean-m1 implementation class, the bean-m1 implementation class is stored in the cache pool of the spring container (that is, the cache module) to obtain the plug-in bean-m1 of the component bean-m1, and the plug-in bean-m in the cache pool is deleted to generate a new plug-in collection, thereby realizing the technical effect of dynamically refreshing the plug-in collection, thereby realizing the hot update of the plug-in collection.

[0093] It should be noted that the custom code defines the data interface, data source, data filter and data polling frequency of the component.

[0094] The data interface shows the data fields, corresponding mappings, and data response status of the component. Field: Displays the default fields of the component. Mapping: When the fields in the configured data source are inconsistent with the default field names of the component, you can enter the fields in your data source in the mapping input box and map these fields to the corresponding fields of the component. Real-time data matching can be achieved without modifying the fields in the data source. Status: The data response status of the component can be displayed in real time, and a successful match is displayed when the response is successful.

[0095] Controlled mode, including: turn on the switch, no data is requested in the component initialization state, and data is requested only through the callback ID or the method configured by the blueprint editor; turn off the switch, and data can be requested using automatic update. The switch is turned off by default.

[0096] Automatic update request, that is, if the automatic update request is selected, you can set dynamic polling and manually enter the polling time frequency. If cleared, it will not be updated automatically. You need to refresh the page manually, or trigger the request to update data through the blueprint editor and callback ID event.

[0097] Data source, that is, the component uses a static data source by default. Click Configure Data Source to modify the data source type and script on the Data Source Settings page. For details, see Setting Component Data Source.

[0098] Data filters provide data structure conversion, filtering, and some simple calculation functions. Click Add Filter to configure the data filter script on the Data Source Settings page. For details, see the Component Data Filter Usage Instructions section.

[0099] The data response result is a real-time display of the data used by the component. When the component data source changes, the data response result will display the latest data accordingly. If the system response is delayed, you can click the refresh data icon on the right to get the latest data of the component.

[0100] S205: Receive a request message sent by an external device.

[0101] In this step, the request message can be an http request message or an https request message.

[0102] It should be noted that the communication connection between the server running the external device docking method and the external device is constructed based on the TCP / IP protocol network model, wherein the TCP / IP protocol provides a point-to-point link mechanism, which standardizes how data should be packaged, addressed, transmitted, routed, and how it should be received at the destination.

[0103] S206: Create a customized template that records fields corresponding to the input parameters of the plug-in, wherein the fields are used to extract key data in the request message.

[0104] In order to obtain the key data in the request message and eliminate the problem that the request message cannot be run due to different formats, this step creates a field that records the key data in the request message, wherein the field is the metadata of the input parameter of the plug-in. Therefore, only the customized template is needed to identify the key data in the request message for calling the plug-in. Therefore, it is able to adapt to various types of request messages and improve the adaptability to external devices.

[0105] In a preferred embodiment, the step of creating a customized template having fields corresponding to the input parameters of the plug-in includes:

[0106] S61: Acquire an empty template.

[0107] In this step, the empty template is an XML document.

[0108] S62: Acquire the fields sent by the control end, and load the fields into the empty template to obtain the customized template.

[0109] Exemplarily, the fields corresponding to the input parameters include: reqTime (request time), reqNum (request serial number), bizContent (request business message), bizSign (request signature), corpId (third-party identifier), and serviceId (service ID).

[0110] S207: extracting key data from the request message through a preset customized template, and constructing an access path according to the key data.

[0111] In order to avoid the problem that the component cannot run the message due to different external devices using different message formats and specifications, a large amount of customized code is usually written for the component to enable the component to run messages of different formats, which greatly increases the development intensity and reduces the development efficiency. This step obtains the parameters required for the component to run from the request message through a customized template, that is, the key data, and builds an access path based on the key data, that is, the location of the plug-in that the request message needs to call; not only does it avoid the problem that the component cannot run the message due to external devices using different message formats and specifications sending request messages, but also because the customized template normalizes the received request message, that is: extracts the key data therein and builds an access path of the same format based on the key data. The method is simple and reliable, greatly improves the development efficiency and reduces the development intensity.

[0112] In a preferred embodiment, the step of extracting key data from the request message by using a preset customized template and constructing an access path according to the key data includes:

[0113] S71: extracting fields from the customized template, and loading the fields into a preset regular expression to obtain an extraction expression;

[0114] S72: extracting key data from the request message according to the extraction expression;

[0115] S73: extracting address information from the key data, and integrating and arranging the address information according to a preset path specification to construct an access path.

[0116] Exemplarily, based on the above example, the information corresponding to reqTime (request time), reqNum (request serial number), bizContent (request business message), bizSign (request signature), corpId (third-party identifier), and serviceId (service ID) is obtained, that is, the key data; the address information in the key data, namely: the information corresponding to corpId (third-party identifier) ​​and serviceId (service ID), is extracted, and then the access path URL is obtained through the preset path specification: / {corpId} / {serviceId} / request. Therefore, the plug-in set required by the external device can be quickly and accurately obtained through the URL.

[0117] S208: Extracting the request signature information in the key data, and determining whether the request signature information is consistent with the preset standard signature information;

[0118] If yes, execute S209;

[0119] If not, a rejection message is fed back to the external device and the process ends.

[0120] In this step, the standard signature information is unique information registered by the external device in the internal system and used to verify the authenticity of the external device, such as password, digital signature, fingerprint information, etc. By comparing the request signature information with the standard signature information, if the comparison is inconsistent, it is determined that the external device has no right to call the plug-in in the plug-in collection, that is, the request of the external device is directly rejected, thereby ensuring the security of the plug-in collection.

[0121] In the said Figure 3 In the example, the S208 is shown by the following annotations:

[0122] S81: extracting the request signature information in the key data, and determining whether the request signature information is consistent with the preset standard signature information;

[0123] S82: If yes, execute S209;

[0124] S83: If not, feedback rejection information to the external device and end.

[0125] S209: Acquire a plug-in set according to the access path, and call the plug-in set to operate the key data to generate feedback information, wherein the plug-in set has pre-cached plug-ins that operate according to the key data to generate feedback information.

[0126] In this step, the plug-in set has a plug-in component set according to the requirements of the external device, which is used to generate feedback information according to the key data operation, that is, a plug-in. The plug-in set is pre-stored in a preset cache module. To ensure that each external device can call the required components and obtain corresponding feedback information, this step obtains the plug-in set according to the access path, obtains the plug-in set from the cache module according to the access path, identifies the plug-in in the plug-in set corresponding to the service ID (serviceId) in the key data and sets it as the target component, and calls the target component to run the request service message in the key data to obtain feedback information.

[0127] At the same time, this step runs the key data by calling the plug-in pre-cached in the plug-in collection, so that the request message does not need to call the code running at the bottom layer of the internal system, or call the components running in the middle layer / control layer of the internal system, but only needs to call the pre-cached plug-in to obtain feedback information, thereby improving the speed and efficiency of external devices calling plug-ins.

[0128] In a preferred embodiment, the step of acquiring a plug-in set according to the access path and calling the plug-in set to calculate the key data and generate feedback information includes:

[0129] S91: extracting a third-party identifier (cropId) in the access path, and acquiring a plug-in set corresponding to the third-party identifier (cropId) from the cache module.

[0130] S92: extracting the service ID (serviceId) in the access path, acquiring a plug-in corresponding to the service ID (serviceId) from the plug-in set and setting it as a target plug-in.

[0131] S93: extracting the service request message from the key data, and calling the target plug-in to run the service request message to generate feedback information.

[0132] Exemplarily, based on the above example, the plug-in collection bean-mnl is obtained according to the third-party identifier in the access path, and the plug-in bean-m, that is, the target plug-in, is obtained from the plug-in collection according to the service ID: m in the access path, and the plug-in bean-m is called to run the request business message in the key data, that is, the information corresponding to bizContent, to obtain feedback information.

[0133] S210: Send the feedback information to the external device.

[0134] To ensure that the feedback information can be accurately sent to the corresponding external device, this step extracts the third-party identifier (cropId) of the key data and sends the feedback information to the external device corresponding to the third-party identifier (cropId).

[0135] Preferably, after sending the feedback information to the external device, the method further includes:

[0136] The feedback information is uploaded to the blockchain.

[0137] It should be noted that the corresponding summary information is obtained based on the feedback information. Specifically, the summary information is obtained by hashing the feedback information, such as using the sha256s algorithm. Uploading the summary information to the blockchain can ensure its security and fairness and transparency to users. The user device can download the summary information from the blockchain to verify whether the feedback information has been tampered with. The blockchain referred to in this example is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer.

[0138] Embodiment three:

[0139] See also Figure 4 , an external device docking device 1 of this embodiment includes:

[0140] An input module 15, used for receiving a request message sent by an external device;

[0141] An extraction and construction module 17, configured to extract key data from the request message through a preset customized template, and construct an access path according to the key data;

[0142] A plug-in calling module 19 is used to obtain a plug-in set according to the access path, and call the plug-in set to operate the key data to generate feedback information, wherein the plug-in set has a pre-cached plug-in that operates according to the key data to generate feedback information;

[0143] The output module 10 is used to send the feedback information to the external device.

[0144] Optionally, the external device docking device 1 further includes:

[0145] The demand input module 11 is used to receive demand information sent by an external device and obtain components corresponding to the demand information;

[0146] A pluggable configuration module 12, used to read the configuration information of the component, and perform pluggable configuration on the component according to the configuration information to obtain a plug-in;

[0147] The plug-in aggregation module 13 is used to aggregate the plug-ins to obtain a plug-in set; wherein the component is a software unit for completing a specified task formed by encapsulating data and methods.

[0148] Optionally, the external device docking device 1 further includes:

[0149] The set modification module 14 is used to modify the plug-in in the plug-in set according to the update information sent by the external device.

[0150] Optionally, the set modification module 14 further includes:

[0151] The information extraction unit 141 is used to receive the update information sent by the external device and extract the requirement code and the custom code in the update information;

[0152] A target modification unit 142, configured to obtain a component corresponding to the requirement code and set it as a target component, and configure the custom code in the target component to modify the target component and obtain a modified component;

[0153] The plug-in replacement unit 143 is used to perform pluggable configuration on the modified component to obtain a modified plug-in, and load the modified plug-in into the plug-in collection to replace the plug-in corresponding to the target component.

[0154] Optionally, the external device docking device 1 further includes:

[0155] The template creation module 16 is used to create a customized template that records fields corresponding to the input parameters of the plug-in, wherein the fields are used to extract key data in the request message.

[0156] Optionally, the template creation module 16 further includes:

[0157] The template acquisition unit 161 is used to acquire an empty template;

[0158] The template generating unit 162 is used to obtain the fields sent by the control end, and load the fields into the empty template to obtain the customized template.

[0159] Optionally, the extraction construction module 17 further includes:

[0160] An expression building unit 171, used for extracting fields in the customized template and loading the fields into a preset regular expression to obtain an extraction expression;

[0161] An information extraction unit 172, configured to extract key data from the request message according to the extraction expression;

[0162] The path construction unit 173 is used to extract address information from the key data, and integrate and arrange the address information according to a preset path specification to construct an access path.

[0163] Optionally, the external device docking device 1 further includes:

[0164] The signature judgment module 18 is used to extract the request signature information in the key data and judge whether the request signature information is consistent with the preset standard signature information; if so, the plug-in calling module 17 is called; if not, the rejection information is fed back to the external device and the process ends.

[0165] Optionally, the plug-in calling module 19 further includes:

[0166] The set identification unit 191 is used to extract the third-party identifier in the access path and obtain the plug-in set corresponding to the third-party identifier from the cache module.

[0167] The plug-in identification unit 192 is used to extract the service ID in the access path, obtain the plug-in corresponding to the service ID from the plug-in set and set it as the target plug-in.

[0168] The message operation unit 193 is used to extract the request service message from the key data, and call the target plug-in to run the request service message to generate feedback information.

[0169] The present technical solution involves cloud transmission technology for cloud services, and runs in a gateway server. It extracts key data from the request message through a customized template, builds an access path based on the key data, obtains a plug-in set based on the access path, calls the plug-in set to calculate the key data to generate feedback information, and sends the feedback information to the external device, thereby making the gateway server a cloud storage gateway.

[0170] Embodiment 4:

[0171] To achieve the above-mentioned purpose, the present invention further provides a computer device 5. The components of the external device docking device of the third embodiment can be dispersed in different computer devices. The computer device 5 can be a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including independent server, or server cluster composed of multiple application servers) that executes the program. The computer device of this embodiment includes at least but is not limited to: a memory 51 and a processor 52 that can be connected to each other through a system bus, such as Figure 5 It should be pointed out that Figure 5 Only a computer device with components is shown, but it should be understood that implementing all of the components shown is not a requirement and more or fewer components may alternatively be implemented.

[0172] In this embodiment, the memory 51 (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 51 may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory 51 may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. equipped on the computer device. Of course, the memory 51 may also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory 51 is generally used to store the operating system and various application software installed on the computer device, such as the program code of the external device docking device of the third embodiment. In addition, the memory 51 may also be used to temporarily store various data that have been output or are to be output.

[0173] The processor 52 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 52 is generally used to control the overall operation of the computer device. In this embodiment, the processor 52 is used to run the program code stored in the memory 51 or process data, such as running the external device docking device to implement the external device docking method of the first embodiment and the second embodiment.

[0174] Embodiment five:

[0175] To achieve the above purpose, the present invention also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, and the program implements the corresponding function when executed by the processor 52. The computer-readable storage medium of this embodiment is used to store a computer program for implementing the external device docking method, and when executed by the processor 52, the external device docking method of Embodiment 1 and Embodiment 2 is implemented.

[0176] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0177] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.

[0178] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for connecting an external device, characterized in that: include: Receiving demand information sent by an external device, and acquiring a component corresponding to the demand information; wherein the component is a software unit for completing a specified task formed by encapsulating data and methods; Read the configuration information of the component, and perform pluggable configuration on the component according to the configuration information to obtain a plug-in; wherein, performing pluggable configuration on the component according to the configuration information to obtain a plug-in includes: constructing a definition registry according to the configuration information; wherein, reading the configuration information bean-m.xml of bean-m, calling the spring container to construct the bean-m definition registry according to bean-m.xml; instantiating the component according to the definition registry to obtain a component implementation class; wherein, calling the spring container to instantiate bean-m according to the bean-m definition registry to obtain the bean-m implementation class; entering the component implementation class into a preset cache module to obtain the plug-in of the component; wherein, storing the bean-m implementation class in the cache pool of the spring container to obtain the plug-in bean-m of the component bean-m; Aggregating the plug-ins to obtain a plug-in set; Receive request messages sent by external devices; Extract key data from the request message through a preset customized template, and construct an access path according to the key data; Acquire a plug-in set according to the access path, and call the plug-in set to operate the key data to generate feedback information, wherein the plug-in set has a pre-cached plug-in that operates according to the key data to generate feedback information; The feedback information is sent to the external device.

2. The external device docking method according to claim 1, characterized in that: After aggregating the plug-ins to obtain a plug-in set, the method further includes: Receiving update information sent by an external device, and extracting the requirement code and the custom code in the update information; Acquire a component corresponding to the requirement code and set it as a target component, configure the custom code in the target component to modify the target component and obtain a modified component; wherein the custom code defines a data interface, a data source, a data filter, and a data polling frequency of the component; The modified component is configured in a pluggable manner to obtain a modified plug-in, and the modified plug-in is loaded into the plug-in collection to replace the plug-in corresponding to the target component, so as to generate a new plug-in collection.

3. The external device docking method according to claim 1, characterized in that: The step of extracting key data from the request message by using a preset customized template and constructing an access path according to the key data includes: Extracting fields from the customized template, and loading the fields into a preset regular expression to obtain an extraction expression; Extract key data from the request message according to the extraction expression; The address information is extracted from the key data, and the address information is integrated and arranged according to a preset path specification to construct an access path.

4. The external device docking method according to claim 1, characterized in that: Before acquiring the plug-in set according to the access path, the method further includes: Extracting the request signature information from the key data, and determining whether the request signature information is consistent with the preset standard signature information; if not, feeding back rejection information to the external device; After sending the feedback information to the external device, the method further includes: The feedback information is uploaded to the blockchain.

5. The external device docking method according to claim 1, characterized in that: The step of acquiring a plug-in set according to the access path and calling the plug-in set to calculate the key data and generate feedback information includes: Extracting a third-party identifier in the access path, and acquiring a plug-in set corresponding to the third-party identifier from the cache module; Extracting a service ID from the access path, obtaining a plug-in corresponding to the service ID from the plug-in set and setting it as a target plug-in; The service request message in the key data is extracted, and the target plug-in is called to run the service request message to generate feedback information.

6. An external device docking device, characterized in that: include: A demand input module, used to receive demand information sent by an external device and obtain components corresponding to the demand information; A pluggable configuration module, used for reading the configuration information of the component, and performing pluggable configuration on the component according to the configuration information to obtain a plug-in; wherein, performing pluggable configuration on the component according to the configuration information to obtain a plug-in comprises: constructing a definition registry according to the configuration information; wherein, reading the configuration information bean-m.xml of bean-m, calling the spring container to construct the bean-m definition registry according to bean-m.xml; instantiating the component according to the definition registry to obtain a component implementation class; wherein, calling the spring container to instantiate bean-m according to the bean-m definition registry to obtain the bean-m implementation class; entering the component implementation class into a preset cache module to obtain the plug-in of the component; wherein, storing the bean-m implementation class into the cache pool of the spring container to obtain the plug-in bean-m of the component bean-m; A plug-in aggregation module, used to aggregate the plug-ins to obtain a plug-in set; wherein the component is a software unit for completing a specified task formed by encapsulating data and methods; An input module, used for receiving a request message sent by an external device; An extraction and construction module, used to extract key data from the request message through a preset customized template, and construct an access path according to the key data; A plug-in calling module, used for acquiring a plug-in set according to the access path, and calling the plug-in set to operate the key data to generate feedback information, wherein the plug-in set has a pre-cached plug-in that operates according to the key data to generate feedback information; An output module is used to send the feedback information to the external device.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor of the computer device executes the computer program, the steps of the external device docking method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program stored in the readable storage medium implements the steps of the external device docking method according to any one of claims 1 to 5 when executed by a processor.

Citation Information

Patent Citations

  • Method and equipment for tracing packet

    CN101272329A

  • Running method and system of Hybrid components

    CN104461491A

  • Service configuration method and device, computer equipment and storage medium

    CN110377292A

  • Development method and system based on NodeJs and storage medium

    CN111708523A

  • Configured service request method and device, electronic equipment and storage medium

    CN111934940A