CN111131040A - Route configuration method, device and system, storage medium and electronic device - Google Patents

Route configuration method, device and system, storage medium and electronic device Download PDF

Info

Publication number
CN111131040A
CN111131040A CN201911206698.1A CN201911206698A CN111131040A CN 111131040 A CN111131040 A CN 111131040A CN 201911206698 A CN201911206698 A CN 201911206698A CN 111131040 A CN111131040 A CN 111131040A
Authority
CN
China
Prior art keywords
service
database
server
servers
target
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
CN201911206698.1A
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.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN201911206698.1A priority Critical patent/CN111131040A/en
Publication of CN111131040A publication Critical patent/CN111131040A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/30Routing of multiclass traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a method, a device and a system for configuring a route, a storage medium and an electronic device. Wherein, the method comprises the following steps: acquiring a target service request sent by service equipment, wherein the target service request is used for the service equipment to request to acquire a service provided by a target service; responding to a target service request, searching a first server which is connected with a first database from a plurality of servers, wherein the first database is a database which bears service provided by the target service in the plurality of databases; and establishing a service route between the service equipment and the first database by using the first server, wherein the service route is used for the service equipment to acquire the service provided by the target service. The method and the device solve the technical problem of low service response speed in the related technology.

Description

Route configuration method, device and system, storage medium and electronic device
Technical Field
The present application relates to the field of internet, and in particular, to a method, an apparatus, a system, a storage medium, and an electronic apparatus for configuring a route.
Background
MySQL is a popular Relational Database Management System, and is one of the best RDBMS (Relational Database Management System) application software in terms of WEB application. The ORACLE database system is a group of software products taking a distributed database as a core, is one of databases of CLIENT/SERVER (CLIENT/SERVER) or B/S system structures which are commonly used at present, for example, SilverStream is a middleware based on the database, and is a database management system which is widely used at present and is used as a general database system, and has a complete data management function; as a relational database, it is a complete relational product; it implements distributed processing functions as a distributed database.
In selecting the database, from the perspective of stability and efficiency, some enterprise-level applications in the internet may use a paid relational database (e.g., ORACLE), but considering that the cost of using the paid relational database is high, in order to save the cost, some application-level developments in the internet may select to use an open-source relational database (e.g., MySQL), but using the open-source relational database may cause the service to be affected by the reasons of small concurrency of the database, high server pressure, and the like, resulting in a long response time of the service response.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a method, a device and a system for configuring a route, a storage medium and an electronic device, so as to at least solve the technical problem of slow service response speed in the related art.
According to an aspect of an embodiment of the present application, there is provided a method for configuring a route, including: acquiring a target service request sent by service equipment, wherein the target service request is used for the service equipment to request to acquire a service provided by a target service; responding to a target service request, searching a first server which is connected with a first database from a plurality of servers, wherein the first database is a database which bears service provided by the target service in the plurality of databases; and establishing a service route between the service equipment and the first database by using the first server, wherein the service route is used for the service equipment to acquire the service provided by the target service.
According to another aspect of the embodiments of the present application, there is also provided a device for configuring a route, including: the system comprises an acquisition unit, a service device and a service processing unit, wherein the acquisition unit is used for acquiring a target service request sent by the service device, and the target service request is used for the service device to request to acquire a service provided by a target service; the searching unit is used for responding to the target service request and searching a first server which is connected with a first database from a plurality of servers, wherein the first database is a database which bears the service provided by the target service in the plurality of databases; and the routing unit is used for establishing a service route between the service equipment and the first database by using the first server, wherein the service route is used for acquiring the service provided by the target service by the service equipment.
According to another aspect of the embodiments of the present application, there is also provided a system for configuring a route, including: the service equipment is used for sending a target service request, wherein the target service request is used for requesting to acquire a service provided by a target service by the service equipment; the system comprises a plurality of servers and a plurality of databases, wherein the databases are databases of a plurality of services, and the databases are connected with the servers in the plurality of servers, wherein the services comprise target services; and the service layer is used for searching a first server which is connected with the first database from the plurality of servers under the condition of receiving the target service request, and establishing a service route between the service equipment and the first database by using the first server, wherein the first database is a database which bears the service provided by the target service in the plurality of databases, and the service route is used for the service equipment to obtain the service provided by the target service.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program which, when executed, performs the above-described method.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the above method through the computer program.
In the embodiment of the application, after acquiring a target service request sent by a service device, a service layer searches a first server connected with a first database from a plurality of servers, and establishes a service route between the service device and the first database by using the first server, in other words, route pre-routing is realized without using a server to calculate the route, so that the consumption of calculation resources of the server is reduced, the server can concentrate resources on service response, the technical problem of slow service response speed in the related art can be solved, and the technical effect of improving the service response speed is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic diagram of a hardware environment of a configuration method of a route according to an embodiment of the present application;
fig. 2 is a flow chart of an alternative route configuration method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an alternative routing scheme in the related art;
FIG. 4 is a schematic diagram of an alternative routing scheme according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an alternative service layer in the related art;
FIG. 6 is a schematic diagram of an alternative service layer according to an embodiment of the present application;
FIG. 7 is a schematic illustration of an alternative process monitoring according to an embodiment of the present application;
FIG. 8 is a schematic diagram of an alternative routing configuration apparatus according to an embodiment of the present application;
and
fig. 9 is a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of embodiments of the present application, an embodiment of a method for configuring a route is provided.
Optionally, in this embodiment, the configuration method of the route may be applied to a configuration system of a route composed of the service device 101, the service layer 103, the server 105, and the database 107 as shown in fig. 1, where the server 105 is connected to the database 107, and the service layer 103 is connected to the service device 101 and the server 105 through a network, where the service device is configured to send a target service request, and the service device obtains a service provided by a target service through the request; the multiple databases are databases of multiple services, the multiple databases are connected with servers in the multiple servers, the service layer searches a first server connected with a first database (a database bearing service provided by the target service) from the multiple servers under the condition that the target service request is received, a service route between the service equipment and the first database is established by using the first server, and the service equipment acquires the service provided by the target service through the service route. Such networks include, but are not limited to: the service device 101 is not limited to a PC, a mobile phone, a tablet computer, etc. in a wide area network, a metropolitan area network, or a local area network.
The routing configuration method in the embodiment of the present application may be executed by the service layer 103, or may be executed by the service layer 103 together with the service device 101 and the server 105. Fig. 2 is a flowchart of an optional route configuration method according to an embodiment of the present application, and as shown in fig. 2, the method may include the following steps:
step S202, a target service request sent by a service device is obtained, where the target service request is used for the service device to request to obtain a service provided by the target service.
Step S204, in response to the target service request, searching a first server connected to a first database from the multiple servers, where the first database is a database of the service provided by the target service and loaded in the multiple databases.
The server may be a virtual server (such as a virtual machine) or an entity server, and the database may be a database of MySQL, SqlServer, Access, or the like.
Step S206, a service route between the service device and the first database is established by using the first server, and the service route is used for the service device to obtain the service provided by the target service.
In the related technology, a service route is calculated on a server, and the server also needs to bear tasks of keeping connection with all databases, requesting access and response, and the like, but in the technical scheme of the application, through the steps, after a service layer obtains a target service request sent by service equipment, a first server connected with a first database is searched from a plurality of servers, and the first server is used for establishing the service route between the service equipment and the first database, in other words, the route preposition is realized, and the server is not used for calculating the route, so that the consumption of calculation resources of the server is reduced, resources can be concentrated on service response by the server, the technical problem of slow service response speed in the related technology can be solved, and the technical effect of improving the service response speed is further achieved.
The application provides a RPC routing scheme, namely interface layer routing, which can also be understood as routing preposition, so that database connection (database number × example number) can be reduced, and calculation based on a memory storage (matching according to rules, such as matching according to marketing activity rules) fixed data structure can be reduced. The technical solution of the present application is further detailed below with reference to the steps shown in fig. 2.
In the technical solution provided in step S202, the service layer obtains a target service request sent by the service device.
The routing scheme in the related art is shown in fig. 3 (i.e. one of RPC routing application scenarios), the number of database connections may be split, taking the database as MySQL as an example, for example, DB _1 represents a database server with 1 node in the database cluster, and numeral 9 under a virtual machine represents that the group has 9 virtual machines, and the database cluster may have 6 nodes in total (database DB _1 to database DB _6), so each database server has 54 links (i.e. the number of nodes of the database cluster is 6 times the number of virtual machines of a group is 9), because of common routing, when the number of virtual machines in a group increases to n, the number of connections is 6 × n, and the MySQL database has a limited concurrency. Because each database is connected with all servers (such as virtual machines, as shown in fig. 3), each database almost consumes the connection number, if the application strongly depends on the database, the concurrent processing capability of the application is limited by the processing capability of the database, so that the bottleneck of the database becomes the processing bottleneck of the application, and the high-performance requirement of a calling end cannot be met; and each server needs to be connected with all databases, and the resources of the server are consumed.
In view of the above drawbacks, in the technical solution of the present application, as shown in fig. 4, before acquiring the target service request sent by the service device, connections may be established in advance between each database (e.g., database DB _1 in fig. 4, and the like, similarly to the above, numeral 9 under a virtual machine indicates that the group has 9 virtual machines, numeral 9 under DB _1 indicates that there are 9 links with the virtual machine) in the plurality of databases and a part of servers (e.g., virtual machines, as shown in fig. 4), that is, each database is connected with at least several servers (but not all servers, as shown in fig. 4, each database is connected with only 1 virtual machine group, and the number of virtual machines in the virtual machine group is greater than or equal to 1, as 9), so that the number of connections of the databases may be reduced, and resource consumption of each server may be reduced.
Alternatively, in order to ensure efficient and high-utilization operation of the whole system, the servers can be increased or decreased according to actual needs, for example, after connection is established between each database in the plurality of databases and some servers in the plurality of servers, considering that the pressure of the databases is changed, the matched servers can also be changed accordingly: under the condition that a second database exists in a plurality of databases, establishing connection between the second database and a second server in the plurality of servers, and updating a connection relation between the second database and the server stored in a service layer (the number of the service layers can be a plurality of) which is more than a first threshold (for example, 85%) and the utilization rate of the server which establishes connection with the second database exceeds the first threshold, in other words, the new or redundant second server can be accessed to reduce the pressure of other servers, and the mechanism can be operated at a fixed time (for example, operated once every 10 minutes) or triggered under a certain condition (for example, triggered after each new connection is established or triggered after 10000 times of connection is established cumulatively); in the case that a third database exists in the plurality of databases (for example), the third database is disconnected with a third server in the plurality of servers, and the connection relation between the third database and the server stored by the service layer is updated, the utilization of the third servers with which the third database has been established is below a second threshold, which is below the first threshold, for example 45%, in other words, in the case of low utilization, part of the servers may be recovered, and specifically, the connection assumed by one or more of the servers (i.e., the third server) may be transferred to another server, the service is quitted after the completion of the rotation, and as a redundant server, the mechanism can be run regularly (for example, run once every 20 minutes), or can be triggered under certain conditions (for example, triggered after each new connection is disconnected, or triggered after 10000 times of disconnection are accumulated).
In the technical solution of the present application, the service layers calculate routes, the number of the service layers is multiple, and if the service device can send a service request to any one of the multiple service layers, as shown in fig. 5, it may cause that the pressure of some service layers is too high, and the pressure of other service layers is less. Therefore, before acquiring a target service request sent by a service device, an association between each of a plurality of service layers and an account type (the account type may be determined by account characteristics, such as a common account, a VIP account, and the like) may be established, as shown in fig. 6, the service layer after establishing the association with an account type is used for receiving the service request sent by the account of the account type, so as to reasonably disperse the pressure borne by the service layer, and avoid that the pressure of a single service layer is too large, for example, all active numbers (information corresponding to a service account) are stored in a corresponding group in a memory group according to the account type, instead of being stored in all memory instances, so that the memory may be expanded as needed.
In the technical scheme of the application, an association relationship between an account type and a service layer can be established at a calling end of a service, so that the calling end automatically sends a service request to a corresponding target service layer, when the target service request sent by service equipment is acquired, the target service request sent by the service equipment can be received in the target service layer of a plurality of service layers, each service layer of the plurality of service layers is used for receiving the service request sent by the service account of one account type, the service account is an account used in the target service and logged on the service equipment, the target service request is a service request sent by the service equipment by using a target interface, and the target interface is used for forwarding the service request to the service layer matched with the account type according to the account type of the account carried in the service request.
Optionally, each account type may correspond to one or more (but not all) of the multiple service layers, and in a period of time, if the utilization rate of the service layer corresponding to a certain account type is greater than a third threshold (e.g., 90%), a new service layer is accessed for the account type to reduce the pressure of the service layer corresponding to the account type, and the corresponding relationship between the account type and the service layer is updated at the calling end. If the utilization rate of the service layer corresponding to a certain account type is smaller than a fourth threshold (smaller than a third threshold, such as 30%) within a period of time, reducing the number of the service layers accessed for the account type to reduce the number of the service layers corresponding to the account type, and updating the corresponding relationship between the account type and the service layers at the calling end.
In the technical solution provided in step S204, when a first server connected to a first database is searched from a plurality of servers, a candidate server connected to the first database may be searched from the plurality of servers; a first server is selected from the candidate servers.
Optionally, when the first server is selected from the candidate servers, if there are multiple candidate servers, in order to ensure load balancing of each candidate server: the utilization rate of each server in the candidate servers can be obtained; and selecting the server with the lowest utilization rate from the candidate servers as the first server.
In the technical solution provided in step S206, a service route between the service device and the first database is established by using the first server, and the service device may access the database through the service route.
As an alternative embodiment, taking a monitoring system applied to a user business behavior process as an example, the monitoring system collects business behavior data and stores the business behavior data in the monitoring system (i.e. a database) so as to facilitate analysis of the data process and real-time monitoring of the user behavior link. Because of numerous business systems and long behavior flow data, the data storage requirement is difficult to meet according to the conventional database storage mode according to the statistics of billions of data storage per day.
Step 1, in order to meet the service requirements after RPC routing is adopted, a system is configured in advance, and each database is only connected with a part of servers (different from all databases connected in the related technology); the users are allocated in groups (account types), each group corresponding to one or more service layers.
And 2, when a request of the user side is received, calculating a route between the second layer and the third layer (namely between the server and the calling side) in advance (instead of calculating between the first layer and the second layer).
By modifying a database routing mode, user service behavior data starts to be routed when RPC calls are carried out, so that the fact that the group A users are only routed to the database A, the group B users are only routed to the database B and the like is guaranteed, and the calling pressure and the database storage pressure are relieved. And after the subsequent data are increased, the control mode only needs to add the libraries in sequence, and old data do not need to be migrated.
And step 3, schematically monitoring the process, as shown in fig. 7, performing data analysis on a large amount of stored data, and displaying analysis results in real time, such as results of the node 2, the node 3, and the nodes a to g.
By adopting the technical scheme of the application, the response speed of the system can be improved through the front-end routing, and the unlimited expansion requirement of the system is met.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
According to another aspect of the embodiment of the present application, there is also provided a routing configuration apparatus for implementing the routing configuration method. Fig. 8 is a schematic diagram of an alternative routing configuration apparatus according to an embodiment of the present application, and as shown in fig. 8, the apparatus may include:
an obtaining unit 801, configured to obtain a target service request sent by a service device, where the target service request is used for the service device to request to obtain a service provided by a target service;
a searching unit 803, configured to search, in response to the target service request, a first server that is connected to a first database from among the multiple servers, where the first database is a database that carries a service provided by the target service among the multiple databases;
a routing unit 805, configured to establish a service route between the service device and the first database by using the first server, where the service route is used for the service device to obtain a service provided by the target service.
It should be noted that the obtaining unit 801 in this embodiment may be configured to execute the step S202 in this embodiment, the searching unit 803 in this embodiment may be configured to execute the step S204 in this embodiment, and the routing unit 805 in this embodiment may be configured to execute the step S206 in this embodiment.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
In the related technology, a service route is calculated on a server, and the server also needs to bear tasks of keeping connection with all databases, requesting access and response, and the like, but in the technical scheme of the application, through the steps, after a service layer obtains a target service request sent by service equipment, a first server connected with a first database is searched from a plurality of servers, and the first server is used for establishing the service route between the service equipment and the first database, in other words, the route preposition is realized, and the server is not used for calculating the route, so that the consumption of calculation resources of the server is reduced, resources can be concentrated on service response by the server, the technical problem of slow service response speed in the related technology can be solved, and the technical effect of improving the service response speed is further achieved.
Optionally, the apparatus further comprises: a configuration unit, configured to establish a connection between each of the plurality of databases and a part of the plurality of servers before searching for a first server having established a connection with the first database from the plurality of servers; the searching unit is also used for searching a candidate server which is connected with the first database from the plurality of servers; a first server is selected from the candidate servers.
Optionally, the lookup unit may be further configured to: acquiring the utilization rate of each server in the candidate servers; and selecting the server with the lowest utilization rate from the candidate servers as the first server.
Optionally, the configuration unit may be further configured to: after connection is established between each database in the plurality of databases and part of servers in the plurality of servers, in the case that a second database exists in the plurality of databases, connection between the second database and a second server in the plurality of servers is established, and the connection relation between the second database and the servers stored by the service layer is updated, wherein the utilization rates of the servers which are connected with the second database exceed a first threshold value; and under the condition that a third database exists in the plurality of databases, releasing the connection between the third database and a third server in the plurality of servers, and updating the connection relation between the third database and the server stored by the service layer, wherein the utilization rate of the third server connected with the third database is lower than a second threshold value, and the second threshold value is lower than the first threshold value.
Optionally, the obtaining unit may be further configured to: the method comprises the steps that a target service request sent by service equipment is received in a target service layer in a plurality of service layers, wherein each service layer in the plurality of service layers is used for receiving the service request sent by an account of one account type, the service account is an account used in target service and logged on the service equipment, the target service request is a service request sent by the service equipment by using a target interface, and the target interface is used for forwarding the service request to the service layer matched with the account type according to the account type of the account carried in the service request.
Optionally, the configuration unit may be further configured to: before a target service layer in a plurality of service layers receives a target service request sent by service equipment, establishing association between each service layer in the plurality of service layers and an account type, wherein the service layer after establishing the association with the account type is used for receiving the service request sent by the account of the account type.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
According to another aspect of the embodiment of the present application, there is also provided a server or a terminal for implementing the configuration method of the routing.
Fig. 9 is a block diagram of a terminal according to an embodiment of the present application, and as shown in fig. 9, the terminal may include: one or more processors 901 (only one of which is shown in fig. 9), a memory 903, and a transmission apparatus 905, as shown in fig. 9, the terminal may further include an input-output device 907.
The memory 903 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for configuring a route in the embodiment of the present application, and the processor 901 executes various functional applications and data processing by running the software programs and modules stored in the memory 903, that is, implementing the above-mentioned method for configuring a route. The memory 903 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 903 may further include memory located remotely from the processor 901, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The above-mentioned transmission device 905 is used for receiving or sending data via a network, and can also be used for data transmission between a processor and a memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 905 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices so as to communicate with the internet or a local area Network. In one example, the transmission device 905 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The memory 903 is used for storing, among other things, application programs.
The processor 901 may call an application stored in the memory 903 through the transmission device 905 to perform the following steps:
acquiring a target service request sent by service equipment, wherein the target service request is used for the service equipment to request to acquire a service provided by a target service;
responding to a target service request, searching a first server which is connected with a first database from a plurality of servers, wherein the first database is a database which bears service provided by the target service in the plurality of databases;
and establishing a service route between the service equipment and the first database by using the first server, wherein the service route is used for the service equipment to acquire the service provided by the target service.
The processor 901 is further configured to perform the following steps:
under the condition that a second database exists in the plurality of databases, establishing connection between the second database and a second server in the plurality of servers, and updating a connection relation between the second database and the server stored by a service layer, wherein the utilization rates of the servers which are connected with the second database exceed a first threshold;
and under the condition that a third database exists in the plurality of databases, releasing the connection between the third database and a third server in the plurality of servers, and updating the connection relation between the third database and the server stored by the service layer, wherein the utilization rate of the third server connected with the third database is lower than a second threshold value, and the second threshold value is lower than the first threshold value.
By adopting the embodiment of the application, a target service request sent by service equipment is obtained, wherein the target service request is used for the service equipment to request to obtain the service provided by the target service; responding to a target service request, searching a first server which is connected with a first database from a plurality of servers, wherein the first database is a database which bears service provided by the target service in the plurality of databases; and establishing a service route between the service equipment and the first database by using the first server, wherein the service route is used for the scheme that the service equipment acquires the service provided by the target service. The method and the device realize the preposition of the route without using the server to calculate the route, thereby reducing the consumption of the calculation resources of the server, leading the server to concentrate the resources on the service response, solving the technical problem of slow service response speed in the related technology and further achieving the technical effect of improving the service response speed.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 9 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 9 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 9, or have a different configuration than shown in FIG. 9.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Embodiments of the present application also provide a storage medium. Alternatively, in this embodiment, the storage medium may be used to execute a program code of a configuration method of a route.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
acquiring a target service request sent by service equipment, wherein the target service request is used for the service equipment to request to acquire a service provided by a target service;
responding to a target service request, searching a first server which is connected with a first database from a plurality of servers, wherein the first database is a database which bears service provided by the target service in the plurality of databases;
and establishing a service route between the service equipment and the first database by using the first server, wherein the service route is used for the service equipment to acquire the service provided by the target service.
Optionally, the storage medium is further arranged to store program code for performing the steps of:
under the condition that a second database exists in the plurality of databases, establishing connection between the second database and a second server in the plurality of servers, and updating a connection relation between the second database and the server stored by a service layer, wherein the utilization rates of the servers which are connected with the second database exceed a first threshold;
and under the condition that a third database exists in the plurality of databases, releasing the connection between the third database and a third server in the plurality of servers, and updating the connection relation between the third database and the server stored by the service layer, wherein the utilization rate of the third server connected with the third database is lower than a second threshold value, and the second threshold value is lower than the first threshold value.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (11)

1. A method for configuring a route, comprising:
acquiring a target service request sent by service equipment, wherein the target service request is used for the service equipment to request to acquire a service provided by a target service;
responding to the target service request, searching a first server which is connected with a first database from a plurality of servers, wherein the first database is a database which bears the service provided by the target service in the plurality of databases;
and establishing a service route between the service equipment and the first database by using the first server, wherein the service route is used for the service equipment to acquire a service provided by a target service.
2. The method of claim 1,
before searching for a first server from the plurality of servers that has established a connection with the first database, the method further comprises: establishing a connection between each database of the plurality of databases and a portion of the plurality of servers;
searching for a first server from the plurality of servers that has established a connection with the first database includes: searching a candidate server connected with the first database from the plurality of servers; selecting the first server from the candidate servers.
3. The method of claim 2, wherein selecting the first server from the candidate servers comprises:
acquiring the utilization rate of each server in the candidate servers;
and selecting the server with the lowest utilization rate from the candidate servers as the first server.
4. The method of claim 2, wherein after establishing a connection between each database of the plurality of databases and a portion of the plurality of servers, the method further comprises:
under the condition that a second database exists in the plurality of databases, establishing connection between the second database and a second server in the plurality of servers, and updating a connection relation between the second database and the server stored by a service layer, wherein the utilization rates of the servers which are connected with the second database exceed a first threshold;
and under the condition that a third database exists in the plurality of databases, releasing the connection between the third database and a third server in the plurality of servers, and updating the connection relation between the third database and the server stored by a service layer, wherein the utilization rate of the third server connected with the third database is lower than a second threshold value, and the second threshold value is lower than the first threshold value.
5. The method according to any of claims 1 to 4, wherein obtaining the target service request sent by the service device comprises:
and receiving the target service request sent by the service equipment in a target service layer of a plurality of service layers, wherein each service layer of the plurality of service layers is used for receiving the service request sent by an account of one account type, the account is an account used in the target service and logged on the service equipment, the target service request is sent by the service equipment by using a target interface, and the target interface is used for forwarding the service request to the service layer matched with the account type according to the account type of the account carried in the service request.
6. The method of claim 5, wherein prior to receiving the target service request sent by the service device in a target service layer of a plurality of service layers, the method further comprises:
and establishing association between each service layer in the plurality of service layers and an account type, wherein the service layer after establishing the association with the account type is used for receiving the service request sent by the account of the account type.
7. An apparatus for configuring a route, comprising:
an obtaining unit, configured to obtain a target service request sent by a service device, where the target service request is used for the service device to request to obtain a service provided by a target service;
a searching unit, configured to search, in response to the target service request, a first server that is connected to a first database from among multiple servers, where the first database is a database that carries a service provided by the target service among the multiple databases;
a routing unit, configured to establish a service route between the service device and the first database by using the first server, where the service route is used for the service device to obtain a service provided by a target service.
8. The apparatus of claim 7,
the device further comprises: a configuration unit, configured to establish a connection between each of the plurality of databases and a part of the plurality of servers before searching for a first server having established a connection with a first database from the plurality of servers;
the lookup unit is further configured to: searching a candidate server connected with the first database from the plurality of servers; selecting the first server from the candidate servers.
9. A system for configuring a route, comprising:
the service equipment is used for sending a target service request, wherein the target service request is used for the service equipment to request to acquire a service provided by a target service;
the system comprises a plurality of servers and a plurality of databases, wherein the databases are databases of a plurality of services, and the databases are connected with servers in the plurality of servers, wherein the services comprise the target service;
and the service layer is used for searching a first server which is connected with a first database from the plurality of servers under the condition of receiving the target service request, and establishing a service route between the service equipment and the first database by using the first server, wherein the first database is a database which bears the service provided by the target service in the plurality of databases, and the service route is used for the service equipment to obtain the service provided by the target service.
10. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program when executed performs the method of any of the preceding claims 1 to 6.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the method of any of the preceding claims 1 to 6 by means of the computer program.
CN201911206698.1A 2019-11-29 2019-11-29 Route configuration method, device and system, storage medium and electronic device Pending CN111131040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911206698.1A CN111131040A (en) 2019-11-29 2019-11-29 Route configuration method, device and system, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911206698.1A CN111131040A (en) 2019-11-29 2019-11-29 Route configuration method, device and system, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN111131040A true CN111131040A (en) 2020-05-08

Family

ID=70496342

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911206698.1A Pending CN111131040A (en) 2019-11-29 2019-11-29 Route configuration method, device and system, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN111131040A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111885200A (en) * 2020-07-31 2020-11-03 中国工商银行股份有限公司 Data transmission method, device, equipment and medium
CN111949402A (en) * 2020-08-05 2020-11-17 中国建设银行股份有限公司 Database request processing method and device, computer equipment and storage medium
CN115396303A (en) * 2022-08-25 2022-11-25 苏州浪潮智能科技有限公司 Server building method, device, equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060074937A1 (en) * 2004-09-30 2006-04-06 International Business Machines Corporation Apparatus and method for client-side routing of database requests
CN104144202A (en) * 2013-12-11 2014-11-12 腾讯科技(深圳)有限公司 Hadoop distributed file system access method, system and device
US20160164773A1 (en) * 2011-09-23 2016-06-09 Tara Chand Singhal Systems and methods for faster download of digital content in mobile wireless devices
CN106055587A (en) * 2016-05-21 2016-10-26 乐视控股(北京)有限公司 Partitioning database system and routing method thereof
CN106775470A (en) * 2016-12-08 2017-05-31 武汉斗鱼网络科技有限公司 A kind of method and system of data storage
CN109189856A (en) * 2018-08-15 2019-01-11 中国联合网络通信集团有限公司 Distributed data base service management, device, server and storage medium
CN109656988A (en) * 2018-10-16 2019-04-19 平安科技(深圳)有限公司 Business O&M method, apparatus, equipment and readable storage medium storing program for executing based on cloud computing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060074937A1 (en) * 2004-09-30 2006-04-06 International Business Machines Corporation Apparatus and method for client-side routing of database requests
US20160164773A1 (en) * 2011-09-23 2016-06-09 Tara Chand Singhal Systems and methods for faster download of digital content in mobile wireless devices
CN104144202A (en) * 2013-12-11 2014-11-12 腾讯科技(深圳)有限公司 Hadoop distributed file system access method, system and device
CN106055587A (en) * 2016-05-21 2016-10-26 乐视控股(北京)有限公司 Partitioning database system and routing method thereof
CN106775470A (en) * 2016-12-08 2017-05-31 武汉斗鱼网络科技有限公司 A kind of method and system of data storage
CN109189856A (en) * 2018-08-15 2019-01-11 中国联合网络通信集团有限公司 Distributed data base service management, device, server and storage medium
CN109656988A (en) * 2018-10-16 2019-04-19 平安科技(深圳)有限公司 Business O&M method, apparatus, equipment and readable storage medium storing program for executing based on cloud computing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
戴青等: "评估云计算规模自动调整应用", 《集宁师范学院学报》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111885200A (en) * 2020-07-31 2020-11-03 中国工商银行股份有限公司 Data transmission method, device, equipment and medium
CN111885200B (en) * 2020-07-31 2022-11-22 中国工商银行股份有限公司 Data transmission method, device, equipment and medium
CN111949402A (en) * 2020-08-05 2020-11-17 中国建设银行股份有限公司 Database request processing method and device, computer equipment and storage medium
CN115396303A (en) * 2022-08-25 2022-11-25 苏州浪潮智能科技有限公司 Server building method, device, equipment and medium
CN115396303B (en) * 2022-08-25 2023-07-25 苏州浪潮智能科技有限公司 Method, device, equipment and medium for constructing server

Similar Documents

Publication Publication Date Title
CN110365748B (en) Service data processing method and device, storage medium and electronic device
CN111131040A (en) Route configuration method, device and system, storage medium and electronic device
CN109729143A (en) Network-based cloud platform is disposed on the terminal device
CN107278365B (en) Apparatus for scalable peer matching
CN102591921A (en) Scheduling and management in a personal datacenter
CN104079630A (en) Business server side load balancing method, client side, server side and system
CN104052803A (en) Decentralized distributed rendering method and system
US11218403B2 (en) Methods, devices and systems for determining a target path in a network
CN104380289A (en) Service-aware distributed hash table routing
CN106294778A (en) Information-pushing method and device
CN110740155B (en) Request processing method and device in distributed system
CN109885548A (en) Log inquiring method, device, storage medium and electronic device
CN113010313A (en) Load balancing method and device, electronic equipment and computer storage medium
CN112181678A (en) Service data processing method, device and system, storage medium and electronic device
CN112351077A (en) Application service operation method, system, device and storage medium
CN101963978B (en) Distributed database management method, device and system
CN112311625B (en) Network management method and device, storage medium and electronic device
CN103140851A (en) System including a middleware machine environment
CN110198221A (en) A kind of implementation method of load balancing, apparatus and system
CN108667920B (en) Service flow acceleration system and method for fog computing environment
CN114710485B (en) Processing method and processing device
CN113630317B (en) Data transmission method and device, nonvolatile storage medium and electronic device
CN115826845A (en) Storage resource allocation method and device, storage medium and electronic device
CN111901421A (en) Data processing method and related equipment
CN116028196A (en) Data processing method, device and storage medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508