CN115756885A - Cross-middleware elastic read-write method and device, computer equipment and storage medium - Google Patents

Cross-middleware elastic read-write method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115756885A
CN115756885A CN202211379808.6A CN202211379808A CN115756885A CN 115756885 A CN115756885 A CN 115756885A CN 202211379808 A CN202211379808 A CN 202211379808A CN 115756885 A CN115756885 A CN 115756885A
Authority
CN
China
Prior art keywords
target
middleware
configuration file
pipeline
preset
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
CN202211379808.6A
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 Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202211379808.6A priority Critical patent/CN115756885A/en
Publication of CN115756885A publication Critical patent/CN115756885A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention discloses a cross-middleware elastic read-write method, a cross-middleware elastic read-write device, computer equipment and a storage medium, wherein the method comprises the following steps: accessing an intermediate pipeline set based on a preset service request, wherein the preset service request comprises the type of middleware, the intermediate pipeline set comprises a preset number of intermediate pipelines, and each intermediate pipeline comprises a configuration file packet set according to a preset configuration file standard; determining a target intermediate pipeline according to the type of the middleware, wherein the target intermediate pipeline comprises a corresponding target configuration file packet; reading the target configuration file package; and performing data reading and writing operation on a target data source according to the target configuration file packet. The invention realizes the synchronization between different data structures of different data sources by setting the integrated intermediate pipeline set, and the user only needs to care about the data reading and writing of the service scene, thereby greatly simplifying the code development and improving the coding efficiency.

Description

Cross-middleware elastic read-write method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of program development technologies, and in particular, to a method and an apparatus for elastic read/write across middleware, a computer device, and a storage medium.
Background
With the development of the IT industry, the middleware for data persistent storage and data transmission becomes more and more, from DB to redis and elastic search, from http network request to RPC communication and MQ, and the like; each middleware domain derives a large number of products of the same type, such as MQ, including RockettMQ, rabbitMQ, kafka and the like;
under the circumstances, various challenges are brought to technology model selection and development docking modes in the development process, and since at least more than two kinds of middleware are used in the current development project and each kind of middleware has respective docking and docking modes, the development cost is greatly increased;
therefore, a flexible read/write scheme compatible with multiple types of middleware is needed.
Disclosure of Invention
In order to solve the above technical problem, an embodiment of the present application provides a cross-middleware elastic read-write method, an apparatus, a computer device and a storage medium, which can be applied to the field of financial technology, and the specific scheme is as follows:
in a first aspect, an embodiment of the present application provides an elastic read-write method across a middleware, where the method includes:
accessing an intermediate pipeline set based on a preset service request, wherein the preset service request comprises the type of middleware, the intermediate pipeline set comprises a preset number of intermediate pipelines, and each intermediate pipeline comprises a configuration file packet set according to a preset configuration file standard;
determining a target intermediate pipeline according to the type of the middleware, wherein the target intermediate pipeline comprises a corresponding target configuration file packet;
reading the target configuration file package;
and performing data reading and writing operation on a target data source according to the target configuration file packet.
According to a specific implementation manner of the embodiment of the present application, the accessing the intermediate pipe set based on the preset service request includes:
calling a preset SDK interface based on a preset service request;
and accessing the intermediate pipeline set through the preset SDK interface.
According to a specific implementation manner of the embodiment of the present application, performing data read-write operation on a target data source according to the target configuration file package includes:
acquiring an API (application programming interface) of the target data source according to the content of the preset service request and the target configuration file packet;
and performing data read-write operation on the data in the target data source through the API.
According to a specific implementation manner of the embodiment of the present application, the target data source includes a first data source and a second data source, the target intermediate pipeline includes a first pipeline and a second pipeline, the first pipeline includes a corresponding first profile packet, and the second pipeline includes a corresponding second profile packet;
the performing data read-write operation on a target data source according to the target configuration file packet includes:
performing data reading operation on the first data source according to the first configuration file packet;
and performing data writing operation on the second data source according to the second configuration file packet.
According to a specific implementation of an embodiment of the present application, the set of intermediate pipes includes a DB pipe, a Redis pipe, an ES pipe, and an MQ pipe;
the determining a target intermediate pipe according to the type of the middleware comprises:
if the middleware is DB, determining the target intermediate pipeline as a DB pipeline;
if the middleware is a Redis pipeline, determining that the target intermediate pipeline is a Redis pipeline;
if the middleware is an ES, determining that the target intermediate pipeline is an ES pipeline;
and if the middleware is MQ, determining that the target intermediate pipeline is an MQ pipeline.
According to a specific implementation manner of the embodiment of the present application, if the intermediate pipe set does not include the target intermediate pipe corresponding to the preset service request, the method further includes:
acquiring middleware configuration data corresponding to the preset service request;
packaging the middleware configuration data according to the preset configuration file standard to obtain an extended configuration file packet;
adding an extended intermediate pipe to the intermediate pipe set, the extended intermediate pipe including the extended configuration file package;
and taking the extended intermediate pipeline as a target intermediate pipeline corresponding to the preset service request, taking the extended configuration file packet as a target configuration file packet corresponding to the preset service request, and skipping to execute the step of reading the target configuration file packet.
According to a specific implementation manner of the embodiment of the present application, the middleware configuration data includes link information, a data source mapping relationship, and field mapping.
In a second aspect, an embodiment of the present application provides an elastic read-write apparatus across an intermediate piece, where the apparatus includes:
the system comprises a connection module, a configuration module and a service module, wherein the connection module is used for accessing an intermediate pipeline set based on a preset service request, the preset service request comprises the type of middleware, the intermediate pipeline set comprises a preset number of intermediate pipelines, and each intermediate pipeline comprises a configuration file packet set according to a preset configuration file standard;
the determining module is used for determining a target intermediate pipeline according to the type of the middleware;
a reading module, configured to read the configuration file packet in the target intermediate pipeline;
and the read-write module is used for performing data read-write operation on a target data source according to the configuration file packet.
In a third aspect, an embodiment of the present application provides a computer device, where the computer device includes a processor and a memory, where the memory stores a computer program, and the computer program, when running on the processor, executes the method for elastic reading and writing across middleware described in any one of the first aspect and the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium includes a processor and a memory, where the memory stores a computer program, and the computer program, when running on the processor, performs the method for resilient reading and writing across middleware according to any one of the first aspect and the first aspect.
The embodiment of the application provides an elastic read-write method and device for a cross-middleware, computer equipment and a storage medium, wherein the method comprises the following steps: accessing an intermediate pipeline set based on a preset service request, wherein the preset service request comprises the type of middleware, the intermediate pipeline set comprises a preset number of intermediate pipelines, and each intermediate pipeline comprises a configuration file packet set according to a preset configuration file standard; determining a target intermediate pipeline according to the type of the middleware, wherein the target intermediate pipeline comprises a corresponding target configuration file packet; reading the target configuration file package; and performing data read-write operation on a target data source according to the target configuration file packet. The invention realizes the synchronization between different data structures of different data sources by setting the integrated intermediate pipeline set, and the user only needs to care about the data reading and writing of the service scene, thereby greatly simplifying the code development and improving the coding efficiency.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings required to be used in the embodiments will be briefly described below, and it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope of the present invention. Like components are numbered similarly in the various figures.
Fig. 1 is a schematic method flow diagram illustrating an elastic cross-middleware read-write method according to an embodiment of the present application;
fig. 2 illustrates an application scenario diagram of an elastic read-write method across middleware provided in an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating an apparatus module of an elastic reader/writer device crossing an intermediate piece according to an embodiment of the present disclosure;
fig. 4 shows a device module schematic diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Hereinafter, the terms "including", "having", and their derivatives, which may be used in various embodiments of the present invention, are only intended to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the existence of, or adding to, one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the present invention belong. The terms (such as those defined in commonly used dictionaries) should be interpreted as having a meaning that is consistent with their contextual meaning in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in various embodiments of the present invention.
Referring to fig. 1, a schematic flow chart of a method for cross-middleware elastic read-write method provided in an embodiment of the present application is shown, where as shown in fig. 1, the cross-middleware elastic read-write method includes:
step S101, accessing an intermediate pipeline set based on a preset service request, wherein the preset service request comprises the type of middleware, the intermediate pipeline set comprises a preset number of intermediate pipelines, and each intermediate pipeline comprises a configuration file packet set according to a preset configuration file standard;
specifically, the cross-middleware elastic read-write method provided by this embodiment can be applied to application scenarios that require reading data with different data structures in different data sources, such as code development and program development.
In a specific embodiment, the preset service request may be a command request generated when specified data is read from any data source. For example, if the user needs to read the specified identity data from the identity information base, the predetermined service request may be an identity information reading request.
The specific type of the preset service request may be adaptively replaced according to an actual application scenario, which is not limited herein.
The preset service request includes a type of a middleware that needs to be used, and specifically, the middleware that may need to be used by the preset service request may be a database (Data Base, DB for short), a Remote Dictionary service (Remote Dictionary Server, redis for short), a distributed search and analysis engine (elastic search, ES for short), an http network request, a Remote Procedure Call Protocol (RPC communication Protocol for short), a Message Queue (MQ for short), or the like.
Specifically, the type of the middleware included in the preset service request may be adaptively replaced according to an actual application scenario, and the middleware may be adaptively replaced according to a data structure of a data source corresponding to the preset service request.
The intermediate pipeline set is an intermediate pipeline which is developed by utilizing an open source pipeline tool and used for replacing various types of middleware, the intermediate pipeline set provides a universal pipeline interface, and the pipeline interface can be an SDK interface.
The type of the universal pipeline interface can be replaced by other types of interfaces, and the universal pipeline interface can be replaced according to actual application scenes.
According to a specific implementation of an embodiment of the present application, the set of intermediate pipes includes a DB pipe, a Redis pipe, an ES pipe, and an MQ pipe;
specifically, the number of the intermediate pipelines in the intermediate pipeline set may be determined according to the number of types of data structures to be docked in code development in an actual application scenario, and for any data structure in a target data source, a corresponding intermediate pipeline may be configured to implement automatic matching of data environments.
As shown in FIG. 2, a DB pipe, a Redis pipe, an ES pipe and an MQ pipe are arranged in the intermediate pipe set.
Each intermediate pipeline in the intermediate pipeline set is provided with a configuration file packet including preset configuration file standard settings through a pipeline extension plug-in.
The preset profile standard may be a plurality of configuration items set in advance by a user, and the preset profile standard may be set adaptively according to an actual application scenario, which is not limited herein.
The configuration file includes a plurality of configuration items, and specifically, the content of the configuration item configured by each pipeline is set according to the configuration requirement of the corresponding middleware, which is not described herein repeatedly.
According to a specific implementation manner of the embodiment of the present application, accessing the intermediate pipe set based on the preset service request includes:
calling a preset SDK interface based on a preset service request;
and accessing the intermediate pipeline set through the preset SDK interface.
Specifically, the intermediate pipe set provided by this embodiment is set in the producer terminal or the producer server, and the user may invoke an SDK interface of the corresponding intermediate pipe set in the consumer terminal or the consumer server based on a preset service request, so as to connect the intermediate pipe set.
After the consumer accesses the intermediate pipeline set, the consumer can perform data read-write operation with a target data source of the producer through at least one intermediate pipeline in the intermediate pipeline set.
Step S102, determining a target intermediate pipeline according to the type of the middleware, wherein the target intermediate pipeline comprises a corresponding target configuration file packet;
in a specific embodiment, the preset service request includes data information to be acquired, where the data information has a specified data source, and when performing data read-write processing with the specified data source, middleware information corresponding to a data structure of the data source needs to be configured in advance.
In this embodiment, after the intermediate pipe set is connected, data read-write processing may be performed with a specified data source through at least one intermediate pipe in the intermediate pipe set without performing a middleware configuration step.
In the process of determining the target intermediate pipeline, the data structure of the specified data source is determined according to the preset service request, the type of the middleware is further determined, and then the corresponding intermediate pipeline is determined according to the type of the middleware.
The determining a target intermediate pipe according to the type of the middleware comprises:
if the middleware is a DB, determining that the target intermediate pipeline is a DB pipeline;
if the middleware is a Redis pipeline, determining that the target intermediate pipeline is the Redis pipeline;
if the middleware is an ES, determining that the target intermediate pipeline is an ES pipeline;
and if the middleware is MQ, determining that the target intermediate pipeline is an MQ pipeline.
In a specific embodiment, the preset service request may perform data reading and writing processing through multiple types of intermediate pipelines. For example, the data in the original data source is acquired through the DB pipeline, and the acquired data is written into the target data source through the MQ pipeline.
In this embodiment, there may be a plurality of target intermediate pipelines and target data sources.
Step S103, reading the target configuration file packet;
specifically, after the target intermediate pipeline is determined, a target configuration file package associated with the target intermediate pipeline may be directly called to deploy a data acquisition environment corresponding to a target data source.
As shown in fig. 2, the target profile package may be obtained through a preset pipe extension plug-in.
Illustratively, the preset pipe extension plug-in may be common-pipeline-interface.
The preset pipeline extension plug-in unit can also select other suitable plug-in units according to the requirements of the actual application scene.
And step S104, performing data read-write operation on a target data source according to the target configuration file packet.
In a specific embodiment, after the target configuration file packet of the corresponding target intermediate pipeline is obtained, data read-write operation may be performed on the specified data source corresponding to the service request based on the target configuration file packet.
And the target data source is a data source appointed in the preset service request.
According to a specific implementation manner of the embodiment of the present application, performing data read-write operation on a target data source according to the target configuration file package includes:
acquiring an API (application programming interface) of the target data source according to the content of the preset service request and the target configuration file packet;
and performing data read-write operation on the data in the target data source through the API.
In a specific embodiment, an API interface capable of connecting to a target data source may be directly obtained according to the content of a preset service request and the configuration file package, and data read-write processing across data sources may be implemented through the API interface.
According to a specific implementation manner of the embodiment of the present application, the target data source includes a first data source and a second data source, the target intermediate pipeline includes a first pipeline and a second pipeline, the first pipeline includes a corresponding first profile packet, and the second pipeline includes a corresponding second profile packet;
the performing data read-write operation on a target data source according to the target configuration file packet includes:
performing data reading operation on the first data source according to the first configuration file packet;
and performing data writing operation on the second data source according to the second configuration file packet.
In a specific embodiment, the first data source is an original data source for reading data, and the second data source is a designated data source for writing data.
When data synchronization operation is performed, based on the intermediate channel set provided in this embodiment, targeted middleware configuration is not required to be performed for data structures of different data sources, and data in a first data source can be directly synchronized to a second data source, so that fast data synchronization processing between different data sources is realized.
According to a specific implementation manner of the embodiment of the present application, if the intermediate pipe set does not include the target intermediate pipe corresponding to the preset service request, the method further includes:
acquiring middleware configuration data corresponding to the preset service request;
packaging the middleware configuration data according to the preset configuration file standard to obtain an extended configuration file packet;
adding an extended intermediate pipe to the intermediate pipe set, the extended intermediate pipe including the extended profile package;
and taking the extended intermediate pipeline as a target intermediate pipeline corresponding to the preset service request, taking the extended configuration file packet as a target configuration file packet corresponding to the preset service request, and skipping to execute the step of reading the target configuration file packet.
In a specific embodiment, when a preset service request is received, the intermediate pipe set may not include middleware configuration data of a data source corresponding to the preset service request, and at this time, the intermediate pipe set needs to be expanded according to the current service request, so as to add an intermediate pipe adapted to the current service request.
Specifically, the configuration scheme of the extended intermediate pipe may refer to the description of the configuration scheme of the intermediate pipe, and will not be described herein again.
According to a specific implementation manner of the embodiment of the present application, the middleware configuration data includes link information, a data source mapping relationship, and field mapping.
In a specific embodiment, the data included in the profile packet may be adaptively replaced according to the type of the corresponding intermediate pipe.
As shown in fig. 2, the middleware configuration data provided in this embodiment is only an exemplary configuration item, and the intermediate pipeline provided in this embodiment may include a plurality of configuration items, and performs adaptive replacement according to an actual application scenario, which is not limited herein.
In summary, the present embodiment provides an elastic read-write method across middleware, which greatly simplifies code development by adding an intermediate pipeline set adapted to multiple data structures and middleware, so that a user only needs to care about data read-write of a service scene, thereby improving coding efficiency; in addition, the pipeline type data transmission mode is efficient and quick, and the synchronization among different data structures of different data sources is realized; the abstract interface can realize rapid expansion and replication, improves the reusability of the intermediate pipeline set and reduces the maintenance cost; the butt joint mode is friendly, and the intermediate pipeline set can be directly introduced to be used through an SDK mode.
Referring to fig. 3, a schematic diagram of a device module of an elastic read/write device 300 spanning middleware provided in an embodiment of the present application is shown, where in the elastic read/write device 300 spanning middleware provided in the embodiment of the present application, as shown in fig. 3, the elastic read/write device 300 spanning middleware includes:
a connection module 301, configured to access an intermediate pipe set based on a preset service request, where the preset service request includes a type of middleware, the intermediate pipe set includes a preset number of intermediate pipes, and each intermediate pipe includes a configuration file packet set according to a preset configuration file standard;
a determining module 302, configured to determine a target intermediate pipe according to the type of the middleware;
a reading module 303, configured to read the configuration file packet in the target intermediate pipe;
and the read-write module 304 is configured to perform data read-write operation on the target data source according to the configuration file packet.
The specific implementation process of the elastic read-write apparatus 300 across middleware provided in this embodiment may refer to the specific implementation process of the elastic read-write method across middleware in the foregoing method embodiments, and details are not described here again.
Furthermore, the present disclosure provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the computer program executes the model training method provided in the method embodiment 1 when running on the processor.
Specifically, as shown in fig. 4, the computer device 400 provided in this embodiment includes:
radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 4 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present application, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted mobile terminal, a wearable device, a pedometer, and the like.
It should be understood that, in the embodiment of the present application, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 402, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the computer device 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or video obtained by an image capturing mobile terminal (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be video played on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The computer device 400 also includes at least one sensor 405, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 4061 and/or the backlight when the computer device 400 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used for video playing of information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts of a touch detection mobile terminal and a touch controller. The touch detection mobile terminal detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing mobile terminal, converts the touch information into touch point coordinates, and then sends the touch point coordinates to the processor 410, receives a command sent from the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 4, the touch panel 4071 and the display panel 4061 are two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 408 is an interface for connecting an external mobile terminal with the computer apparatus 400. For example, the external mobile terminal may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting the mobile terminal having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from an external mobile terminal and transmit the received input to one or more elements within the computer device 400 or may be used to transmit data between the computer device 400 and an external mobile terminal.
The memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, etc. Further, the memory 409 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 410 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 409 and calling data stored in the memory 409, thereby integrally monitoring the mobile terminal. Processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The computer device 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system.
In addition, the computer device 400 includes some functional modules that are not shown, and are not described in detail herein.
The embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a processor and a memory, where the memory stores a computer program, and the computer program, when running on the processor, executes the method for elastic reading and writing across middleware in the above method embodiments.
In addition, for the specific implementation processes of the computer device and the computer-readable storage medium mentioned in the foregoing embodiments, reference may be made to the specific implementation processes of the foregoing method embodiments, which are not described in detail herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part thereof which contributes to the prior art in essence can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention.

Claims (10)

1. A method for elastic reading and writing across middleware, the method comprising:
accessing an intermediate pipeline set based on a preset service request, wherein the preset service request comprises the type of middleware, the intermediate pipeline set comprises a preset number of intermediate pipelines, and each intermediate pipeline comprises a configuration file packet set according to a preset configuration file standard;
determining a target intermediate pipeline according to the type of the middleware, wherein the target intermediate pipeline comprises a corresponding target configuration file packet;
reading the target configuration file package;
and performing data read-write operation on a target data source according to the target configuration file packet.
2. The method of claim 1, wherein accessing the set of intermediate pipes based on the predetermined service request comprises:
calling a preset SDK interface based on a preset service request;
and accessing the intermediate pipeline set through the preset SDK interface.
3. The method of claim 1, wherein performing data read and write operations at a target data source according to the target profile package comprises:
acquiring an API (application programming interface) of the target data source according to the content of the preset service request and the target configuration file packet;
and performing data read-write operation on the data in the target data source through the API.
4. The method of claim 1, wherein the target data source comprises a first data source and a second data source, wherein the target intermediate pipe comprises a first pipe and a second pipe, wherein the first pipe comprises a corresponding first profile package, and wherein the second pipe comprises a corresponding second profile package;
the performing data read-write operation on a target data source according to the target configuration file packet includes:
performing data reading operation on the first data source according to the first configuration file packet;
and performing data writing operation on the second data source according to the second configuration file packet.
5. The method of claim 1, wherein the set of intermediate pipes comprises a DB pipe, a Redis pipe, an ES pipe, and an MQ pipe;
the determining a target intermediate pipe according to the type of the middleware comprises:
if the middleware is DB, determining the target intermediate pipeline as a DB pipeline;
if the middleware is a Redis pipeline, determining that the target intermediate pipeline is a Redis pipeline;
if the middleware is an ES, determining that the target intermediate pipeline is an ES pipeline;
and if the middleware is MQ, determining that the target intermediate pipeline is an MQ pipeline.
6. The method according to claim 1, wherein if the intermediate pipe set does not include the target intermediate pipe corresponding to the preset service request, the method further comprises:
acquiring middleware configuration data corresponding to the preset service request;
packaging the middleware configuration data according to the preset configuration file standard to obtain an extended configuration file packet;
adding an extended intermediate pipe to the intermediate pipe set, the extended intermediate pipe including the extended configuration file package;
and taking the extended intermediate pipeline as a target intermediate pipeline corresponding to the preset service request, taking the extended configuration file packet as a target configuration file packet corresponding to the preset service request, and skipping to execute the step of reading the target configuration file packet.
7. The method of claim 6, wherein the middleware configuration data comprises link information, data source mapping and field mapping.
8. A flexible read/write device across an intermediary, the device comprising:
the system comprises a connection module, a service module and a service module, wherein the connection module is used for accessing an intermediate pipeline set based on a preset service request, the preset service request comprises the type of middleware, the intermediate pipeline set comprises a preset number of intermediate pipelines, and each intermediate pipeline comprises a configuration file packet set according to a preset configuration file standard;
the determining module is used for determining a target intermediate pipeline according to the type of the middleware;
a reading module, configured to read the configuration file packet in the target intermediate pipeline;
and the read-write module is used for performing data read-write operation on a target data source according to the configuration file packet.
9. A computer device comprising a processor and a memory, said memory storing a computer program which, when run on said processor, performs the method of claim 1 to 7 for resilient reading and writing across middleware.
10. A computer-readable storage medium, in which a computer program is stored which, when run on a processor, performs the method of elastic read-write across middleware of any one of claims 1 to 7.
CN202211379808.6A 2022-11-04 2022-11-04 Cross-middleware elastic read-write method and device, computer equipment and storage medium Pending CN115756885A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211379808.6A CN115756885A (en) 2022-11-04 2022-11-04 Cross-middleware elastic read-write method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211379808.6A CN115756885A (en) 2022-11-04 2022-11-04 Cross-middleware elastic read-write method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115756885A true CN115756885A (en) 2023-03-07

Family

ID=85356540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211379808.6A Pending CN115756885A (en) 2022-11-04 2022-11-04 Cross-middleware elastic read-write method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115756885A (en)

Similar Documents

Publication Publication Date Title
CN107846352B (en) Information display method and mobile terminal
CN109614061B (en) Display method and terminal
US11658932B2 (en) Message sending method and terminal device
CN109032486B (en) Display control method and terminal equipment
CN111142930B (en) Installation package file packaging method and device, terminal device and storage medium
CN108513671B (en) Display method and terminal for 2D application in VR equipment
CN109412932B (en) Screen capturing method and terminal
CN110719319B (en) Resource sharing method, device, terminal equipment and storage medium
CN108257104B (en) Image processing method and mobile terminal
CN111045772A (en) Application sharing method, electronic equipment and computer readable storage medium
CN108616772B (en) Bullet screen display method, terminal and server
CN112084747B (en) Resource management method and device, electronic equipment and storage medium
CN110049187B (en) Display method and terminal equipment
CN108920040B (en) Application icon sorting method and mobile terminal
CN107864086B (en) Information rapid sharing method, mobile terminal and computer readable storage medium
CN111399819B (en) Data generation method, device, electronic equipment and storage medium
CN110069407B (en) Function test method and device for application program
CN111405043A (en) Information processing method and device and electronic equipment
CN111131607A (en) Information sharing method, electronic equipment and computer readable storage medium
CN109117037B (en) Image processing method and terminal equipment
CN111061404A (en) Control method and first electronic device
CN105335434B (en) Log management method and device and electronic equipment
CN107765954B (en) Application icon updating method, mobile terminal and server
CN109871324B (en) Control operation method and device
CN109491572B (en) Screen capturing method of mobile terminal and mobile terminal

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