CN113760886B - Method, apparatus, device and computer readable medium for providing data service - Google Patents

Method, apparatus, device and computer readable medium for providing data service Download PDF

Info

Publication number
CN113760886B
CN113760886B CN202011159671.4A CN202011159671A CN113760886B CN 113760886 B CN113760886 B CN 113760886B CN 202011159671 A CN202011159671 A CN 202011159671A CN 113760886 B CN113760886 B CN 113760886B
Authority
CN
China
Prior art keywords
instance
data
data request
virtual
providing
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.)
Active
Application number
CN202011159671.4A
Other languages
Chinese (zh)
Other versions
CN113760886A (en
Inventor
王继奎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202011159671.4A priority Critical patent/CN113760886B/en
Publication of CN113760886A publication Critical patent/CN113760886A/en
Application granted granted Critical
Publication of CN113760886B publication Critical patent/CN113760886B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • 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 invention discloses a method, a device, equipment and a computer readable medium for providing data service, relating to the technical field of computers. One embodiment of the method comprises the following steps: monitoring that an application system for providing services externally is started, and acquiring an array of virtual hash sub-library sub-table main keys according to a routing forwarding rule; establishing a parameter entering value of a method of an instance according to the array of the Ha Xifen base sub-table main key and the parameter entering type of the method of the instance; executing the method of the instance by combining the parameter entering value of the method, and constructing a virtual data request; and submitting the virtual data request to a thread pool, and establishing a link with a data provider to provide data service. This embodiment can reduce the time-consuming of the first operation.

Description

Method, apparatus, device and computer readable medium for providing data service
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer readable medium for providing a data service.
Background
The database sub-table rule can be generated when the application system for providing the data service is started. And then, after the online service flow enters the application system, dynamically routing the online service flow to the appointed table. And then routed to the designated database through the designated table.
In the process of implementing the present invention, the inventor finds that at least the following problems exist in the prior art: the first operation takes a particularly long time immediately after the application system is started.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, apparatus, device, and computer readable medium for providing a data service, which can reduce the time consumption of the first operation.
To achieve the above object, according to one aspect of an embodiment of the present invention, there is provided a method of providing a data service, including:
monitoring that an application system for providing services externally is started, and acquiring an array of virtual hash sub-library sub-table main keys according to a routing forwarding rule;
establishing a parameter entering value of a method of an instance according to the array of the Ha Xifen base sub-table main key and the parameter entering type of the method of the instance;
executing the method of the instance by combining the parameter entering value of the method, and constructing a virtual data request;
and submitting the virtual data request to a thread pool, and establishing a link with a data provider to provide data service.
The step of submitting the virtual data request to a thread pool, and after establishing a link with a data provider, further comprises the steps of:
in response to an actual data request, a data service is provided based on the link with the data provider.
The method of the instance where the actual data request corresponds to the virtual data request.
The examples and the methods of the examples are obtained from a configuration file.
The configuration file comprises an instance of a database connection operation and a method of the instance of the database connection operation, and an instance of the middleware and a method of the instance of the middleware.
The method for executing the example by combining the parameter entering values of the method, and constructing a virtual data request comprises the following steps:
and executing the method of the example through a reflection method, and transmitting the input parameter value of the method to construct the virtual data request.
The submitting the virtual data request to a thread pool, establishing a link with a data provider, includes:
and synchronously or asynchronously submitting the virtual data request to a thread pool, and establishing a link with a data provider.
According to a second aspect of an embodiment of the present invention, there is provided an apparatus for providing a data service, including:
the acquisition module is used for monitoring that an application system for providing services externally is started and acquiring an array of virtual hash sub-library sub-table main keys according to a routing forwarding rule;
the parameter module is used for constructing a parameter entering value of a method of the instance according to the array of the Ha Xifen base sub-table main key and the parameter entering type of the method of the instance;
the request module is used for executing the method of the instance by combining the parameter entering value of the method and constructing a virtual data request;
and the establishing module is used for submitting the virtual data request to a thread pool and establishing a link with a data provider so as to provide data service.
According to a third aspect of an embodiment of the present invention, there is provided an electronic device that provides a data service, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the methods as described above.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program which when executed by a processor implements a method as described above.
One embodiment of the above invention has the following advantages or benefits: monitoring that an application system for providing services externally is started, and acquiring an array of virtual hash sub-library sub-table main keys according to a routing forwarding rule; establishing an entry parameter value of an instance method according to an array of the Ha Xifen base sub-table main key and the entry parameter type of the instance; executing an instance method by combining the parameter entering value of the method, and constructing a virtual data request; the virtual data request is submitted to a thread pool, and a link is established with a data provider to provide a data service. Since the data service can be directly provided without establishing a connection with the data provider after receiving the actual data request, the time consumption of the first operation can be reduced.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main flow of a method of providing data services according to an embodiment of the present invention;
FIG. 2 is a flow diagram of constructing a virtual data request according to an embodiment of the invention;
FIG. 3 is a flow diagram of a prior art providing data services;
FIG. 4 is a schematic flow diagram of providing data services according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a main structure of an apparatus for providing a data service according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 7 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Since the first operation is extremely time-consuming, it is full of all business threads, and there are no available threads to the data caller. Thus, thread pool exhaustion may be induced, and alert information may be sent to the data caller, resulting in a particularly poor experience for the data caller.
Sometimes, when a service is online, a system of a data calling party feeds back an alarm message, and some services are open to the outside and are not good for merchant experience related to service calling.
In order to solve the problem that the time consumption of the first operation is extremely long, the following technical scheme in the embodiment of the invention can be adopted.
Referring to fig. 1, fig. 1 is a schematic diagram of a main flow of a method for providing a data service according to an embodiment of the present invention, by constructing a virtual data request, a link with a data provider is established to provide the data service. As shown in fig. 1, the method specifically comprises the following steps:
s101, monitoring that an application system for providing services externally is started, and acquiring an array of virtual hash sub-library sub-table main keys according to a routing forwarding rule.
In the embodiment of the invention, the time consumption of the first operation is considered to be particularly long, because a link with a data provider needs to be established in the process of the first operation. Then, the virtual data request can be used for establishing the link with the data provider, and under the condition that the actual data request is received, the data service can be directly provided without establishing the link with the data provider, so that the time consumption of the first operation can be reduced.
Specifically, the technical solution in the embodiment of the present invention may be executed after the application system is completely started. Moreover, the technical scheme in the embodiment of the invention is only executed once after the application system is completely started, and the operation with the application system is executed asynchronously. In this way, a link is established with the data provider through the virtual data request without affecting the normal use of the application system.
In the embodiment of the present invention, an application system may be understood as an application software, that is, an application software that provides services externally.
In one embodiment of the present invention, when an application system for providing external services is started, the method triggers the acquisition of an array of virtual hash score table primary keys according to a routing forwarding rule. Wherein, the start-up may include a first start-up and a restart.
As an example, an event may be triggered after an application system has been started, and when the trigger event is monitored, it is known that the application system has been started for the first time.
In the embodiment of the invention, the routing forwarding rule can be preset. Specifically, the routing forwarding rule is a rule for selecting an optimal path according to information in a routing table and forwarding data. Then, an array of virtual hash score table primary keys may be obtained based on the routing forwarding rules. The array is not an array related to the actual data request, but an array obtained by carrying out hash operation on a virtual sub-base sub-table main key.
The virtual data request can be constructed using an array of virtual hash partition table primary keys.
S102, establishing an entry parameter value of an instance method according to the array of the virtual hash partition table main key and the entry parameter type of the instance.
Methods involving the instance and the entry values of the instance are required in constructing the virtual data request. A class is an abstract template, such as a Student class. And an instance is a specific object created from classes, each having the same method.
In the embodiment of the invention, the designated examples and the methods of the examples are acquired through dynamic configuration files. That is, the instances and methods of the instances are stored in a configuration file, and the configuration file is dynamic. That is, the configuration file includes instances and methods of the instances that are not one-to-one.
In one embodiment of the invention, the configuration file includes an instance of the database connection operation and a method of the instance of the database connection operation, and a method of the instance of the middleware and the instance of the middleware.
That is, for the case where the data provider is a database, the configuration file includes an instance of the database connection operation and a method of the instance of the database connection operation. In this way, a link is established with the database.
For the case where the data provider is a middleware, the configuration file includes an instance of the middleware and a method of the instance of the middleware. In this way, a link is established with the middleware. Data can be interacted with other databases through middleware.
In an embodiment of the present invention, a configuration file includes a plurality of instances and methods of the instances. The method parameters of the instance that needs to be initialized are selected based on the actual requirements. The method of the instance can be a query operation or a newly developed operation, etc.
In an embodiment of the invention, the data provider comprises a database and/or middleware. That is, the technical solution of the embodiment of the present invention is not only applicable to databases, but also to middleware. As one example, middleware may be JDDL, ES middleware, redis cache, and the like. JDDL is a middleware for seed-pool-table separation. ElasticSearch (ES) is a highly extended distributed search server based on Lucene.
Referring to fig. 2, fig. 2 is a schematic flow chart of constructing a virtual data request according to an embodiment of the present invention, and specifically includes the following steps:
s201, initializing a parameter array.
An initialization operation is required before the parameterization of the method of the build instance.
As an example, a set of parameter arrays may be initialized according to the number of parameters of the method of the instance, where the parameter types in the parameter arrays need to conform to the method entry types of the instance.
That is, initializing a set of parameter arrays, wherein the number of parameters is the same as that of the example method; the parameter type is the same as the parameter type of the method of the instance. The purpose of the initialization is to build the entry value of the instance method.
S202, establishing an entry parameter of the method of the instance according to the array of the virtual hash sub-table main key and the initialized parameter array.
The number of parameters of the initialized parameter array is the same as that of the method of the example, and the parameter type of the initialized parameter array is the same as that of the method of the example.
The method for constructing an instance is based on an array of virtual hash index primary keys and an initialized array of parameters. In the case of constructing multiple input parameter values, the array of the primary keys and an initialized parameter array may be divided according to a circular virtual hash score table.
Thus, according to the technical solution in the embodiment of fig. 2, the parameter values of the method of the embodiment are constructed.
In one embodiment of the invention, a virtual data request is constructed, the method of the instance can be executed by a reflection method, and the input parameter value of the method is input to construct the virtual data request.
Reflection is a computer processing method. There is the ability for a program to access, detect and modify its own state or behavior. Objects of the type of the wrapper set can be provided. All resources related to the instance can be obtained through a reflection method.
S103, combining the parameter entering value of the method, executing the method of the instance, and constructing the virtual data request.
Thus, the instance method type, and the instance method's parametrics are all known, then a virtual data request may be constructed. That is, the method of the instance is executed in combination with the entry parameter of the method of the instance, and a virtual data request is constructed.
S104, submitting the virtual data request to a thread pool, and establishing a link with a data provider to provide data service.
As one example, a set of thread pools is initialized and virtual data requests for each execution build may be committed to the thread pools. The default number of thread pools may be preset, for example: the default number of thread pools is 100.
In embodiments of the present invention, virtual data requests may be synchronously submitted to a thread pool or asynchronously submitted to a thread pool. Because of synchronously submitting the virtual data requests, the number of the virtual data requests in the thread pool is large, and the normal operation of the main thread can be influenced.
Asynchronous submission of virtual data requests, i.e., asynchronous submission of virtual data requests into a thread pool, may then be employed to establish links with data providers to improve efficiency.
Virtual data requests are asynchronously submitted to the thread pool. The virtual data request is executed in a task queue of the thread pool, and the task is executed asynchronously for the main thread, and does not block the continued execution of the main thread. And the normal operation of the main thread is further ensured because the main thread and a plurality of virtual data requests do not need to be processed at the same time.
The virtual data request is submitted to the thread pool, and the virtual data request is executed in a task queue of the thread pool to establish a link with the data provider.
The virtual data request is established by a method of executing class examples in which a link is established with a data provider in an interaction with the data provider.
In one embodiment of the invention, a data service is provided based on a link with a data provider in response to an actual data request. .
After receiving the actual data request, the service is released online to provide the data service by directly adopting a link with the data provider in order to process the actual data request. Wherein the actual data request corresponds to the same instance as the virtual data request.
It is understood that the virtual data request is established based on an instance-based approach. After establishing a link with a data provider according to the virtual data request, for the actual data request of the method of the same instance as the virtual data request, the service release can be online without establishing a link with the data provider, so that the time consumption of the first operation is reduced.
In the above embodiment, the application system for monitoring the external service is started, and the array of the virtual hash sub-library sub-table main key is obtained according to the routing forwarding rule; establishing an entry parameter value of an instance method according to an array of the Ha Xifen base sub-table main key and the entry parameter type of the instance; executing an instance method by combining the parameter entering value of the method, and constructing a virtual data request; the virtual data request is submitted to a thread pool, and a link is established with a data provider to provide a data service. Since the link with the data provider is established in advance, the data service can be directly provided, and thus the time consumption of the first operation can be reduced.
The virtual data request constructed by the method is sent to a data provider, so that an application system can be preheated. And the service quality is improved. The first time an actual data request is sent, the service user is not aware of the actual data request, and the service user is also not aware of the merchant side. The method solves the problem of unstable service, such as overtime, and the like, which is caused by the prior occurrence of thread pool exhaustion. And the experience of a merchant terminal and a service user is greatly improved.
Referring to fig. 3, fig. 3 is a schematic diagram of a conventional flow of providing a data service. It is understood that the application system may receive the actual data request. An application system may be understood as software that provides data services externally through actual data requests.
The application system starts to initialize. In response to an actual data request, the service issues an online. In the process of service release online, a link with a data provider is established, and then service release online is realized.
In fig. 3, the first operation is particularly time consuming, since a link to the data provider needs to be established.
Referring to fig. 4, fig. 4 is a schematic flow chart of providing a data service according to an embodiment of the present invention, and the technical solution of fig. 4 is different from that of fig. 3 in that a preheating step is added.
The application system in fig. 4 may adopt the technical solution in the embodiment of the present invention. The application system starts to initialize.
And according to the array of the Ha Xifen base sub-table main key and the method parameter entry type of the instance, constructing the parameter entry value of the method of the instance, and further constructing the virtual data request.
In the process of preheating, the virtual data request is submitted to a thread pool, and a link with a data provider is established.
And further, in the process of service release online, responding to the actual data request, and providing data service based on the link with the data provider so as to realize service release online.
As one example, the database is accessed through JDDL middleware client. The database is divided into database and table, and the redis cache is used in the application system as a method for improving the query performance. By implementing the scheme in the embodiment of the invention in the application system, the time consumption of the first operation can be reduced.
In the above-described embodiment, the link with each data provider is established in advance. When the application system is started, only a link pool of the database is initialized, no links are actually created with each data provider, and no actual data interaction occurs. It may be necessary to establish a link with each data provider when accessing the actual data request.
Establishing a link with each data provider is actually time-consuming, simulating an actual data request through a virtual data request, establishing a link with the data provider in advance, performing data interaction, enabling the application system just started to reach the same state as the running application system, and then issuing the application system online.
Referring to fig. 5, fig. 5 is a schematic diagram of a main structure of an apparatus for providing a data service according to an embodiment of the present invention, the apparatus for providing a data service may implement a method for providing a data service, and as shown in fig. 5, the apparatus for providing a data service specifically includes:
an obtaining module 501, configured to monitor that an application system that provides a service to the outside is started, and obtain an array of virtual hash score table primary keys according to a routing forwarding rule;
a parameter module 502, configured to construct a parameter entry value of the method of the instance according to the array of the Ha Xifen base sub-table main key and the parameter entry type of the method of the instance;
a request module 503, configured to execute the method of the instance in combination with the parameter entry value of the method, and construct a virtual data request;
and the establishing module 504 is configured to submit the virtual data request to a thread pool, and establish a link with a data provider to provide a data service.
In one embodiment of the invention, the build model 504 is further configured to provide data services based on the links to the data providers in response to actual data requests. .
In one embodiment of the invention, the actual data request corresponds to the same instance of the virtual data request.
In one embodiment of the invention, the instance and the method of the instance are obtained from a configuration file.
In one embodiment of the invention, the configuration file includes a method of an instance of a database connection operation and an instance of a database connection operation, and a method of an instance of a middleware and an instance of a middleware.
In one embodiment of the present invention, the request module 503 is specifically configured to execute the method of the instance by a reflection method, and enter the parameter value of the method to construct a virtual data request.
In one embodiment of the present invention, the establishing module 504 is specifically configured to asynchronously submit the virtual data request to the thread pool to establish a link with the data provider.
Fig. 6 illustrates an exemplary system architecture 600 to which a method of providing a data service or an apparatus of providing a data service of an embodiment of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 is used as a medium to provide communication links between the terminal devices 601, 602, 603 and the server 605. The network 604 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 605 via the network 604 using the terminal devices 601, 602, 603 to receive or send messages, etc. Various communication client applications such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 601, 602, 603.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 605 may be a server providing various services, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using terminal devices 601, 602, 603. The background management server may analyze and process the received data such as the product information query request, and feedback the processing result (e.g., the target push information, the product information—only an example) to the terminal device.
It should be noted that, the method for providing a data service according to the embodiment of the present invention is generally performed by the server 605, and accordingly, the device for providing a data service is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, there is illustrated a schematic diagram of a computer system 700 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, ROM 702, and RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is mounted into the storage section 708 as necessary.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 701.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, 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 some 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 or flowchart illustration, and combinations of blocks in the block diagrams 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.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes an acquisition module, a parameter module, a request module, a setup module, and a service module. The names of these modules do not in some cases limit the unit itself, for example, the acquisition module may also be described as "an array for acquiring a virtual hash score table primary key according to the route forwarding rule".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include:
monitoring that an application system for providing services externally is started, and acquiring an array of virtual hash sub-library sub-table main keys according to a routing forwarding rule;
establishing a parameter entering value of a method of an instance according to the array of the Ha Xifen base sub-table main key and the parameter entering type of the method of the instance;
executing the method of the instance by combining the parameter entering value of the method, and constructing a virtual data request;
and submitting the virtual data request to a thread pool, and establishing a link with a data provider to provide data service.
According to the technical scheme of the embodiment of the invention, the application system for providing the service to the outside is monitored to be started, and the array of the virtual hash sub-library sub-table main key is obtained according to the routing forwarding rule; establishing an entry parameter value of an instance method according to an array of the Ha Xifen base sub-table main key and the entry parameter type of the instance; executing an instance method by combining the parameter entering value of the method, and constructing a virtual data request; the virtual data request is submitted to a thread pool, and a link is established with a data provider to provide a data service. Since the data service can be directly provided without establishing a connection with the data provider after receiving the actual data request, the time consumption of the first operation can be reduced.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (8)

1. A method of providing data services, comprising:
monitoring that an application system for providing services externally is started, and acquiring an array of virtual hash sub-library sub-table main keys according to a routing forwarding rule;
establishing a parameter entering value of a method of an instance according to the array of the Ha Xifen base sub-table main key and the parameter entering type of the method of the instance;
executing the method of the instance by combining the parameter entering value of the method, and constructing a virtual data request;
submitting the virtual data request to a thread pool, and establishing a link with a data provider to provide data service;
the step of submitting the virtual data request to a thread pool, and after establishing a link with a data provider, further comprises the steps of:
providing a data service based on the link with the data provider in response to the actual data request;
the method of the instance where the actual data request corresponds to the virtual data request.
2. The method of providing data services according to claim 1, wherein said instance and said instance's method are obtained from a configuration file.
3. The method of providing data services according to claim 2, wherein the configuration file includes a method of an instance of a database connection operation and an instance of a database connection operation, and a method of an instance of a middleware and an instance of a middleware.
4. The method of providing data services according to claim 1, wherein said executing said instance method in combination with said method's entry parameter, constructs a virtual data request comprising:
and executing the method of the example through a reflection method, and transmitting the input parameter value of the method to construct the virtual data request.
5. The method of providing data services according to any one of claims 1 to 4, wherein submitting the virtual data request into a thread pool, establishing a link with a data provider, comprises:
and asynchronously submitting the virtual data request to a thread pool, and establishing a link with a data provider.
6. An apparatus for providing data services, comprising:
the acquisition module is used for monitoring that an application system for providing services externally is started and acquiring an array of virtual hash sub-library sub-table main keys according to a routing forwarding rule;
the parameter module is used for constructing a parameter entering value of a method of the instance according to the array of the Ha Xifen base sub-table main key and the parameter entering type of the method of the instance;
the request module is used for executing the method of the instance by combining the parameter entering value of the method and constructing a virtual data request;
the establishing module is used for submitting the virtual data request to a thread pool, and establishing a link with a data provider so as to provide data service;
and means for providing a data service based on the link with the data provider in response to an actual data request corresponding to the same instance as the virtual data request.
7. An electronic device for providing data services, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-5.
8. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-5.
CN202011159671.4A 2020-10-26 2020-10-26 Method, apparatus, device and computer readable medium for providing data service Active CN113760886B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011159671.4A CN113760886B (en) 2020-10-26 2020-10-26 Method, apparatus, device and computer readable medium for providing data service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011159671.4A CN113760886B (en) 2020-10-26 2020-10-26 Method, apparatus, device and computer readable medium for providing data service

Publications (2)

Publication Number Publication Date
CN113760886A CN113760886A (en) 2021-12-07
CN113760886B true CN113760886B (en) 2023-09-01

Family

ID=78785868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011159671.4A Active CN113760886B (en) 2020-10-26 2020-10-26 Method, apparatus, device and computer readable medium for providing data service

Country Status (1)

Country Link
CN (1) CN113760886B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107040416A (en) * 2017-04-12 2017-08-11 大连理工大学 A kind of virtual data center visual management method based on Cairngorm frameworks
CN111367983A (en) * 2020-03-10 2020-07-03 中国联合网络通信集团有限公司 Database access method, system, device and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2109965B1 (en) * 2007-02-02 2015-04-08 Groupe Des Ecoles Des Telecommunications (GET) Institut National Des Telecommunications (INT) Autonomic network node system
US9400669B2 (en) * 2013-01-16 2016-07-26 International Business Machines Corporation Virtual appliance chaining and management

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107040416A (en) * 2017-04-12 2017-08-11 大连理工大学 A kind of virtual data center visual management method based on Cairngorm frameworks
CN111367983A (en) * 2020-03-10 2020-07-03 中国联合网络通信集团有限公司 Database access method, system, device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种时延约束下可靠性保证的服务功能链部署方法;孙士清;彭建华;游伟;;计算机应用研究(第08期);全文 *

Also Published As

Publication number Publication date
CN113760886A (en) 2021-12-07

Similar Documents

Publication Publication Date Title
CN110019350B (en) Data query method and device based on configuration information
CN109844727B (en) Techniques for managing application configuration and associated credentials
CN109245908B (en) Method and device for switching master cluster and slave cluster
WO2021023149A1 (en) Method and apparatus for dynamically returning message
CN111478781B (en) Message broadcasting method and device
CN112491617B (en) Link tracking method, device, electronic equipment and medium
CN113282589A (en) Data acquisition method and device
CN111831503B (en) Monitoring method based on monitoring agent and monitoring agent device
CN113760886B (en) Method, apparatus, device and computer readable medium for providing data service
CN109981546B (en) Method and device for acquiring remote call relation between application modules
CN111786801B (en) Method and device for charging based on data flow
CN112559001B (en) Method and device for updating application
CN112579447A (en) Browser testing method and device
CN113556370A (en) Service calling method and device
CN109213815B (en) Method, device, server terminal and readable medium for controlling execution times
CN113495747B (en) Gray scale release method and device
CN112131095A (en) Pressure testing method and device
CN113111119B (en) Method and device for operating data
CN117131302A (en) Service page generation method and device
CN117807027A (en) Log query method and device
CN113452739A (en) Message processing method and device
CN114357334A (en) Model access method and device, storage medium and computer equipment
CN117336208A (en) Method, apparatus, device and computer readable medium for monitoring link
CN114528212A (en) Method, apparatus, device and computer readable medium for providing test data
CN117762521A (en) Method and device for generating flow control configuration file and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant