CN113190287A - External device docking method and device, computer device and readable storage medium - Google Patents

External device docking method and device, computer device and readable storage medium Download PDF

Info

Publication number
CN113190287A
CN113190287A CN202110481293.XA CN202110481293A CN113190287A CN 113190287 A CN113190287 A CN 113190287A CN 202110481293 A CN202110481293 A CN 202110481293A CN 113190287 A CN113190287 A CN 113190287A
Authority
CN
China
Prior art keywords
plug
key data
component
information
external device
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
CN202110481293.XA
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.)
Ping An E Wallet Electronic Commerce Co Ltd
Original Assignee
Ping An E Wallet Electronic Commerce 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 Ping An E Wallet Electronic Commerce Co Ltd filed Critical Ping An E Wallet Electronic Commerce Co Ltd
Priority to CN202110481293.XA priority Critical patent/CN113190287A/en
Publication of CN113190287A publication Critical patent/CN113190287A/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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • 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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of cloud transmission of cloud services, and discloses a method and a device for docking external equipment, computer equipment and a readable storage medium, wherein the method comprises the following steps: receiving a request message sent by external equipment; extracting key data from the request message through a preset customized template, and constructing an access path according to the key data; acquiring a plug-in set according to the access path, and calling the plug-in set to calculate the key data to generate feedback information; and sending the feedback information to the external equipment. The invention also relates to a blockchain technique, where information can be stored in blockchain nodes. The invention does not need to convert static URL to a service system for development or manually write codes, greatly reduces the time and energy consumed by the service docking between the enterprise gateway and the supplier, and improves the iterative rhythm and efficiency of the docking service by configuring the fields in the customized template and the plug-ins in the plug-in assembly.

Description

External device docking method and device, computer device and readable storage medium
Technical Field
The invention relates to the technical field of cloud storage of cloud services, in particular to a method and a device for docking external equipment, computer equipment and a readable storage medium.
Background
In the prior art, regarding the docking between an enterprise gateway and a provider, for enabling an external device (i.e., a device of the provider) to invoke a service of a component of an internal system, generally, depending on the format and rules of a request message of each external device and the difference of plug-ins that the external device needs to invoke, a control end of the internal system needs to be converted into a service system by a static URL to develop, or depend on a human handwriting code to implement the docking between the enterprise gateway and the provider, which not only consumes a lot of time and effort, but also affects fast iteration rhythm and efficiency.
Disclosure of Invention
The invention aims to provide a method and a device for docking external equipment, computer equipment and a readable storage medium, which are used for solving the problems that in the prior art, a static URL is converted into a service system to develop or a code is transcribed by a person to realize docking of an enterprise gateway and a provider, a large amount of time and energy are consumed, and quick iteration rhythm and efficiency are influenced.
In order to achieve the above object, the present invention provides an external device docking method, including:
receiving a request message sent by external equipment;
extracting key data from the request message through a preset customized template, and constructing an access path according to the key data;
acquiring a plug-in set according to the access path, calling the plug-in set to calculate the key data to generate feedback information, wherein the plug-in set is pre-cached with a plug-in which generates feedback information according to the operation of the key data;
and sending the feedback information to the external equipment.
In the above solution, before receiving the request packet sent by the external device, the method further includes:
receiving demand information sent by external equipment, and acquiring a component corresponding to the demand information; the component is a software unit which is formed by encapsulating data and methods and used for completing a specified task;
reading the configuration information of the assembly, and performing pluggable configuration on the assembly according to the configuration information to obtain a plug-in;
and summarizing the plug-ins to obtain a plug-in set.
In the foregoing solution, the step of 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;
instantiating the component according to the definition registry to obtain a component implementation class;
and recording the component implementation class into a preset cache module to obtain the plug-in of the component.
In the above scheme, after the collecting the plug-ins to obtain a plug-in set, the method further includes:
receiving updating information sent by external equipment, and extracting a requirement code and a self-defined code in the updating information;
acquiring a component corresponding to the demand code and setting the component as a target component, and configuring 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;
and carrying out pluggable configuration on the modification component to obtain a modification plug-in, and loading the modification 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.
In the above solution, the step of extracting key data from the request message through a preset customized template and constructing an access path according to the key data includes:
extracting fields in the customized template, and loading the fields into a preset regular expression to obtain an extraction expression;
extracting key data from the request message according to the extraction expression;
and extracting address information from the key data, and integrally arranging the address information according to a preset path specification to construct an access path.
In the foregoing solution, before obtaining the plug-in set according to the access path, the method further includes:
extracting request signature information in the key data, and judging whether the request signature information is consistent with preset standard signature information or not; if not, feeding back rejection information to the external equipment;
after the sending the feedback information to the external device, the method further includes:
and uploading the feedback information to a block chain.
In the above scheme, the step of obtaining a plug-in set according to the access path and calling the plug-in set to calculate the key data to 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 the service ID in the access path, acquiring a plug-in corresponding to the service ID from the plug-in set and setting the plug-in as a target plug-in;
and extracting a request service message in the key data, and calling the target plug-in to run the request service message to generate feedback information.
In order to achieve the above object, the present invention further provides an external device docking apparatus, including:
the input module is used for receiving a request message sent by external equipment;
the extraction and construction module is used for extracting key data from the request message through a preset customized template and constructing an access path according to the key data;
the plug-in calling module is used for acquiring a plug-in set according to the access path and calling the plug-in set to calculate the key data to generate feedback information, wherein the plug-in set is pre-cached with a plug-in which generates feedback information according to the operation of the key data;
and the output module is used for sending the feedback information to the external equipment.
To achieve the above object, the present invention further 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 external device docking method when executing the computer program.
To achieve the above object, the present invention further provides a computer-readable storage medium, having a computer program stored thereon, where the computer program stored in the computer-readable storage medium, when executed by a processor, implements the steps of the above external device docking method.
According to the external equipment docking method, the external equipment docking device, the computer equipment and the readable storage medium, key data of different request message formats and rules of each external equipment can be identified through the customized template, and the plug-ins required to be called by each external equipment can be called according to the key data through the plug-in set in which the plug-ins are pre-cached, so that the external equipment can call components of an internal system without converting a static URL (uniform resource locator) into a service system for development or writing codes by people, the docking of an enterprise gateway and a supplier is further realized, the time and energy consumed by docking services between the enterprise gateway and the supplier are greatly reduced, and the iterative rhythm and efficiency of the docking services are improved by configuring fields in the customized template and the plug-ins in the plug-in set.
Drawings
FIG. 1 is a flowchart of a first embodiment of a method for docking an external device according to the present invention;
FIG. 2 is a schematic diagram of an environment application of a method for docking an external device according to a second embodiment of the method for docking an external device of the present invention;
fig. 3 is a flowchart of a specific method of the external device docking method according to the second embodiment of the external device docking method of the present invention;
FIG. 4 is a schematic diagram of program modules of a third embodiment of an external device docking apparatus according to the present invention;
fig. 5 is a schematic diagram of a hardware structure of a computer device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The external device docking method, the external device docking device, the computer device and the readable storage medium are suitable for the technical field of cloud transmission of cloud services, and provide the external device docking method based on the input module, the extraction and construction module, the plug-in calling module and the output module. The method comprises the steps of receiving a request message sent by external equipment, extracting key data from the request message through a preset customized template, constructing an access path according to the key data, acquiring 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 equipment.
The first embodiment is as follows:
referring to fig. 1, a docking method for an external device of the present embodiment includes:
s105: and receiving a request message sent by the external equipment.
S107: and extracting key data from the request message through a preset customized template, and constructing an access path according to the key data.
S109: and acquiring a plug-in set according to the access path, calling the plug-in set to calculate the key data to generate feedback information, wherein the plug-in set is pre-cached with a plug-in which generates feedback information according to the operation of the key data.
S110: and sending the feedback information to the external equipment.
In an exemplary embodiment, parameters required by component operation, namely the key data, are obtained from the request message through a customized template, and an access path, namely the position of a plug-in required to be called by the request message, is constructed according to the key data; the problem that the component cannot run the message due to the fact that the request message is sent by external equipment with different message formats and specifications is avoided, and the received request message is subjected to standardized processing by the customized template, namely: the method is simple and reliable, greatly improves the development efficiency and reduces the development intensity.
Obtaining a plug-in set according to the access path, wherein the plug-in set has a pluggable component which is set according to the requirements of external equipment and is used for generating feedback information according to the operation of the key data, namely: the plug-in assembly is pre-stored in a preset cache module; identifying a plug-in corresponding to a service ID (serviceId) in the key data in the plug-in set, setting the plug-in as a target component, and calling the target component to run a request service message in the key data to obtain feedback information so as to ensure that each external device can call a required component and obtain corresponding feedback information; meanwhile, the step calls the plug-in pre-cached in the plug-in set to run the key data, so that the request message does not need to call and run the code at the bottom layer of the internal system or call and run the component at the middle layer/control layer of the internal system, and the feedback information can be obtained only by calling the plug-in pre-cached, thereby improving the speed and efficiency of calling the plug-in by the external equipment.
In summary, the control end of the internal system can identify the key data of different request message formats and rules of each external device only through the customized template, and can call the plug-in needed to be called by each external device according to the key data through the plug-in set in which the plug-in is pre-cached, so that the external device can call the components of the internal system without converting a static URL into a service system for development or manually writing a code, thereby realizing the docking between the enterprise gateway and the provider, greatly reducing the time and energy consumed by the service docking between the enterprise gateway and the provider, and improving the iterative rhythm and efficiency of the docking service by configuring the fields in the customized template and the plug-ins in the plug-in set.
And sending the feedback information to the external equipment corresponding to the third party identifier (cropId) by extracting the third party identifier (cropId) of the key data so as to ensure that the feedback information can be accurately sent to the corresponding external equipment.
Example two:
the embodiment is a specific application scenario of the first embodiment, and the method provided by the present invention can be more clearly and specifically explained through the embodiment.
Next, the method provided in this embodiment is specifically described by taking an example that, in a server running an external device docking method, key data is extracted from a request message and an access path is constructed, then a plug-in set corresponding to the access path is called, and the plug-in set is called to calculate the key data to generate feedback information. It should be noted that the present embodiment is only exemplary, and does not limit the protection scope of the embodiments of the present invention.
Fig. 2 schematically shows an environment application diagram of the external device docking method according to the second embodiment of the present application.
In an exemplary embodiment, the gateway server 2 in which the external device docking method is located is respectively 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 may provide services through one or more networks 3, which networks 3 may include various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and/or the like. The network 3 may include physical links, such as coaxial cable links, twisted pair cable links, fiber optic links, combinations thereof, and/or the like. The network 3 may include wireless links, such as cellular links, satellite links, Wi-Fi links, and/or the like; the external device 4 may be a computer device such as a smart phone, a tablet computer, a notebook computer, or a desktop computer.
Fig. 3 is a flowchart of a specific method of a method for docking an external device according to an embodiment of the present invention, where the method specifically includes steps S201 to S210.
S201: receiving demand information sent by external equipment, and acquiring a component corresponding to the demand information; the component is a software unit formed by encapsulating data and methods and used for completing a specified task.
S202, reading the configuration information of the assembly, and performing pluggable configuration on the assembly according to the configuration information to obtain a plug-in;
and S203, summarizing the plug-ins to obtain a plug-in assembly.
In order to avoid compiling a large amount of customized codes on the basis of components in an internal system, so that the customized codes meet the requirements of external equipment, the problems of high development intensity and low efficiency are caused, the components are obtained from a preset framework in the step, the pluggable configuration of the components is realized to obtain plug-in components, the plug-ins are decoupled, and further the plug-ins can be combined randomly according to the requirements of the external equipment, therefore, a plug-in assembly set with the plug-ins cached can be generated only through simple plug-in configuration operation, the configuration and the use efficiency of the components are greatly improved, the development efficiency is improved, and the development intensity is reduced.
Meanwhile, in order to configure required components for the external equipment in a targeted manner according to the requirements of the external equipment, plug-ins corresponding to the requirements are identified and a plug-in set is formed in the step, and at the moment, all the plug-ins in the plug-in set are components for meeting the service requirements of the external equipment; and storing the plug-in assembly into the cache module so as to facilitate the calling of the plug-ins in the combined assembly by external equipment, thereby avoiding the problem of low calling efficiency caused by calling assemblies from a database/middle layer of the framework.
In a preferred embodiment, the step S201 of receiving the requirement information sent by the external device and acquiring the component corresponding to the requirement information includes:
s11: and receiving demand information sent by external equipment, and extracting a demand number in the demand information.
S12: and acquiring the component corresponding to the requirement number from a preset internal system.
Illustratively, a requirement number m in the received requirement information is extracted, and a component bean-m corresponding to the requirement number m is extracted from the internal system.
The internal system includes, but is not limited to, the following components: fusing assembly, current limiting assembly, anti-brushing assembly, wind control assembly, decryption assembly, label checking assembly, preposed assembly, RPC calling assembly, encryption assembly, label adding assembly and postposition assembly.
In a preferred embodiment, the step S202 of reading the configuration information of the component, and performing pluggable configuration on the component according to the configuration information to obtain a plug-in, includes:
s21: and constructing a definition registry according to the configuration information.
S22: and instantiating the component according to the definition registry to obtain a component implementation class.
S23: and recording the component implementation class into a preset cache module to obtain the plug-in of the component.
Illustratively, reading the bean-m.xml of the configuration information of the bean-m, calling a spring container (spring Ioc) to construct a bean-m definition registry according to the bean-m.xml, calling the spring container to instantiate the bean-m according to the bean-m definition registry to obtain a bean-m implementation class, and storing the bean-m implementation class into a cache pool (namely, the cache module) of the spring container to obtain the plugin bean-m of the component bean-m.
It should be noted that the Spring container, i.e. Spring io c (Inverse Of Control), is a module for managing objects in a Spring framework, and the bottom layer can be understood as a map set, and the Spring framework is an open-source Full stack (Full-stack) application framework and Control inversion container implementation Of the Java platform, and is generally directly referred to as Spring.
In a preferred embodiment, step S203 summarizes the plug-ins to obtain a plug-in set; the method comprises the following steps:
s31: and extracting a third party identifier in the requirement information, wherein the third party identifier is the unique identifier of the external equipment.
S32: and collecting plug-ins in the cache module to form a plug-in assembly, and associating the third party identification with the plug-in assembly.
Illustratively, a third party identifier a1 in the demand information is extracted, plug-in beans-m, bean-n and bean-l in the summarizing cache pool obtain a plug-in set bean-mnl, and the third party identifier a1 is loaded into the name of the plug-in set to obtain a plug-in set bean-mnl-a 1.
Therefore, the control end of the internal system can perform pluggable configuration on the components through the demand information acquisition component to obtain the plug-ins, and collect the plug-ins to obtain the plug-in set, so that the technical effect of rapidly configuring the plug-ins required by the external equipment is achieved.
In an embodiment, after the aggregating the plug-ins to obtain a plug-in set, the method further includes:
s204: and modifying the plug-ins in the plug-in set according to the updating information sent by the external equipment.
In order to ensure that the plug-ins in the plug-in set can meet the specific requirements of the external equipment, the step obtains the modified plug-ins by identifying the plug-ins in the plug-in set corresponding to the update information as the components to be modified, modifying the components to be modified according to the update information, and loading the modified plug-ins into the plug-in set so as to dynamically refresh the plug-in set, thereby meeting the specific requirements of the external equipment and expanding the application range of the plug-ins.
In a preferred embodiment, the step of modifying the plug-in the plug-in set according to update information sent by an external device, and loading the modified plug-in into the plug-in set includes:
s41: receiving updating information sent by external equipment, and extracting a requirement code and a self-defined code in the updating information;
s42: acquiring a component corresponding to the demand code and setting the component as a target component, and configuring 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 for the component.
S43: and carrying out pluggable configuration on the modification component to obtain a modification plug-in, and loading the modification 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.
Illustratively, receiving update information sent by an external device, and extracting a demand code m and a custom code A in the update information; obtaining a component bean-m corresponding to the demand code m, configuring the self-defined code A in the component bean-m to obtain a component bean-m1, calling a spring container to read configuration information bean-m1.xml of the bean-m1, constructing a bean-m1 definition registry according to the bean-m1.xml, instantiating bean-m1 according to the bean-m definition registry to obtain a bean-m1 implementation class, storing the bean-m1 implementation class into a cache pool (namely: the cache module) of the spring container to obtain a plugin bean-m1 of the component bean-m1, deleting the plugin bean-m in the cache pool to generate a new plugin set, further realizing the technical effect of dynamically refreshing the plugin set, and further realizing the hot updating of the plugin set.
It should be noted that the custom code defines the data interface, data source, data filter and data polling frequency of the component.
The data interface shows data fields, corresponding mappings and data response states contained by the components. Field: the default fields of the components are shown. Mapping: when the fields in the configured data source are not consistent with the default field names of the components, the fields in the data source can be input in the mapping input box, and the fields are mapped to the fields corresponding to the components. The real-time matching of the data can be realized without modifying the fields in the data source. The state is as follows: the data response state of the component can be displayed in real time, and the successful matching is displayed when the response is successful.
A controlled mode comprising: opening a switch, not requesting data in the component initialization state, and only initiating the request data by calling back an ID or a blueprint editor configuration method; with the switch closed, the automatic update request data may be used. The switch defaults to an off state.
The automatic update request, namely the automatic update request when selected, can set dynamic polling, and can also manually input the time frequency of polling. After the data is cleared, the data cannot be automatically updated, and the page needs to be refreshed manually or the data is requested to be updated by triggering a blueprint editor and a callback ID event.
The data sources, namely: the component uses static data sources by default. And clicking the configuration data source, and modifying the type and script of the data source on a setting data source page, wherein the detailed description refers to the setting component data source.
Data filters, i.e., provide data structure conversion, filtering, and some simple computational functions. A single click add filter can configure a data filter script at the set data source page, see the component data filter description section for details.
Data response results, namely: the data used by the components is presented in real time. When the component data source changes, the data response result correspondingly shows the latest data. If the system response is delayed, you can click the refresh data icon on the right side to acquire the latest data of the component.
S205: and receiving a request message sent by the external equipment.
In this step, the request message may be an http request message or an https request message.
It should be noted that the server running the external device interfacing method makes a communication connection with the external device, the communication connection is constructed based on the TCP/IP protocol network model, wherein the TCP/IP protocol provides a mechanism of point-to-point link, standardizing how the material should be encapsulated, addressed, transmitted, routed, and received at the destination.
S206: and creating a customized template which is recorded with fields corresponding to the entries of the plug-in, wherein the fields are used for extracting the key data in the request message.
In order to obtain the key data in the request message and eliminate the problem that the request message cannot run due to different formats, the step creates and records a field for extracting the key data in the request message, wherein the field is metadata of the plug-in, so that the key data for calling the plug-in the request message can be identified only through the customized template, therefore, the method can be adapted to various types of request messages, and the adaptability to external equipment is improved.
In a preferred embodiment, the step of creating a customized template that is recorded with fields corresponding to entries of the add-in includes:
s61: and acquiring the vacant template.
In this step, the empty template is an xml document.
S62: and acquiring a field sent by a control end, and loading the field into the vacant template to obtain the customized template.
Illustratively, the fields corresponding to the entries include: reqTime (request time), reqNum (request flow number), bizContent (request service packet), bizSign (request signature), corppid (third party identifier), and serviceId (service ID).
S207: and extracting key data from the request message through a preset customized template, and constructing an access path according to the key data.
In order to avoid the problem that the message cannot be run by the component due to the fact that different external devices adopt different message formats and specifications, a large amount of customized codes are written into the component to enable the component to run messages with different formats, development strength is greatly improved, and development efficiency is reduced. Obtaining parameters required by component operation from the request message through a customized template, namely the key data, and constructing an access path according to the key data, namely the position of a plug-in required to be called by the request message; the problem that the component cannot run the message due to the fact that the request message is sent by external equipment with different message formats and specifications is avoided, and the received request message is subjected to standardized processing by the customized template, namely: the method is simple and reliable, greatly improves the development efficiency and reduces the development intensity.
In a preferred embodiment, the step of extracting key data from the request message through a preset customized template and constructing an access path according to the key data includes:
s71: extracting fields in the customized template, and loading the fields into a preset regular expression to obtain an extraction expression;
s72: extracting key data from the request message according to the extraction expression;
s73: and extracting address information from the key data, and integrally arranging the address information according to a preset path specification to construct an access path.
Exemplarily, based on the above example, information corresponding to reqTime (request time), reqNum (request serial number), bizContent (request service packet), bizSign (request signature), corppid (third party identifier), and serviceId (service ID), that is, the key data is obtained; extracting address information in the key data, namely: information corresponding to the corppid (third party identifier) and the serviceId (service ID) is specified by a preset path: and/{ corrpid }/{ serviceId }/request, obtaining the access path URL, so that the plug-in set required by the external device can be quickly and accurately obtained through the URL.
S208: extracting request signature information in the key data, and judging whether the request signature information is consistent with preset standard signature information or not;
if yes, go to S209;
and if not, feeding back rejection information to the external equipment and finishing.
In this step, the standard signature information is unique information that is registered by the external device in the internal system and used for verifying the authenticity of the external device, for example: passwords, digital signatures, fingerprint information, etc. By comparing the request signature information with the standard signature information, if the request signature information is inconsistent with the standard signature information, the external device is judged to have no right to call the plug-ins in the plug-in set, namely the request of the external device is directly rejected, and therefore the safety of the plug-in set is guaranteed.
In fig. 3, the S208 is shown by the following notation:
s81: extracting request signature information in the key data, and judging whether the request signature information is consistent with preset standard signature information or not;
s82: if yes, go to S209;
s83: and if not, feeding back rejection information to the external equipment and finishing.
S209: and acquiring a plug-in set according to the access path, calling the plug-in set to calculate the key data to generate feedback information, wherein the plug-in set is pre-cached with a plug-in which generates feedback information according to the operation of the key data.
In this step, the plug-in set has a pluggable component set according to the requirements of the external device, and configured to run and generate the feedback information according to the critical data, that is, the pluggable component includes: and the plug-in assembly is prestored in a preset cache module. In order to ensure that each external device can call a required component and obtain corresponding feedback information, a plug-in set is obtained according to the access path, a plug-in set is obtained from a cache module according to the access path, a plug-in corresponding to a service id (serviceid) in the key data in the plug-in set is identified and set as a target component, and the target component is called to run a request service message in the key data to obtain the feedback information.
Meanwhile, the step calls the plug-in pre-cached in the plug-in set to run the key data, so that the request message does not need to call and run the code at the bottom layer of the internal system or call and run the component at the middle layer/control layer of the internal system, and the feedback information can be obtained only by calling the plug-in pre-cached, thereby improving the speed and efficiency of calling the plug-in by the external equipment.
In a preferred embodiment, the step of obtaining a plug-in set according to the access path and calling the plug-in set to calculate the key data to generate feedback information includes:
s91: and 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.
S92: extracting a service ID (serviceId) in the access path, acquiring a plug-in corresponding to the service ID (serviceId) from the plug-in set, and setting the plug-in as a target plug-in.
S93: and extracting a request service message in the key data, and calling the target plug-in to run the request service message to generate feedback information.
Illustratively, based on the above example, the plug-in set bean-mnl is obtained according to the third party identification in the access path, and according to the service ID in the access path: m, obtaining a plug-in bean-m from the plug-in assembly, namely the target plug-in, and calling the plug-in bean-m to run the request service message in the key data, namely: and obtaining feedback information according to the information corresponding to the bizContent.
S210: and sending the feedback information to the external equipment.
In order to ensure that the feedback information can be accurately sent to the corresponding external device, the step is to send the feedback information to the external device corresponding to the third party identifier (cropId) by extracting the third party identifier (cropId) of the key data.
Preferably, after the sending the feedback information to the external device, the method further includes:
and uploading the feedback information to a block chain.
It should be noted that the corresponding digest information is obtained based on the feedback information, and specifically, the digest information is obtained by hashing the feedback information, for example, by using the sha256s algorithm. Uploading summary information to the blockchain can ensure the safety and the fair transparency of the user. The user equipment may download the summary information from the blockchain to verify whether the feedback information is tampered. The blockchain referred to in this example is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Example three:
referring to fig. 4, an external device docking apparatus 1 of the present embodiment includes:
an input module 15, configured to receive a request message sent by an external device;
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;
the plug-in calling module 19 is configured to obtain a plug-in set according to the access path, and call the plug-in set to calculate the key data to generate feedback information, where a plug-in running according to the key data to generate feedback information is pre-cached in the plug-in set;
and the output module 10 is configured to send the feedback information to the external device.
Optionally, the external device docking apparatus 1 further includes:
the system comprises a demand input module 11, a demand processing module and a control module, wherein the demand input module is used for receiving demand information sent by external equipment and acquiring a component corresponding to the demand information;
the plug-in configuration module 12 is configured to read configuration information of the component, and perform pluggable configuration on the component according to the configuration information to obtain a plug-in;
the plug-in collecting module 13 is used for collecting the plug-ins to obtain a plug-in set; the component is a software unit formed by encapsulating data and methods and used for completing a specified task.
Optionally, the external device docking apparatus 1 further includes:
and the set modification module 14 is configured to modify the plug-ins in the plug-in set according to the update information sent by the external device.
Optionally, the set modification module 14 further includes:
an information extraction unit 141, configured to receive update information sent by an external device, and extract a requirement code and a custom code in the update information;
a target modifying unit 142, configured to obtain a component corresponding to the requirement code, set the component as a target component, and configure the custom code in the target component to modify the target component and obtain a modified component;
a plug-in replacement unit 143, configured to perform pluggable configuration on the modification component to obtain a modification plug-in, and load the modification plug-in into the plug-in set to replace a plug-in corresponding to the target component.
Optionally, the external device docking apparatus 1 further includes:
and the template creating module 16 is used for creating a customized template in which fields corresponding to the entries of the plug-in are recorded, wherein the fields are used for extracting the key data in the request message.
Optionally, the template creating module 16 further includes:
a template acquisition unit 161 configured to acquire an empty template;
and the template generating unit 162 is configured to obtain a field sent by the control end, and load the field into the empty template to obtain the customized template.
Optionally, the extraction and construction module 17 further includes:
the expression constructing unit 171 is configured to extract the fields in the customized template, and load the fields into a preset regular expression to obtain an extracted expression;
an information extracting unit 172, configured to extract key data from the request message according to the extraction expression;
a path construction unit 173, configured to extract address information from the key data, and integrally arrange the address information according to a preset path specification to construct an access path.
Optionally, the external device docking apparatus 1 further includes:
the signature judgment module 18 is configured to extract request signature information in the key data, and judge whether the request signature information is consistent with preset standard signature information; if yes, calling a plug-in calling module 17; and if not, feeding back rejection information to the external equipment and finishing.
Optionally, the plug-in calling module 19 further includes:
and the set identification unit 191 is configured to extract the third party identifier in the access path, and acquire a plug-in set corresponding to the third party identifier from the cache module.
A plug-in identification unit 192, configured to extract the service ID in the access path, acquire a plug-in corresponding to the service ID from the plug-in set, and set the plug-in as a target plug-in.
And a message operation unit 193, configured to extract the request service message in the key data, and invoke the target plug-in to run the request service message to generate feedback information.
The technical scheme relates to a cloud transmission technology of cloud service, the cloud transmission technology is operated in a gateway server, key data are extracted from a request message through a customized template, an access path is established according to the key data, a plug-in set is obtained according to the access path, the plug-in set is called to calculate the key data to generate feedback information, and the feedback information is sent to external equipment, so that the gateway server becomes a cloud storage gateway.
Example four:
in order to achieve the above object, the present invention further provides a computer device 5, in which components of the external device docking apparatus in the third embodiment may be dispersed in different computer devices, and the computer device 5 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack-mounted server, a blade server, a tower server, or a rack-mounted server (including an independent server or a server cluster formed by multiple application servers) for executing programs, and the like. The computer device of the embodiment at least includes but is not limited to: a memory 51, a processor 52, which may be communicatively coupled to each other via a system bus, as shown in FIG. 5. It should be noted that fig. 5 only shows a computer device with components, but it should be understood that not all of the shown components are required to be implemented, and more or fewer components may be implemented instead.
In this embodiment, the memory 51 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., 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 magnetic disk, an optical disk, and the like. In some embodiments, the memory 51 may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory 51 may be an external storage device of a computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device. Of course, the memory 51 may also include both internal and external storage devices of the computer device. In this embodiment, the memory 51 is generally used for storing an operating system and various application software installed in the computer device, such as program codes of the external device docking apparatus in the third embodiment. Further, the memory 51 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 52 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 52 is typically used to control the overall operation of the computer device. In this embodiment, the processor 52 is configured to execute the program codes stored in the memory 51 or process data, for example, execute the external device docking apparatus, so as to implement the external device docking method of the first embodiment and the second embodiment.
Example five:
to achieve the above objects, 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 (e.g., 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 magnetic disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, which when executed by a processor 52, implements corresponding functions. The computer-readable storage medium of the present embodiment is used for storing a computer program for implementing the external device docking method, and when executed by the processor 52, implements the external device docking method of the first embodiment and the second embodiment.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An external device docking method, comprising:
receiving a request message sent by external equipment;
extracting key data from the request message through a preset customized template, and constructing an access path according to the key data;
acquiring a plug-in set according to the access path, calling the plug-in set to calculate the key data to generate feedback information, wherein the plug-in set is pre-cached with a plug-in which generates feedback information according to the operation of the key data;
and sending the feedback information to the external equipment.
2. The external device docking method according to claim 1, wherein before receiving the request message sent by the external device, the method further comprises:
receiving demand information sent by external equipment, and acquiring a component corresponding to the demand information; the component is a software unit which is formed by encapsulating data and methods and used for completing a specified task;
reading the configuration information of the assembly, and performing pluggable configuration on the assembly according to the configuration information to obtain a plug-in;
and summarizing the plug-ins to obtain a plug-in set.
3. The method for docking an external device according to claim 2, wherein the step of 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;
instantiating the component according to the definition registry to obtain a component implementation class;
and recording the component implementation class into a preset cache module to obtain the plug-in of the component.
4. The method of claim 2, wherein after aggregating the plug-ins into a set of plug-ins, the method further comprises:
receiving updating information sent by external equipment, and extracting a requirement code and a self-defined code in the updating information;
acquiring a component corresponding to the demand code and setting the component as a target component, and configuring 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;
and carrying out pluggable configuration on the modification component to obtain a modification plug-in, and loading the modification 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.
5. The external device docking method according to claim 1, wherein the step of extracting key data from the request message through a preset customized template and constructing an access path according to the key data includes:
extracting fields in the customized template, and loading the fields into a preset regular expression to obtain an extraction expression;
extracting key data from the request message according to the extraction expression;
and extracting address information from the key data, and integrally arranging the address information according to a preset path specification to construct an access path.
6. The external device docking method as described in claim 1, wherein before said obtaining a set of plug-ins according to said access path, said method further comprises:
extracting request signature information in the key data, and judging whether the request signature information is consistent with preset standard signature information or not; if not, feeding back rejection information to the external equipment;
after the sending the feedback information to the external device, the method further includes:
and uploading the feedback information to a block chain.
7. The external device docking method according to claim 1, wherein the step of obtaining a plug-in set according to the access path, and calling the plug-in set to calculate the key data to 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 the service ID in the access path, acquiring a plug-in corresponding to the service ID from the plug-in set and setting the plug-in as a target plug-in;
and extracting a request service message in the key data, and calling the target plug-in to run the request service message to generate feedback information.
8. An external device docking apparatus, comprising:
the input module is used for receiving a request message sent by external equipment;
the extraction and construction module is used for extracting key data from the request message through a preset customized template and constructing an access path according to the key data;
the plug-in calling module is used for acquiring a plug-in set according to the access path and calling the plug-in set to calculate the key data to generate feedback information, wherein the plug-in set is pre-cached with a plug-in which generates feedback information according to the operation of the key data;
and the output module is used for sending the feedback information to the external equipment.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the external device docking method according to any one of claims 1 to 7 are implemented by the processor of the computer device when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, the computer program stored in the computer-readable storage medium, when being executed by a processor, implementing the steps of the external device docking method according to any one of claims 1 to 7.
CN202110481293.XA 2021-04-30 2021-04-30 External device docking method and device, computer device and readable storage medium Pending CN113190287A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110481293.XA CN113190287A (en) 2021-04-30 2021-04-30 External device docking method and device, computer device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110481293.XA CN113190287A (en) 2021-04-30 2021-04-30 External device docking method and device, computer device and readable storage medium

Publications (1)

Publication Number Publication Date
CN113190287A true CN113190287A (en) 2021-07-30

Family

ID=76983277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110481293.XA Pending CN113190287A (en) 2021-04-30 2021-04-30 External device docking method and device, computer device and readable storage medium

Country Status (1)

Country Link
CN (1) CN113190287A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656093A (en) * 2021-08-02 2021-11-16 珠海格力电器股份有限公司 Plug-in configuration method, device, equipment and storage medium
CN114253629A (en) * 2021-12-23 2022-03-29 广州华银医学检验中心有限公司 External device calling method and device, computer device and storage medium
CN114489853A (en) * 2022-01-21 2022-05-13 阿里巴巴(中国)有限公司 Plug-in registration method, electronic device and computer-readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656093A (en) * 2021-08-02 2021-11-16 珠海格力电器股份有限公司 Plug-in configuration method, device, equipment and storage medium
CN114253629A (en) * 2021-12-23 2022-03-29 广州华银医学检验中心有限公司 External device calling method and device, computer device and storage medium
CN114253629B (en) * 2021-12-23 2024-03-22 广州华银医学检验中心有限公司 External device calling method and device, computer device and storage medium
CN114489853A (en) * 2022-01-21 2022-05-13 阿里巴巴(中国)有限公司 Plug-in registration method, electronic device and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN113190287A (en) External device docking method and device, computer device and readable storage medium
CN102171652B (en) The method providing trusted software for electronic installation
CN111736775A (en) Multi-source storage method, device, computer system and storage medium
CN112217656B (en) Method and device for synchronizing configuration information of network equipment in SD-WAN (secure digital-to-Wide area network) system
CN115668147A (en) Preventing unauthorized deployment of packages in a cluster
CN110661853A (en) Data proxy method, device, computer equipment and readable storage medium
US11500904B2 (en) Local data classification based on a remote service interface
CN113434175B (en) Data processing method, device, storage medium and equipment
CN112995357B (en) Domain name management method, device, medium and electronic equipment based on cloud hosting service
CN115118705A (en) Industrial edge management and control platform based on micro-service
CN114036495B (en) Method and device for updating privatized deployment verification code system
CN110716734A (en) Software upgrading method and device, electronic equipment and medium
CN112988409B (en) Interface calling method and device, computer equipment and storage medium
CN112579958B (en) Webpage conversion method, webpage conversion device, computer equipment and readable storage medium
CN112052141B (en) Data fragment verification method and device, computer equipment and readable storage medium
CN112559027A (en) Method, system, device and readable storage medium for creating and managing functional components
CN111177099A (en) Data processing method and device of business system, electronic equipment and storage medium
CN109166205B (en) Parking lot access control system, adaptation method and Internet of things gateway
US11443058B2 (en) Processing requests at a remote service to implement local data classification
CN110855562A (en) Internet of things data distribution management method and system, storage medium and management terminal
CN113434217B (en) Vulnerability scanning method, vulnerability scanning device, computer equipment and medium
CN111654398B (en) Configuration updating method and device, computer equipment and readable storage medium
CN111447080B (en) Private network decentralization control method, device and computer readable storage medium
CN114785533B (en) Address book data safety control method and device, electronic equipment and storage medium
CN112667441A (en) Service module scheduling method, system and storage medium based on fault-tolerant function

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