CN111314221A - Service processing method, device, equipment and computer readable storage medium - Google Patents

Service processing method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN111314221A
CN111314221A CN201811508701.0A CN201811508701A CN111314221A CN 111314221 A CN111314221 A CN 111314221A CN 201811508701 A CN201811508701 A CN 201811508701A CN 111314221 A CN111314221 A CN 111314221A
Authority
CN
China
Prior art keywords
data center
user terminal
target data
service
routing
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
CN201811508701.0A
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.)
Beijing Jingdong Financial Technology Holding Co Ltd
Original Assignee
Beijing Jingdong Financial Technology Holding 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 Financial Technology Holding Co Ltd filed Critical Beijing Jingdong Financial Technology Holding Co Ltd
Priority to CN201811508701.0A priority Critical patent/CN111314221A/en
Publication of CN111314221A publication Critical patent/CN111314221A/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/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • 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
    • 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/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0846Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements

Landscapes

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

Abstract

The disclosure provides a service processing method, a device, equipment and a computer readable storage medium. The method comprises the following steps: the user terminal determines a target data center according to the routing parameters; the user terminal sends a service request to the target data center so that the target data center returns a service processing result; the routing parameters are acquired by the user terminal from the first data center in advance. In the method, the device, the equipment and the computer readable storage medium provided by the disclosure, since the user terminal acquires the routing parameter in advance, the user terminal can directly interact with the data center based on the routing parameter to perform service processing, and the central node is not required to distribute the service request sent by the user terminal, so that the network time consumption for calculating and distributing the service request by the central node is reduced, and the potential safety hazard brought to the whole system by the central node can be avoided.

Description

Service processing method, device, equipment and computer readable storage medium
Technical Field
The present disclosure relates to service processing technologies based on a service platform, and in particular, to a service processing method, device, and apparatus, and a computer-readable storage medium.
Background
And the Internet service platform can provide public or private services for the cooperative institution. In the prior art, with the increase of cooperative mechanisms, platform flow and data increase rapidly, and in order to solve the problems of high flow, high service response under concurrency and random processing speed of business data, a plurality of internet service platforms adopt a distributed system.
To ensure disaster tolerance of the system, the system is deployed across centers and even across regions. Each mechanism sends the service request to the central node, the central node distributes the service request to the corresponding data center, and then the data center processes the service request.
However, in this process, all the interactions between the organization and the data center need to pass through the central node, which increases the network time consumption of the data processing process, and the dependency on the central node is too strong, which may lead to the breakdown of the whole system if the central node fails.
Disclosure of Invention
The present disclosure provides a service processing method, device, and apparatus, and a computer-readable storage medium, to solve the problem in the prior art that when an organization and a data center perform service processing, the dependency on a central node is too strong.
A first aspect of the present disclosure provides a service processing method, including:
the user terminal determines a target data center according to the routing parameters;
the user terminal sends a service request to the target data center so that the target data center returns a service processing result;
wherein the routing parameters are obtained by the user terminal from a first data center in advance.
A second aspect of the present disclosure provides a service processing method, including:
a target data center receives a service request sent by a user terminal, wherein the user terminal determines the target data center according to a routing parameter;
and the target data center determines whether to process the service request according to the pre-stored operation parameters, and if not, sends an error message to the user terminal.
A third aspect of the present disclosure provides a service processing apparatus, including:
the determining module is used for determining a target data center according to the routing parameters;
a service request sending module, configured to send a service request to the target data center, so that the target data center returns a service processing result;
wherein the routing parameters are obtained by the user terminal from a first data center in advance.
A fourth aspect of the present disclosure provides a service processing apparatus, including:
a service request receiving module, configured to receive a service request sent by a user terminal, where the user terminal determines a service processing device according to a routing parameter;
and the service processing module is used for determining whether to process the service request according to the prestored operation parameters, and if not, the message sending module sends an error message to the user terminal.
A fifth aspect of the present disclosure is to provide a service processing apparatus, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the traffic processing method as described in the first aspect above.
A sixth aspect of the present disclosure provides a service processing device, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the service processing method as described in the second aspect above.
A seventh aspect of the present disclosure is to provide a computer-readable storage medium, on which a computer program is stored, the computer program being executed by a processor to implement the business processing method as described in the first aspect above.
An eighth aspect of the present disclosure is to provide a computer-readable storage medium having stored thereon a computer program which is executed by a processor to implement the service processing method as described in the second aspect above.
The service processing method, the device, the equipment and the computer readable storage medium provided by the disclosure have the technical effects that:
the service processing method, the device, the equipment and the computer readable storage medium provided by the disclosure comprise that a user terminal determines a target data center according to a routing parameter; the user terminal sends a service request to the target data center so that the target data center returns a service processing result; the routing parameters are acquired by the user terminal from the first data center in advance. In the method, the device, the equipment and the computer readable storage medium provided by the disclosure, since the user terminal acquires the routing parameter in advance, the user terminal can directly interact with the data center based on the routing parameter to perform service processing, and the central node is not required to distribute the service request sent by the user terminal, so that the network time consumption for calculating and distributing the service request by the central node is reduced, and the potential safety hazard brought to the whole system by the central node can be avoided.
Drawings
FIG. 1 illustrates a service platform-based business processing method according to an exemplary embodiment in the prior art;
fig. 2 is a flowchart illustrating a service processing method according to an exemplary embodiment of the present invention;
FIG. 2A is a diagram illustrating a service platform architecture of a business processing system in accordance with an exemplary embodiment of the present invention;
fig. 3 is a flowchart illustrating a service processing method according to another exemplary embodiment of the present invention;
fig. 4 is a flowchart illustrating a service processing method according to another exemplary embodiment of the present invention;
fig. 5 is a flowchart illustrating a service processing method according to yet another exemplary embodiment of the present invention;
fig. 6 is a block diagram illustrating a service processing apparatus according to an exemplary embodiment of the present invention;
fig. 7 is a block diagram illustrating a service processing apparatus according to another exemplary embodiment of the present invention;
fig. 8 is a block diagram illustrating a service processing apparatus according to still another exemplary embodiment of the present invention;
fig. 9 is a block diagram illustrating a service processing apparatus according to still another exemplary embodiment of the present invention;
fig. 10 is a block diagram illustrating a service processing device according to an exemplary embodiment of the present invention;
fig. 11 is a block diagram illustrating a service processing device according to another exemplary embodiment of the present invention.
Detailed Description
Fig. 1 is a service platform-based business processing method according to an exemplary embodiment in the prior art.
As shown in fig. 1, the user terminal calls a uniform service platform interface address and sends a service request to the platform. Through the domain name conversion function of the service platform, one data center in the service platform can be assigned to distribute the service request, and the data center can store the routing strategy, so that the data center can distribute a target data center for the service request according to the service attribute and forward the service request to the corresponding target data center. In this process, when the user terminal performs service processing, it needs to rely on a designated data center, and the center needs to distribute the request service, which increases the network time consumption of the whole data processing process, and when the center fails, it will affect the whole distributed system.
In the scheme provided by the embodiment of the invention, the appointed data center serving as the centralized node is removed during service processing, and the data center information matched with the appointed data center is acquired in advance through the user terminal, so that the user terminal can directly interact with the data center, and the dependence degree on the appointed service center in the service processing process is reduced.
Fig. 2 is a flowchart illustrating a service processing method according to an exemplary embodiment of the present invention.
FIG. 2A is a diagram illustrating a service platform architecture of a business processing system in accordance with an exemplary embodiment of the present invention.
As shown in fig. 2A, the method provided in this embodiment can be applied to the service platform architecture shown in fig. 2A. The service platform can comprise a user terminal and a plurality of data centers, and the user terminal can be connected with the data centers through a domain name resolution server or directly connected with the data centers through a network. The user terminal can be connected with a plurality of data centers through a network or can be connected with one of the data centers.
Step 201, the user terminal determines a target data center according to the routing parameter.
The service processing method provided by the implementation is executed by the user terminal, and the user terminal can be arranged at the cooperation mechanism side of the access service platform. For example, if the agency a purchases a service provided by the service platform, software packaged with the method provided in this embodiment may be installed in a terminal owned by the agency a, and an account password may be assigned to the software. The user terminal may be an electronic device with a computing function, such as a computer, a tablet computer, and the like, and may specifically be a server of the agency a.
The user terminal may obtain a routing parameter in advance, where the routing parameter includes information of a data center to which the user terminal may access, and specifically may be an IP (Internet Protocol, Protocol for interconnection between networks) address of the data center. For example, the service platform is provided with 10 data centers, the data centers that the user terminal can access include center 1 and center 2, and the routing parameters include IP addresses of centers 1 and 2.
Specifically, a plurality of data centers may be set in the service platform, and the data centers may store operation parameters, where the operation parameters include information of the data centers that each user terminal can access. The data center may be a device owned by the service provider and capable of storing data and processing services of the user terminal. After the service is purchased by the partner organization, the corresponding data center can be determined according to the content purchased by the partner organization. The data center which can be accessed by the user terminal can be determined according to the position of the user terminal and the position of each data center set by the cooperation mechanism, so that the length of a network link connected with the user terminal and the data center is reduced. And if the traffic is large, a plurality of data centers can be set for the cooperation mechanism.
Further, the user terminal may obtain the routing parameters from the first data center. The user terminal may specifically send an access request to a domain name resolution server (DNS server), where the access request includes a domain name and is used to request to access a data center corresponding to the domain name. For the user, the specific address of each data center does not need to be known, and only the domain name needs to be known. For the data center side, each data center is a device corresponding to the domain name, but each data center does not need to be exposed to the outside, and only the domain name needs to be exposed to the outside and can be accessed to the data center according to the domain name.
The DNS server is provided with a corresponding relation between a domain name and an IP address, can find the corresponding IP address of the first data center according to the domain name, and sends the access request to the first data center. The access request may further include an identifier of the user terminal, the first data center finds, according to the identifier of the user terminal, data center information corresponding to the user terminal from the stored operating parameters, may determine a routing parameter according to the data center information, and feeds back the routing parameter to the user terminal.
In actual application, each data center can store the same operating parameters, a first data center can be set, a domain name is set in the DNS server to correspond to the IP of the first data center, and if the first data center fails, any other data center can be upgraded to the first data center. So that the system can also operate normally after the first data center fails.
The user terminal can determine the target data center according to the acquired routing parameters. The user terminal does not need to acquire the routing parameters before the service starts each time, and can determine a target data center according to the routing parameters as long as the routing parameters are stored in the user terminal. The routing parameters include data center information accessible to the user terminal, and each data center can process the service of the user terminal, but the data centers do not need to process the same service one by one, so that the user terminal can determine a target data center from the accessible data centers and process the current service request by the target center.
In one embodiment, the routing parameters may further include a weight parameter, so that the user terminal can determine the target center in the accessible data center according to the weight parameter. In another embodiment, the accessible data centers in the routing parameters may be in the form of a list, and the user terminal may determine the target data center in the order in the list, for example, the first accessible data center may be determined as the target data center.
Specifically, the first data center and the target data center may be the same or different.
Step 202, the user terminal sends a service request to the target data center, so that the target data center returns a service processing result.
Further, the user terminal may obtain an IP address of the target data center through the routing parameter, and send the service request to the IP address as the target address, thereby sending the service request to the target data center.
In practical application, the service request further includes a source address, which is used for storing the address of the user terminal sending the service request. After receiving the service request, the target data center may process the service request. For example, the service request may be to obtain commodity information on shelf today, and the target data center may obtain corresponding commodity information and return the commodity information to the user terminal.
The target data center can obtain the source address in the service request as the target address, and then send the service processing result, thereby feeding back the service processing result to the user terminal.
The user terminal side obtains the routing parameters in advance and can directly determine the data center for processing the service request, so that the data center does not need to be appointed to distribute the service request, a central node in a service platform framework in the prior art is taken out, the time consumed by the central node for calculating and distributing the service request can be reduced, and potential safety hazards brought to the whole system by the central node can be avoided.
The method provided by the present embodiment is used for processing services, and the method is executed by a device provided with the method provided by the present embodiment, and the device is generally implemented in a hardware and/or software manner.
The service processing method provided by the embodiment comprises the steps that a user terminal determines a target data center according to a routing parameter; the user terminal sends a service request to the target data center so that the target data center returns a service processing result; the routing parameters are acquired by the user terminal from the first data center in advance. In the method provided by this embodiment, since the user terminal obtains the routing parameter in advance, the user terminal can directly interact with the data center based on the routing parameter to perform service processing, and the central node is not required to distribute the service request sent by the user terminal, so that the time consumed by the central node in calculating and distributing the service request is reduced, and potential safety hazards brought to the whole system by the central node can be avoided.
Fig. 3 is a flowchart illustrating a service processing method according to another exemplary embodiment of the present invention.
As shown in fig. 3, the service processing method provided in this embodiment includes:
step 301, a user terminal sends an obtaining request for obtaining a routing parameter to a domain name resolution server, where the obtaining request includes a domain name, so that the domain name resolution server determines a first data center according to the domain name, and sends the obtaining request to the first data center, so that the first data center obtains the routing parameter corresponding to the user terminal, and sends the routing parameter to the user terminal.
The user terminal may determine whether the user terminal stores the routing parameter, for example, a file for storing the routing parameter may be set in the user terminal, and the content in the file may be read, and if the content is empty, it may be determined that the routing parameter is not stored in the user terminal. When the user terminal is accessed to the service platform for the first time, the inside of the user terminal has no routing parameters, and after the user terminal is accessed to the service platform, if the inside data is empty, the situation that the routing parameters are lost can also be caused.
Specifically, if the user terminal does not store the routing parameters therein, the user terminal cannot determine the IP addresses of the data centers, and cannot be directly connected to the data centers. Therefore, the domain name resolution server can be connected with the data center, and the routing parameters can be acquired.
Further, the user terminal may send an acquisition request for acquiring the routing parameter to the domain name resolution server. The user terminal cannot determine the IP address of the data center, but can acquire the external domain name of the data center and add domain name information to the acquisition request. The domain name resolution server stores the corresponding relation between the domain name and the IP address. When the service platform is provided with a plurality of data centers, the IP address of one of the data centers can be specified to correspond to the domain name, and the corresponding relation is written into the domain name resolution server.
In actual application, after receiving the acquisition request, the domain name resolution server may read the domain name information included therein, and determine the IP address corresponding to the domain name based on the correspondence between the domain name and the IP address. And then sending the acquisition request to a first data center corresponding to the IP address.
The service platform comprises a plurality of data centers, wherein the data centers are arranged on the service platform, and the service platform comprises operation parameters, wherein the operation parameters comprise a data center list which can be accessed by each user terminal and a database which can be accessed by each user terminal, so that the first data center can determine the routing parameters of the user terminal which sends the acquisition request based on the operation parameters.
Specifically, when sending a message, the data frame may include basic information such as a destination address and a source address. The first data center can determine the IP address of the user terminal according to the source address in the acquisition request, and further directly send the routing parameters to the user terminal.
Further, it is possible that the operating parameters in the data center are updated. For example, if one of the data centers is off-shelf due to a failure or other reasons, the accessible data center list of the user terminal should not include the off-shelf data center. At this point, the operating parameters in the data center may be updated. For example, the accessible data centers of the user terminal a are a and b, wherein a is off-shelf, and then the accessible data center corresponding to the user terminal a in the operation parameters of the data center is modified into b. Specifically, the operating parameters of one of the data centers may be modified, and the operating parameters may be synchronized from the one data center to the other data centers. The modified data center may be a master data center and the other data centers slave data centers. In the domain name resolution server, the domain name of the service platform corresponds to the IP address of the main data center.
After the data in the data center is modified, the routing parameters in the user terminal are also information before modification. Therefore, after the user terminal acquires the routing parameter, the routing parameter may also be timed and synchronized, and a specific implementation manner may be step 3021 or step 3022. If the embodiment of step 3021 is used, it may be performed at any time after step 301. If the embodiment of step 3022 is adopted, it may be performed after step 303.
Step 3021, the user terminal sends a synchronization request for synchronizing the routing parameters to the first data center according to the preset frequency, so that the first data center feeds back the current routing parameters.
In practical application, when the first data center feeds back the routing parameter to the user terminal for the first time, the sending message may include a source address, that is, an IP address of the first data center. The user terminal may record this address and periodically send a synchronization request for synchronizing the routing parameters to the first data center based on this address.
After receiving the synchronization request, the first data center may determine a routing parameter corresponding to the synchronization request according to a source address in the request; or the user terminal identifier encapsulated in the synchronization request may be acquired, the routing parameter corresponding to the terminal identifier is determined, and then the current routing parameter, that is, the latest routing parameter, is fed back to the user terminal.
The user terminal may periodically send a synchronization request to the first data center according to a preset frequency. The preset frequency can be set according to requirements, such as once every 5 minutes, once every 10 minutes, and the like.
Step 3022, the user terminal sends a synchronization request for synchronizing the routing parameters to the target data center according to the preset frequency, so that the target data center feeds back the current routing parameters.
Specifically, in the method provided in this embodiment, each data center stores an operation parameter, and the latest operation parameter may be synchronized from the master data center to each slave data center, and the data center may determine the routing parameter of the user terminal according to the operation parameter.
Further, after the user terminal obtains the routing parameters, the target data center may be determined according to the routing parameters, and the specific determination method is similar to step 201. At this time, the user terminal may determine the IP address of the target data center, and may directly send a synchronization request for synchronizing the routing parameters to the target data center according to the IP address, so that the target data center feeds back the current routing parameters.
In fig. 3, steps 2021, 2022 are illustrated at the same time, but in practical applications, only one of the embodiments may be selected.
Step 303, the user terminal determines the target data center according to the routing parameter.
Step 304, the user terminal sends a service request to the target data center, so that the target data center returns a service processing result.
The steps 303-304 are similar to the steps 201-202 in terms of specific principles and implementation, and are not described herein again.
If the user terminal receives the error message fed back by the target data center after the user terminal sends the service request to the target data center, the user terminal continues to execute step 301.
If the operation parameters in the data center are updated and the user terminal starts to perform service processing without synchronizing the routing parameters, the situation that the routing parameters in the user terminal are not synchronized with the operation parameters of the data center may exist, and at this time, the user terminal performs service processing according to the currently stored routing parameters, and the situation of error reporting may exist. For example, the user terminal requests the data center for the synchronization routing parameters at 10:20 and sends a synchronization request to the data center every 5 minutes, i.e., the next time the synchronization routing parameters are applied is 10: 25. If the operation parameters are updated in the data center at 10:21, and if the user terminal initiates a service request according to the routing parameters at 10:23, there may be a case of error reporting due to inconsistency between the routing parameters and the operation parameters.
Specifically, after receiving the service request, the target data center may determine whether the service request of the user terminal can be processed according to the operation parameter. For example, the user terminal includes accessible data centers a, b and c in the routing parameters synchronized at 10:20, and when a service request is initiated at 10:23, the determined target data center is c and the service request is sent to c. At 10:21, the operation parameters are updated in the data center, wherein the accessible data centers corresponding to the user terminals are updated to be a and b. Then c, after receiving the service request, comparing according to the operation parameters to determine whether the service can be processed for the user terminal, if the determination result is that the service cannot be processed, sending an error message to the user terminal, and specifically sending a message requiring the user terminal to use correct routing parameters for service processing.
Further, after receiving the error message, the user terminal may determine that the data center reports an error due to the routing parameter error, and therefore, step 301 may be continuously performed, so as to obtain the latest routing parameter. By carrying out service identification and interception in the data center, the user terminal can be controlled to send the service request to the matched data center.
Fig. 4 is a flowchart illustrating a service processing method according to another exemplary embodiment of the present invention.
Step 401, the target data center receives a service request sent by a user terminal, wherein the user terminal determines the target data center according to the routing parameter.
The method provided by the embodiment can be applied to the service platform architecture shown in fig. 2A.
The service processing method provided by the implementation is executed by a target data center, and the data center can be a device owned by a service provider and can store data and process the service of a user terminal. In a service platform architecture, multiple data centers may be provided.
First, the user terminal may obtain a routing parameter from a first data center among the plurality of data centers in advance, and determine a target data center according to the routing parameter.
The user terminal may specifically send an access request to a domain name resolution server (DNS server), where the access request includes a domain name and is used to request to access a data center corresponding to the domain name. For the user, the specific address of each data center does not need to be known, and only the domain name needs to be known. For the data center side, each data center is a device corresponding to the domain name, but each data center does not need to be exposed to the outside, and only the domain name needs to be exposed to the outside and can be accessed to the data center according to the domain name.
The DNS server is provided with a corresponding relation between a domain name and an IP address, can find the corresponding IP address of the first data center according to the domain name, and sends the access request to the first data center. The access request may further include an identifier of the user terminal, the first data center finds, according to the identifier of the user terminal, data center information corresponding to the user terminal from the stored operating parameters, may determine a routing parameter according to the data center information, and feeds back the routing parameter to the user terminal.
In actual application, each data center can store the same operating parameters, a first data center can be set, a domain name is set in the DNS server to correspond to the IP of the first data center, and if the first data center fails, any other data center can be upgraded to the first data center. So that the system can also operate normally after the first data center fails.
The user terminal can determine the target data center according to the acquired routing parameters. The user terminal does not need to acquire the routing parameters before the service starts each time, and can determine a target data center according to the routing parameters as long as the routing parameters are stored in the user terminal. The routing parameters include data center information accessible to the user terminal, and each data center can process the service of the user terminal, but the data centers do not need to process the same service one by one, so that the user terminal can determine a target data center from the accessible data centers and process the current service request by the target center.
In one embodiment, the routing parameters may further include a weight parameter, so that the user terminal can determine the target center in the accessible data center according to the weight parameter. In another embodiment, the accessible data centers in the routing parameters may be in the form of a list, and the user terminal may determine the target data center in the order in the list, for example, the first accessible data center may be determined as the target data center.
Specifically, the first data center and the target data center may be the same or different.
Further, the user terminal may obtain an IP address of the target data center through the routing parameter, and send the service request to the IP address as the target address, thereby sending the service request to the target data center. The target data center can directly receive the service request sent by the user terminal, and a central node in the service platform is not required to forward the service request, so that the service of the user terminal can be processed under the decentralized condition.
Step 402, the target data center determines whether to process the service request according to the pre-stored operation parameters, and if not, sends an error message to the user terminal.
The service platform may store operation parameters in each data center, where the operation parameters include data center information that each user terminal can access. After the service is purchased by the partner organization, the corresponding data center can be determined according to the content purchased by the partner organization. The data center which can be accessed by the user terminal can be determined according to the position of the user terminal and the position of each data center set by the cooperation mechanism, so that the length of a network link connected with the user terminal and the data center is reduced. And if the traffic is large, a plurality of accessible data centers can be set for the cooperation mechanism.
Specifically, the target data center may identify the service request and determine whether the service request can be processed. According to the operation parameters, whether the target data center is an accessible data center of the user terminal or not can be determined, and specifically, the user terminal identifier and/or the source address included in the service request can be obtained, so that whether the user terminal has the right to use the target data center or not can be determined.
Further, a database identifier accessible by each user terminal may also be set in the operation parameter, and accordingly, the service request sent by the user terminal may also carry the database identifier to be accessed. The target data center can identify whether the database to be accessed by the user terminal currently is in the authority range of the user terminal.
In actual application, if the user terminal does not have the data processing by using the target data center or the authority of accessing the database in the service request, determining not to process the current service request, and returning an error message to the user terminal.
In one case, the accessible data center corresponding to the user terminal has been changed, but the routing parameter in the user terminal is not updated, which may cause the target data center to return an error message, at this time, the user terminal may be further prompted with information that the address of the target data center is incorrect, so that the user terminal may obtain the routing parameter from the first data center again, re-determine the target data center according to the routing parameter, and further send a service request to the new target data center again.
In another case, it may be that the target data center requested to be accessed by the user terminal is down or for other reasons, and at this time, the target data center may also be caused to return an error message. At this time, a message that the current target data center is unavailable and the target center is replaced can be prompted to the user terminal, so that the user terminal can determine the target data center again according to the routing parameters, and further send a service request to a new target data center again.
The method provided by the present embodiment is used for processing services, and the method is executed by a device provided with the method provided by the present embodiment, and the device is generally implemented in a hardware and/or software manner.
The service processing method provided by the embodiment comprises the steps that a target data center receives a service request sent by a user terminal, wherein the user terminal determines the target data center according to a routing parameter; and the target data center determines whether to process the service request according to the preset operation parameters, and if not, sends an error message to the user terminal. In the method provided by this embodiment, the user terminal can determine the target data center according to the routing parameters, so that the target data center can directly receive the service request sent by the user terminal, and the service request does not need to be distributed by the central node, thereby reducing the network time consumption for calculating and allocating the service request by the central node, and avoiding the potential safety hazard brought by the central node to the whole system.
Fig. 5 is a flowchart illustrating a service processing method according to still another exemplary embodiment of the present invention.
As shown in fig. 5, the service processing method provided in this embodiment includes:
step 501, a target data center receives synchronous operation parameters of a first data center, and updates prestored operation parameters according to the received operation parameters.
In the method provided by this embodiment, the service platform may be provided with a plurality of data centers, and one first data center may be set therein as a master data center, and the other data centers may be set therein as slave data centers. When the operation parameters need to be adjusted, the operation parameters in the main data center can be modified, and then the main data center synchronizes the updated operation parameters to other data centers.
Specifically, the target data center may be a slave data center in the service platform, and when the operation parameters in the first data center are updated, the target data center may receive new operation parameters synchronized by the first data center.
Further, the first data center stores updated operating parameters. When the operation parameters need to be adjusted, only the operation parameters in the first data center may be modified, so as to update the operation parameters in the first data center, and then the operation parameters are synchronized to other slave data centers based on the updated operation parameters, and each slave operation center may receive the operation parameters sent by the first data center and update the stored operation parameters.
Step 502, receiving a synchronization request of synchronizing routing parameters sent by a user terminal, and feeding back the latest routing parameters to the user terminal according to the operation parameters synchronized by the first data center.
In practical application, the user terminal may determine the target data center according to the routing parameters stored in the user terminal, and send a synchronization request for synchronizing the routing parameters to the target data center. After receiving the synchronization request, the target data center may determine a routing parameter corresponding to the user terminal according to the currently stored operation parameter, that is, the operation parameter synchronized to the target data center by the first data center, and feed back the routing parameter to the user terminal.
The target data center can determine a routing parameter corresponding to the source address according to the source address in the request; or the user terminal identifier encapsulated in the synchronization request may be acquired, the routing parameter corresponding to the terminal identifier is determined, and then the current routing parameter, that is, the latest routing parameter, is fed back to the user terminal.
Specifically, the user terminal may send an acquisition request for acquiring the routing parameters to the domain name resolution server, so that the domain name resolution server determines the first data center according to the domain name in the acquisition request, and sends the acquisition request to the first data center, so that the first data center acquires the routing parameters corresponding to the user terminal, and sends the routing parameters to the user terminal. The first data center stores operation parameters, and the operation parameters may include routing parameters corresponding to each user terminal, so that the first data center may determine the routing parameters according to the operation parameters and send the routing parameters to the user terminals.
Further, after the user terminal obtains the routing parameters, the target data center can be determined according to the routing parameters. The routing parameters include data center information accessible to the user terminal, and each data center can process the service of the user terminal, but the data centers do not need to process the same service one by one, so that the user terminal can determine a target data center from the accessible data centers and process the current service request by the target center.
In one embodiment, the routing parameters may further include a weight parameter, so that the user terminal can determine the target center in the accessible data center according to the weight parameter. In another embodiment, the accessible data centers in the routing parameters may be in the form of a list, and the user terminal may determine the target data center in the order in the list, for example, the first accessible data center may be determined as the target data center.
After the user terminal determines the target data center, a synchronization request for synchronizing the routing parameters can be sent to the target data center according to the preset frequency. In the method provided by this embodiment, each data center stores operating parameters, and the latest operating parameters can be synchronized from the first data center to each slave data center, so that the operating parameters stored in the target data center are latest, so that the target data center can determine the latest routing parameters according to the latest operating parameters.
Step 503, the target data center receives a service request sent by the user terminal, wherein the user terminal determines the target data center according to the routing parameter.
The timing of steps 502 and 503 is not limited.
Step 504, the target data center determines whether to process the service request according to the preset operation parameters, and if not, sends an error message to the user terminal.
The steps 503 and 504 are similar to the specific principles and implementation of the steps 401 and 402, and are not described herein again.
Fig. 6 is a block diagram of a service processing apparatus according to an exemplary embodiment of the present invention.
As shown in fig. 6, the service processing apparatus provided in this embodiment includes:
a determining module 61, configured to determine a target data center according to the routing parameter;
a service request sending module 62, configured to send a service request to the target data center, so that the target data center returns a service processing result;
the routing parameters are acquired by the service processing device from the first data center in advance.
The service processing apparatus provided in this embodiment includes: the determining module is used for determining a target data center according to the routing parameters; the service request sending module is used for sending a service request to the target data center so as to enable the target data center to return a service processing result; the routing parameters are acquired by the service processing device from the first data center in advance. In the device provided by this embodiment, since the device obtains the routing parameter in advance, the device can directly interact with the data center based on the routing parameter to perform service processing, and the central node is not required to distribute the service request sent by the device, so that the time consumed by the central node to calculate and distribute the service request is reduced, and potential safety hazards brought to the entire system by the central node can be avoided.
The specific principle and implementation of the service processing apparatus provided in this embodiment are similar to those of the embodiment shown in fig. 2, and are not described here again.
Fig. 7 is a block diagram illustrating a service processing apparatus according to another exemplary embodiment of the present invention.
As shown in fig. 7, on the basis of the embodiment shown in fig. 6, the apparatus provided in this embodiment further includes:
an obtaining request sending module 63, configured to send an obtaining request for obtaining a routing parameter to a domain name resolution server, where the obtaining request includes a domain name, so that the domain name resolution server determines, according to the domain name, a first data center in which the routing parameter is stored, and sends the obtaining request to the first data center, so that the first data center obtains the routing parameter corresponding to the user terminal, and sends the routing parameter to the user terminal.
The device further comprises:
a synchronization request sending module 64, configured to send a synchronization request for synchronizing routing parameters to the first data center according to a preset frequency, so that the first data center feeds back current routing parameters.
The apparatus may further include another synchronization request sending module 65, configured to send a synchronization request for synchronizing the routing parameters to the target data center according to a preset frequency, so that the target data center feeds back the current routing parameters.
The apparatus further includes a receiving module 66, wherein if the service request sending module 62 sends the service request to the target data center, the receiving module 66 receives an error message fed back by the target data center;
the obtaining request sending module 63 continues to send the obtaining request for obtaining the routing parameters to the domain name resolution server.
The specific principle and implementation of the service processing apparatus provided in this embodiment are similar to those of the embodiment shown in fig. 3, and are not described here again.
Fig. 8 is a block diagram illustrating a service processing apparatus according to still another exemplary embodiment of the present invention.
As shown in fig. 8, the service processing apparatus provided in this embodiment includes:
a service request receiving module 81, configured to receive a service request sent by a user terminal, where the user terminal determines a service processing apparatus according to a routing parameter;
a service processing module 82, configured to determine whether to process the service request according to a pre-stored operation parameter, and if not, a message sending module 83 sends an error message to the user terminal.
The service processing apparatus provided in this embodiment includes: the service request receiving module is used for receiving a service request sent by a user terminal, wherein the user terminal determines a service processing device according to the routing parameter; and the service processing module is used for determining whether to process the service request according to the prestored operation parameters, and if not, the message sending module sends an error message to the user terminal. In the device provided by this embodiment, the user terminal can determine the service processing device according to the routing parameter, so that the service processing device can directly receive the service request sent by the user terminal, and the service request does not need to be distributed by the central node, thereby reducing the network time consumption for calculating and allocating the service request by the central node, and avoiding the potential safety hazard brought by the central node to the whole system.
The specific principle and implementation of the service processing apparatus provided in this embodiment are similar to those of the embodiment shown in fig. 4, and are not described here again.
Fig. 9 is a block diagram illustrating a service processing apparatus according to still another exemplary embodiment of the present invention.
As shown in fig. 9, on the basis of the embodiment shown in fig. 8, the apparatus provided in this embodiment further includes:
a parameter synchronization module 84, configured to receive the operation parameter synchronized by the first data center, and update a prestored operation parameter according to the received operation parameter;
and the first data center stores the updated operating parameters.
The device, still include:
a synchronization request receiving module 85, configured to receive a synchronization request for synchronizing routing parameters sent by the user terminal, and feed back the latest routing parameters to the user terminal according to the operation parameters synchronized by the first data center.
The specific principle and implementation of the service processing apparatus provided in this embodiment are similar to those of the embodiment shown in fig. 5, and are not described here again.
Fig. 10 is a block diagram of a service processing device according to an exemplary embodiment of the present invention.
As shown in fig. 10, the service processing device provided in this embodiment includes:
a memory 1001;
a processor 1002; and
a computer program;
wherein the computer program is stored in the memory 1001 and configured to be executed by the processor 1002 to implement any of the traffic processing methods described in fig. 2-3.
Fig. 11 is a block diagram illustrating a service processing device according to another exemplary embodiment of the present invention.
As shown in fig. 10, the service processing device provided in this embodiment includes:
a memory 1101;
a processor 1102; and
a computer program;
wherein the computer program is stored in the memory 1101 and configured to be executed by the processor 1102 to implement any of the traffic processing methods described in fig. 4-5.
The present embodiments also provide a computer-readable storage medium, having stored thereon a computer program,
the computer program is executed by a processor to implement any of the traffic processing methods as described in fig. 2-3.
The present embodiments also provide a computer-readable storage medium, having stored thereon a computer program,
the computer program is executed by a processor to implement any of the traffic processing methods as described in fig. 4-5.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (14)

1. A method for processing a service, comprising:
the user terminal determines a target data center according to the routing parameters;
the user terminal sends a service request to the target data center so that the target data center returns a service processing result;
wherein the routing parameters are obtained by the user terminal from a first data center in advance.
2. The method of claim 1, wherein prior to determining the target data center based on the routing parameters, comprising:
the user terminal sends an acquisition request for acquiring routing parameters to a domain name resolution server, wherein the acquisition request comprises a domain name, so that the domain name resolution server determines a first data center according to the domain name and sends the acquisition request to the first data center, so that the first data center acquires the routing parameters corresponding to the user terminal and sends the routing parameters to the user terminal.
3. The method according to claim 2, wherein the user terminal sends a synchronization request for synchronizing the routing parameters to the first data center according to a preset frequency, so that the first data center feeds back current routing parameters.
4. The method according to claim 2, wherein the user terminal sends a synchronization request for synchronizing the routing parameters to the target data center according to a preset frequency, so that the target data center feeds back current routing parameters.
5. The method according to claim 2, wherein if a user terminal sends a service request to the target data center, the user terminal receives an error message fed back by the target data center;
the user terminal continues to send an acquisition request for acquiring the routing parameters to the domain name resolution server.
6. A method for processing a service, comprising:
a target data center receives a service request sent by a user terminal, wherein the user terminal determines the target data center according to a routing parameter;
and the target data center determines whether to process the service request according to the pre-stored operation parameters, and if not, sends an error message to the user terminal.
7. The method of claim 6, further comprising:
receiving the synchronous operation parameters of the first data center, and updating prestored operation parameters according to the received operation parameters;
and the first data center stores the updated operating parameters.
8. The method of claim 7, further comprising:
and receiving a synchronous request of synchronizing the routing parameters sent by the user terminal, and feeding back the latest routing parameters to the user terminal according to the operation parameters synchronized by the first data center.
9. A traffic processing apparatus, comprising:
the determining module is used for determining a target data center according to the routing parameters;
a service request sending module, configured to send a service request to the target data center, so that the target data center returns a service processing result;
the routing parameters are acquired by the service processing device from the first data center in advance.
10. A traffic processing apparatus, comprising:
a service request receiving module, configured to receive a service request sent by a user terminal, where the user terminal determines a service processing device according to a routing parameter;
and the service processing module is used for determining whether to process the service request according to the prestored operation parameters, and if not, the message sending module sends an error message to the user terminal.
11. A traffic processing device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any of claims 1-5.
12. A traffic processing device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any of claims 6-8.
13. A computer-readable storage medium, having stored thereon a computer program,
the computer program is executed by a processor to implement the method according to any of claims 1-5.
14. A computer-readable storage medium, having stored thereon a computer program,
the computer program is executed by a processor to implement the method according to any one of claims 6-8.
CN201811508701.0A 2018-12-11 2018-12-11 Service processing method, device, equipment and computer readable storage medium Pending CN111314221A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811508701.0A CN111314221A (en) 2018-12-11 2018-12-11 Service processing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811508701.0A CN111314221A (en) 2018-12-11 2018-12-11 Service processing method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111314221A true CN111314221A (en) 2020-06-19

Family

ID=71159562

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811508701.0A Pending CN111314221A (en) 2018-12-11 2018-12-11 Service processing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111314221A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112787918A (en) * 2021-01-29 2021-05-11 杭州优云软件有限公司 Data center addressing and main-standby switching method based on service routing tree
CN113645676A (en) * 2021-08-13 2021-11-12 中国人民解放军63620部队 Service data sending method and device, computer equipment and storage medium
CN114531492A (en) * 2020-11-05 2022-05-24 网联清算有限公司 Service calling method and device, storage medium and computer equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102859942A (en) * 2010-04-28 2013-01-02 微软公司 Using DNS reflection to measure network performance
CN103442030A (en) * 2013-07-31 2013-12-11 北京京东尚科信息技术有限公司 Method and system for sending and processing service request messages and client-side device
CN105430109A (en) * 2015-10-30 2016-03-23 电子科技大学 Internet data center IP address searching method based on flow behavior characteristics
CN106998370A (en) * 2017-06-15 2017-08-01 北京微影时代科技有限公司 Access control method, device and system
US20170317927A1 (en) * 2016-04-29 2017-11-02 Intuit Inc. Multi gtm based routing to avoid latencies
CN107528862A (en) * 2017-10-23 2017-12-29 北京京东金融科技控股有限公司 The method and device of domain name mapping
CN107786594A (en) * 2016-08-26 2018-03-09 深圳市腾讯计算机系统有限公司 Service request processing method and device
CN108011995A (en) * 2017-12-19 2018-05-08 北京星河星云信息技术有限公司 Strange land implementation method more living, strange land service platform more living and storage medium
CN108777709A (en) * 2018-05-31 2018-11-09 康键信息技术(深圳)有限公司 Website access method, device, computer equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102859942A (en) * 2010-04-28 2013-01-02 微软公司 Using DNS reflection to measure network performance
CN103442030A (en) * 2013-07-31 2013-12-11 北京京东尚科信息技术有限公司 Method and system for sending and processing service request messages and client-side device
CN105430109A (en) * 2015-10-30 2016-03-23 电子科技大学 Internet data center IP address searching method based on flow behavior characteristics
US20170317927A1 (en) * 2016-04-29 2017-11-02 Intuit Inc. Multi gtm based routing to avoid latencies
CN107786594A (en) * 2016-08-26 2018-03-09 深圳市腾讯计算机系统有限公司 Service request processing method and device
CN106998370A (en) * 2017-06-15 2017-08-01 北京微影时代科技有限公司 Access control method, device and system
CN107528862A (en) * 2017-10-23 2017-12-29 北京京东金融科技控股有限公司 The method and device of domain name mapping
CN108011995A (en) * 2017-12-19 2018-05-08 北京星河星云信息技术有限公司 Strange land implementation method more living, strange land service platform more living and storage medium
CN108777709A (en) * 2018-05-31 2018-11-09 康键信息技术(深圳)有限公司 Website access method, device, computer equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114531492A (en) * 2020-11-05 2022-05-24 网联清算有限公司 Service calling method and device, storage medium and computer equipment
CN114531492B (en) * 2020-11-05 2024-05-10 网联清算有限公司 Service calling method, device, storage medium and computer equipment
CN112787918A (en) * 2021-01-29 2021-05-11 杭州优云软件有限公司 Data center addressing and main-standby switching method based on service routing tree
CN113645676A (en) * 2021-08-13 2021-11-12 中国人民解放军63620部队 Service data sending method and device, computer equipment and storage medium
CN113645676B (en) * 2021-08-13 2023-12-15 中国人民解放军63620部队 Service data sending method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US10298457B2 (en) Synchronization of configuration file of virtual application distribution chassis
CN109640319B (en) Scheduling method and device based on access information and electronic equipment
CN111091429B (en) Electronic bill identification distribution method and device and electronic bill generation system
US10440069B2 (en) System and method for acquiring, processing, and updating global information
CN109889586B (en) Communication processing method and device, computer readable medium and electronic equipment
CN111314221A (en) Service processing method, device, equipment and computer readable storage medium
CN111259072B (en) Data synchronization method, device, electronic equipment and computer readable storage medium
CN110730254B (en) Address allocation method, device, relay equipment and medium
CN107172214B (en) Service node discovery method and device with load balancing function
CN111404628B (en) Time synchronization method and device
CN111628886A (en) Method and device for building block chain network under private cloud environment, and computer equipment
CN114301990A (en) Node scheduling method, device and storage medium based on content distribution network
CN111638891A (en) Equipment upgrading method and device, terminal equipment and storage medium
CN113315754A (en) Intelligent linkage method, device, equipment and medium for firewall of container visit
CN114040020A (en) Cross-cluster service calling method and system
CN115562757A (en) Data processing method, configuration center system, electronic device, and storage medium
EP4050850A1 (en) Service upgrading method, device and system
CN113472823B (en) Server access method and device, intelligent terminal and storage medium
CN113783826B (en) Micro-service exception handling method and device
CN114706923A (en) Data synchronization method and device, electronic equipment and storage medium
CN110071949B (en) System, method and device for managing computing application across geographic areas
CN111241194A (en) Data synchronization method and device
CN107528797B (en) Data processing method, device and system
US12032952B2 (en) Service upgrade method, apparatus, and system
US20230370332A1 (en) Computer system and communication method

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

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.

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 HOLDINGS Co.,Ltd.

Address before: Room 221, 2nd floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone, 100195

Applicant before: BEIJING JINGDONG FINANCIAL TECHNOLOGY HOLDING Co.,Ltd.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20200619

RJ01 Rejection of invention patent application after publication