WO2023160551A1 - 请求处理方法及设备 - Google Patents

请求处理方法及设备 Download PDF

Info

Publication number
WO2023160551A1
WO2023160551A1 PCT/CN2023/077450 CN2023077450W WO2023160551A1 WO 2023160551 A1 WO2023160551 A1 WO 2023160551A1 CN 2023077450 W CN2023077450 W CN 2023077450W WO 2023160551 A1 WO2023160551 A1 WO 2023160551A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
data center
request
gateway
processing request
Prior art date
Application number
PCT/CN2023/077450
Other languages
English (en)
French (fr)
Inventor
干迅
刘辉
王晨
Original Assignee
北京有竹居网络技术有限公司
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 北京有竹居网络技术有限公司 filed Critical 北京有竹居网络技术有限公司
Publication of WO2023160551A1 publication Critical patent/WO2023160551A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Definitions

  • Embodiments of the present disclosure relate to the field of computer processing technologies, and in particular, to a request processing method and device, electronic equipment, storage media, computer programs, and computer program products.
  • a country can be a region, or one or more countries can form a region.
  • a user in country A1 may purchase a product from a seller in country A2.
  • These purchasing processes form a large number of orders, which can be stored and managed by the data center. For example, when the data processing request is used to add an order, the data center can store the newly added order; when the data processing request is used to modify the order, the data center can modify the specified order; when the data processing request is used to delete the order, The data center can delete the specified order; when the data processing request is used to read the order data, the data center can return the data of the specified order.
  • multiple data centers can usually be set up, but each area corresponds to a data center in charge of the area, and the data processing requests of users in this area are processed by the corresponding data center, and the data center is synchronously sent to the remaining data centers.
  • the corresponding data center can modify the data of the order.
  • Embodiments of the present disclosure provide a request processing method and device.
  • an embodiment of the present disclosure provides a request processing method, which is applied to a first gateway, and the method includes:
  • the data processing request is used to process the order
  • an embodiment of the present disclosure provides a request processing device, which is applied to a first gateway, and the device includes:
  • a data processing request receiving module configured to receive a data processing request, and the data processing request is used to process an order
  • a target area determining module configured to determine the target area corresponding to the buyer of the order
  • a data center determination module configured to select the primary data center corresponding to the target area from preset configuration information as the first data center for processing the data processing request, the preset configuration information including at least one area respectively The corresponding main data center;
  • a data processing module configured to send the data processing request to the first data center for processing.
  • an embodiment of the present disclosure provides an electronic device, including: at least one processor and a memory;
  • the memory stores computer-executable instructions
  • the at least one processor executes the computer-executed instructions stored in the memory, so that the electronic device implements the method as described in the first aspect.
  • an embodiment of the present disclosure provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, the computing device implements the first aspect. the method described.
  • an embodiment of the present disclosure provides a computer program, the computer program is used to implement the method described in the first aspect.
  • an embodiment of the present disclosure provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
  • FIG. 1 is a schematic diagram of a data processing scenario applicable to an embodiment of the present disclosure
  • Fig. 2 is a flow chart of steps of a request processing method provided by an embodiment of the present disclosure
  • FIG. 3 and FIG. 4 are schematic diagrams of two processing flows of data processing requests provided by embodiments of the present disclosure.
  • FIG. 5 and FIG. 6 are schematic diagrams of two layouts of a data center gateway provided by an embodiment of the present disclosure
  • Fig. 7 is a structural block diagram of a request processing device provided by an embodiment of the present disclosure.
  • Fig. 8 is a structural block diagram of an electronic device provided by an embodiment of the present disclosure.
  • FIG. 1 is a schematic diagram of a data processing scenario applicable to an embodiment of the present disclosure.
  • Fig. 1 exemplarily shows three data centers D1 to D3, and D1, D2 and D3 are connected to each other by communication, so as to perform data synchronization from the master data center to the slave data center.
  • the data center here refers to the computer room used to process and store data.
  • D1 is used to process data processing requests of m1 areas A1_1 to A1_m1. That is to say, the master data center of the area A1_1 to A1_m1 is D1, and D2 and D3 are the slave data centers of the area A1_1 to A1_m1. After D1 processes the data processing requests of the users in areas A1_1 to A1_m1, the data can be synchronized to D2 and D3.
  • D2 is used to process the data processing requests of m2 areas A2_1 to A2_m2. That is to say, the master data center of A2_1 to A2_m2 is D2, and D1 and D3 are the slave data centers of areas A2_1 to A2_m2. After D2 processes the data processing requests of users in areas A2_1 to A2_m2, the data can be synchronized to D1 and D3.
  • D3 is used to process the data processing requests of m3 areas A3_1 to A3_m3. That is to say, the master data center of A3_1 to A3_m3 is D3, and D1 and D2 are the slave data centers of areas A3_1 to A3_m3. After D3 processes the data processing requests of users in areas A3_1 to A3_m3, the data can be synchronized to D1 and D2.
  • a region corresponds to only one master data center and multiple slave data centers, but one master data center can correspond to one or more regions, and one slave data center can correspond to one or more regions.
  • the data processing request is processed by the master data center in the area corresponding to the user, and the master data center synchronizes it to the slave data center after processing.
  • the user can be a buyer and a seller. For example, if the buyer U1 is in the area A1_1, the data processing request initiated by the buyer U1 for the order is processed by the main data center D1 in the area A1_1. For another example, if the seller U2 is in the area A2_1, then the data processing request initiated by the seller U2 for the order is processed by the main data center D2 in the area A2_1.
  • the buyer U1 in area A1_1 wants to cancel the order after buying a commodity.
  • the master data center D1 in area A1_1 changes the status of the order to cancel.
  • the seller U2 of this product is in area A2_1, and U2 has shipped the order.
  • the master data center D2 corresponding to area A2_1 changes the status of the order to shipped. In this way, the status of the same order in D1 and D2 is inconsistent.
  • the embodiment of the present disclosure considers that no matter whether the buyer initiates a data processing request for an order or the seller initiates a data processing request for an order, the master data center in the target area corresponding to the purchaser processes the data processing request . In this way, for the same order, both the buyer and the seller modify the data in the same data processing center, thereby avoiding data inconsistency between the two data centers caused by the buyer and the seller modifying data in different data centers.
  • the buyer U1 in area A1_1 wants to cancel the order after buying a product, at this time, D1 changes the status of the order to cancel.
  • the data processing request for the order is processed by the master data center in the buyer's area, so when the seller U2 of this product ships the order, the master data center D1 corresponding to the area A1_1 will The status of the order was changed to Shipped. In this way, there is only one status of the same order, and there is no inconsistency of status.
  • Fig. 2 is a flow chart of steps of a request processing method provided by an embodiment of the present disclosure.
  • the method shown in Figure 2 can be applied in the first gateway, which is used to schedule and forward data processing requests, and the first gateway can be an independent device, or a virtual gateway integrated on other devices module.
  • the request processing method includes:
  • S101 Receive a data processing request, where the data processing request is used to process an order.
  • the data processing request may be initiated by the buyer, the seller, or any other third party, which is not limited in the embodiments of the present disclosure.
  • data processing requests can be divided into two categories: data write requests and data read requests.
  • the data writing request is used for adding data, deleting data and modifying data.
  • the data read request is used to read data from the data center, and will not modify, delete, or add data in the data center.
  • the data processing request may be a data writing request, which is used to write the data of the newly generated order into the data center.
  • the data processing request may be a data writing request, which is used to modify the status of the order in the data center.
  • the data processing request may be a data writing request, which is used to delete the data of the specified order in the data center.
  • the data processing request may be a data reading request, which is used to obtain relevant data of the order from the data center.
  • the buyer or seller can initiate the above data processing request through their respective electronic devices.
  • the above data processing request may be initiated in an application program or a webpage running on the electronic device.
  • the target area may be any of the following areas: the area where the buyer is currently located, and the area where the buyer is registered. In practical applications, the target area may be set to be the area where the buyer is currently located or the area to which the buyer is registered according to certain requirements. A region here is a geographically divided area.
  • the aforementioned target area may be determined according to the information carried in the data processing request.
  • the data processing request may include at least one of the following information: the target area, domain name information of the device submitting the data processing request, and identity information of the purchaser.
  • the data of all orders are divided into multiple sub-data sets according to the area of the buyer of the order.
  • a region's subdatasets correspond to a master data center, which has sole permission to write to that region.
  • a region corresponds to only one primary data center.
  • a master data center may correspond to sub-datasets of one or more regions, and the sub-datasets of these regions of the master data center constitute the data set of the master data center. It can be understood that the data sets of the remaining data centers are the same as the data sets of the main data center, and are full data of all orders.
  • the device may determine a target area, add the target area to the data processing request and send it.
  • the device can determine the target area based on the following information: SIM (subscriber identity module, subscriber identity card) information on the device, the IP (internet protocol, network protocol) address of the device, and the system area of the device.
  • SIM subscriber identity module
  • subscriber identity card information on the device
  • IP internet protocol, network protocol
  • the target area when the target area is determined according to the SIM information, the area to which the SIM card belongs may be determined as the target area. For example, if the area is a country, then the MCC (mobile country code, mobile country code) of the SIM card can be used as the target area.
  • MCC mobile country code, mobile country code
  • the area to which the IP address belongs may be determined as the target area.
  • the system area of the device may be determined as the target area.
  • the system area of the device may be the area set by the user when using the device for the first time.
  • the above three methods for determining the target area may have corresponding priorities, so that one of the methods may be selected according to the priority to determine the target area.
  • the target area is determined according to the following priorities from high to low: the priority of the target area is determined by SIM information, the target area is determined by IP address, and the target area is determined by The system zone of the device determines the target zone.
  • the device that initiates the data processing request does not determine the target area, that is, the data processing request does not carry the target area, so when the first gateway receives the data processing request , need to determine the target area.
  • the first gateway may determine the target area according to the above domain name information. Specifically, the above domain name information is analyzed to obtain the target area corresponding to the purchaser of the order.
  • domain name information corresponds to regions, and domain name information corresponding to different regions is different.
  • the domain name information of the purchaser's device represents the current area where the purchaser is located, and the current area may be the target area. Since the relationship between the domain name information and the area is fixed, the accuracy of the target area determined according to the domain name information is relatively high.
  • the area corresponding to the domain name information is the current area where the user initiating the data processing request is located, so the area may be the area where the buyer is currently located, or the area where the seller is currently located. If the data processing request is processed through the data center in the area where the seller is located, then, as in the prior art, the data processing requests of the seller and the buyer are processed by two data centers respectively, so there is an inconsistency in the status of the order The problem.
  • the target area needs to be determined through the remaining methods. In this way, it is possible to avoid determining the area where the seller is currently located as the target area, which helps to improve the accuracy of the target area, avoids processing data processing requests through the data center in the area where the seller is located, and further ensures the state consistency of the order .
  • the device that initiates the data processing request does not determine the target area, that is, the data processing request does not carry the target area, so when the first gateway receives the data processing request , need to determine the target area.
  • the first gateway may also determine the target area according to the identity information, where the identity information is a unique identifier used to represent the purchaser.
  • the identity information is a unique identifier used to represent the purchaser.
  • the identification information here may be a character string corresponding to the purchaser one by one. Therefore, after the data center generates unique identification information for the purchaser, the corresponding relationship between the identification information and the attribution area can be recorded as registration information. Therefore, the embodiment of the present disclosure can also determine the target area through the buyer's identity information and registration information in the data processing request.
  • the area corresponding to the identity information in the data processing request is obtained from the registration information as the target area corresponding to the purchaser of the order, and the registration information includes at least one identity information of the purchaser.
  • the attribution area of information registration For example, if a buyer registers as the region A1_1 at the time of registration, then the target region of the data processing request for the buyer's order is A1_1, so the data processing request can be processed by the main data center D1 of A1_1.
  • the area determined according to the buyer's identity information must be the buyer's belonging area, and cannot be the seller's area, so that it is not necessary to judge who is the initiator of the data processing request, and the accuracy of the target area can also be guaranteed degree, thereby ensuring the state consistency of the order.
  • S103 Select the primary data center corresponding to the target area from the preset configuration information as the first data center for processing the data processing request, where the preset configuration information includes the primary data centers corresponding to at least one area respectively.
  • the preset configuration information is obtained through pre-configuration, and the format of the preset configuration information can be set flexibly, as long as it can represent the corresponding relationship between the region and the main data center.
  • the first format of the preset configuration information can be: ⁇ D1: A1_1, ..., A1_m1 ⁇ , ⁇ D2: A2_1, ..., A2_m2 ⁇ and ⁇ D3: A3_1, ..., A3_m3 ⁇ .
  • the second format of the above preset configuration information may be: ⁇ A1, D1 ⁇ , ..., ⁇ A1_m1, D2 ⁇ , ⁇ A2_1, D2 ⁇ , ..., ⁇ A2_m2, D2 ⁇ , ⁇ A3_1, D3 ⁇ , ..., ⁇ A3_m3, D3 ⁇ .
  • Embodiments of the present disclosure do not limit the format of the configuration information.
  • the region and the main data center in the second format have a one-to-one correspondence, so that the region can be used as an index, and the main data center can be determined according to the region, which helps to improve the retrieval efficiency and further improve the determination of the first data center. Acquisition speed of the center.
  • the first data center determined from the configuration information is D3.
  • the configuration information can be modified.
  • data center D1 when data center D1 is abnormal, it is necessary to modify the master data center corresponding to areas A1_1 to A1_m1 to data center D2 or D3, and modify D1 to be a slave data center.
  • This modification can be obtained by modifying the above configuration information.
  • the configuration information in the above-mentioned first format is taken as an example below for description.
  • the modified configuration information can be: ⁇ D2: A1_1, ..., A1_m1, A2_1, ..., A2_m2 ⁇ and ⁇ D3: A3_1, ..., A3_m3 ⁇ .
  • the embodiment of the present disclosure may stop processing the data processing request of the area corresponding to the main data center being modified in the preset configuration information during the process of modifying the above preset configuration information. Continue to process the data processing request of this area after modifying the configuration information.
  • the first gateway when the first gateway receives a data processing request, it first determines the target area of the data processing request, and then determines the first data center in the target area, if the first data center is in the preset configuration information modified primary data center, then the first gateway will not send the data processing request to the first data center center for processing.
  • the first gateway may also reply an indication message to the originator of the data processing request to remind that the data processing request cannot be processed temporarily.
  • the above data processing request can be divided into a data write request and a data read request.
  • the embodiment of the present disclosure determines the data center to process the data write request and the data read request according to different strategies.
  • the data processing request is a data write request
  • the data write request needs to be processed by the master data center and synchronized to the slave data center to ensure that the data in each data center is consistent. That is to say, the first gateway may select the primary data center corresponding to the target area from the preset configuration information as the first data center for processing the data write request, so as to process the data write request through the first data center. deal with.
  • the data processing request is a data reading request
  • it can be considered to process the data reading request from the data center, which can prevent all requests from being processed by the main data center and help reduce the load of the main data center. Furthermore, it can prevent the main data center from causing abnormality due to a large coincidence, and can ensure that the main data center is normal to process the data write request, which helps to improve the success rate and processing efficiency of the main data center for data write requests.
  • the data read request may carry a real-time identifier, which is used to indicate that the data read request requires real-time data. Therefore, the first gateway can determine the data center that processes the data read request according to the real-time identifier. Since the primary data center is a data center that processes data write requests, the data in the primary data center is the latest data, that is, data with high real-time performance. Therefore, the master data center can process the data reading request with higher real-time requirement, and the slave data center can process the data read request with lower real-time requirement.
  • the real-time identifier carried by the data read request is the first identifier
  • the data read request has a high requirement for real-time performance
  • the first gateway can select the master server corresponding to the target area from the preset configuration information.
  • the data center serves as the first data center for processing the data read request, so as to process the data read request through the first data center.
  • the high real-time requirement of the data reading request on the data can be guaranteed.
  • the data read request for reading the state of an order has high requirements for real-time performance, and it can carry the first identifier, so that the read request can be performed by the main data center. Process the data read request to get the status of the order.
  • the real-time identifier carried by the data read request is the second identifier
  • the data read request has relatively low requirements for real-time performance
  • the first gateway can process the data read request through the second data center, which No.
  • the second data center is a data center other than the first data center in the target area.
  • the data reading request for reading the commodity information of the order has low real-time requirements, and it can carry the second identification, so that the order can be read by the slave data center.
  • the data read request of the product information is processed.
  • the secondary data center can process the data reading request with low data real-time requirement, so that the load of the primary data center can be further reduced on the premise of satisfying the low data real-time requirement. Furthermore, it can prevent the main data center from causing abnormality due to a large coincidence, and can ensure that the main data center is normal to process the data write request, which helps to improve the success rate and processing efficiency of the main data center for data write requests.
  • S104 Send the above data processing request to the first data center for processing.
  • the above steps from S101 to S104 may be performed by the first gateway.
  • the first gateway here may be a gateway corresponding to any data center.
  • the gateway of each data center in the embodiment of the present disclosure can realize the receiving and forwarding of the data processing request in the embodiment of the present disclosure, that is, any gateway can execute the processes from S101 to S104.
  • the embodiments of the present disclosure can also receive and forward the data processing request through other gateways when one gateway is abnormal, which helps to improve the processing success of the data processing request rate, to avoid a gateway abnormality and the overall unavailability.
  • each data center has a gateway, which can balance the processing load of each gateway, avoid gateway abnormality caused by a large processing match of the gateway, and further improve the processing success rate of data processing requests.
  • the first data center in this embodiment of the present disclosure may be a data center corresponding to the first gateway, or may be a data center corresponding to other gateways.
  • the first gateway may send the data processing request to the first server for processing, and the first server is the server of the first data center.
  • the first gateway can send the data processing request to the second server for processing through the second gateway.
  • the second gateway is the server of the first data center, and the second gateway is the server of the first data center.
  • the second server is the server of the first data center.
  • FIG. 3 and FIG. 4 are schematic diagrams of two processing flows of data processing requests provided by embodiments of the present disclosure.
  • data center D1 corresponds to server S1 and gateway G1
  • data center D2 corresponds to server S2 and gateway G2
  • data center D3 corresponds to server S3 and gateway G3.
  • G1 when the gateway G1 receives the data processing request R1, G1 is the first gateway. If G1 determines that the first data center of R1 is D1, then the server S1 of D1 is the first server. Therefore, G1 can send R1 to S1 for processing.
  • G1 when the gateway G1 receives the data processing request R2, G1 is the first gateway. If G1 determines that the first data center of R2 is D2, then the server S2 of D2 is the second server. Therefore, G1 can send R2 to G2, and G2 can send R2 to S2 for processing.
  • D2 or D3 receives a data processing request
  • D2 or D3 is the first gateway
  • the first data center is determined according to the above process, so as to determine whether the first data center is the data corresponding to the first gateway.
  • the center forwards the data processing request, and the forwarding process is similar to the process shown in FIG. 3 and FIG. 4 above, which will not be repeated here in the embodiments of the present disclosure.
  • FIG. 5 and FIG. 6 are schematic diagrams of two layouts of a data center gateway provided by an embodiment of the present disclosure.
  • a data center is configured with: an application programming interface (application programming interface, API) layer, a server, and a data system.
  • API application programming interface
  • the application program interface layer is used to receive the data processing request and forward it to the server, and the server is used to process the data in the data system according to the data processing request, and the data system can be understood as a database.
  • the gateway may be an API in the API layer in the data center.
  • the gateway may also be a service mounted on the server.
  • the gateway is a service mounted on the server
  • the first data center is the data center corresponding to the first gateway
  • the first gateway is a service mounted on the server of the first data center, called First service. Therefore, in the process of the first gateway sending the data processing request to the first server for processing, the data processing request can be sent to the first server corresponding to the first service for the first service, and both the first gateway and the first server belong to First data center.
  • the gateway is a service mounted on the server
  • the first gateway is a service mounted on the server of the second data center, which can be called
  • the second gateway is a service mounted on the server of the first data center, which can be called the second service
  • the second data center is a data center other than the first data center. Therefore, the first gateway can send the data processing request to the second server for processing through the second gateway, and can send the data processing request to the second service for the first service, and the second service can send the data processing request to The second server corresponding to the second service performs processing. Both the second gateway and the second server belong to the first data center.
  • the gateway is an API in the API layer of the data center
  • the first gateway is an API in the application programming interface API layer of the first data center, called for the first API. Therefore, the process of the first gateway sending the data processing request to the first server for processing can be for the first API to send the data processing request to the first server corresponding to the first API for processing, the first gateway and the first server All belong to the first data center.
  • the gateway is an API in the API layer of the data center
  • the first gateway is an API in the API layer of the second data center
  • the second gateway is No.
  • An API in the API layer of a data center, and a second data center is a data center other than the first data center. Therefore, the first gateway can send the data processing request to the second server for processing through the second gateway, and can send the data processing request to the second API for the first API, and the second API sends the data processing request to The second server corresponding to the second API performs processing. Both the second gateway and the second server belong to the first data center.
  • the gateway can be set at the API layer and the server side at the same time, so that when the API layer can determine the target area, since the first data center can be determined, the data processing request can be sent to the first data center through the API. If the API layer cannot determine the target area, since the first data center cannot be determined, the API needs to send the data processing request to its corresponding server first, so that the server can determine the target area and the first data center, and process the data The request is sent to the second gateway of the second server, and the second gateway sends the data processing request to the first data center.
  • the embodiments of the present disclosure can realize the forwarding of the data processing request in various ways, which helps to improve the success rate of forwarding the data processing request, and further improves the processing success rate of the data processing request.
  • FIG. 7 is a structural block diagram of a request processing device provided in an embodiment of the present disclosure, which is applied to the first gateway.
  • the request processing apparatus 200 includes: a data processing request receiving module 201 , a target area determining module 202 , a data center determining module 203 and a data processing module 204 .
  • the data processing request receiving module 201 is configured to receive a data processing request, and the data processing request is used to process the order.
  • a target area determining module 202 configured to determine the target area corresponding to the buyer of the order.
  • a data center determination module 203 configured to select the primary data center corresponding to the target area from preset configuration information as the first data center for processing the data processing request, the preset configuration information including at least one area corresponding to the main data center.
  • the data processing module 204 is configured to send the data processing request to the first data center for processing.
  • the data processing module 204 is also used for:
  • the first data center is the data center corresponding to the first gateway, sending the data processing request to the first service
  • the end performs processing
  • the first server end is a server end of the first data center.
  • the data processing request is sent to the second server for processing through the second gateway, and the second gateway is the first data center.
  • the server end of the center, the second server end is the server end of the first data center.
  • the first gateway is a service mounted on a server of the first data center.
  • the first gateway is linked
  • the service carried on the server of the second data center the second gateway is a service mounted on the server of the first data center, and the second data center is outside the first data center data center.
  • the first gateway is an API in an application program interface API layer of the first data center.
  • the first gateway is an API in the API layer of the second data center
  • the second gateway is an API of the first data center
  • the second data center is a data center other than the first data center.
  • the above-mentioned data processing module 204 is also used for:
  • the data processing request is a data write request or a data read request carrying a real-time identifier of the first identifier
  • the data processing request is sent to the first data center for processing, and the data write The request is used to perform at least one of the following processing on the order: adding data, deleting data and modifying data.
  • the device also includes:
  • the second data processing module is configured to: if the data processing request is a data reading request, and the real-time identification carried by the data reading request is a second identification, then process the data reading request through the second data center For processing, the second data center is a data center other than the first data center.
  • the device also includes:
  • a configuration information modifying module configured to modify the preset configuration information.
  • the stop processing module is configured to, during the process of modifying the preset configuration information, stop processing the data processing request of the area corresponding to the primary data center being modified in the preset configuration information.
  • the data processing request includes the target area
  • the target area determination module 202 is further configured to:
  • the target area is extracted from a target field of the data processing request.
  • the data processing request includes domain name information of the device that submitted the data processing request
  • the target area determination module 202 is further configured to:
  • the domain name information is analyzed to obtain the target area corresponding to the purchaser of the order.
  • the data processing request includes the buyer's identity information
  • the target area determining module 202 is further configured to:
  • the area corresponding to the identity information is obtained from the registration information as the target area corresponding to the purchaser of the order, and the registration information includes at least one attribution area registered with the identity information of the purchaser.
  • the request processing device provided in this embodiment can be used to execute the technical solution of the method embodiment shown in FIG. 2 above, and its implementation principle and technical effect are similar, so this embodiment will not repeat them here.
  • Fig. 8 is a structural block diagram of an electronic device 600 provided by an embodiment of the present disclosure.
  • the electronic device 600 includes a memory 602 and at least one processor 601 .
  • the memory 602 stores computer-executable instructions.
  • At least one processor 601 executes the computer-executed instructions stored in the memory 602, so that the electronic device 601 implements the aforementioned method in FIG. 2 .
  • the electronic device may also include a receiver 603 and a transmitter 604, the receiver 603 is used to receive information from other devices or devices, and forwards it to the processor 601, and the transmitter 604 is used to send information to other devices or devices .
  • an embodiment of the present disclosure provides a request processing method, which is applied to a first gateway, and the method includes:
  • the data processing request is used to process the order
  • the sending the data processing request to the first data center for processing includes:
  • the data processing request is sent to the first server for processing, and the first server is the service of the first data center end;
  • the data processing request is sent to the second server for processing through the second gateway, and the second gateway is the first data center.
  • the server end of the center, the second server end is the server end of the first data center.
  • the first gateway when the first data center is the data center corresponding to the first gateway, the first gateway is mounted on services on the server side of the first data center;
  • the first gateway is a service mounted on the server of the second data center
  • the second gateway is a service mounted on the server of the second data center
  • the service on the server end of the first data center, the second data center is a data center other than the first data center.
  • the first gateway is the second an API in the application programming interface API layer of the data center;
  • the first gateway is an API in the API layer of the second data center
  • the second gateway is an API of the first data center
  • the second data center is a data center other than the first data center.
  • the sending the data processing request to the first data center for processing includes:
  • the data processing request is a data write request or a data read request carrying a real-time identifier of the first identifier
  • the data processing request is sent to the first data center for processing, and the data write The request is used to perform at least one of the following processing on the order: adding data, deleting data and modifying data.
  • the method further includes:
  • the data processing request is a data reading request
  • the real-time identifier carried by the data reading request is the second identifier
  • the data reading request is processed through the second data center
  • the second data A center is a data center other than the first data center.
  • the seventh example of the first aspect further includes:
  • the data processing request includes the target area, and the target area corresponding to the buyer of the order is determined area, including:
  • the target area is extracted from a target field of the data processing request.
  • the data processing request includes domain name information of the device that submitted the data processing request, and the determination of the order Target regions for buyers of , including:
  • the domain name information is analyzed to obtain the target area corresponding to the purchaser of the order.
  • the data processing request includes the identity information of the buyer, and the buyer who determines the order Corresponding target areas include:
  • the area corresponding to the identity information is obtained from the registration information as the target area corresponding to the purchaser of the order, and the registration information includes at least one attribution area registered with the identity information of the purchaser.
  • a request processing device which is applied to the first gateway, and the device includes:
  • a data processing request receiving module configured to receive a data processing request, and the data processing request is used to process an order
  • a target area determining module configured to determine the target area corresponding to the buyer of the order
  • a data center determination module configured to select the primary data center corresponding to the target area from preset configuration information as the first data center for processing the data processing request, the preset configuration information including at least one area respectively The corresponding main data center;
  • a data processing module configured to send the data processing request to the first data center for processing.
  • the data processing module is further configured to:
  • the first data center is the data center corresponding to the first gateway, sending the data processing request to the first service
  • the terminal performs processing, and the first server is the server of the first data center;
  • the data processing request is sent to the second server for processing through the second gateway, and the second gateway is the first data center.
  • the server end of the center, the second server end is the server end of the first data center.
  • the first gateway when the first data center is the data center corresponding to the first gateway, the first gateway is mounted on services on the server side of the first data center;
  • the first gateway is a service mounted on the server of the second data center
  • the second gateway is a service mounted on the server of the second data center
  • the service on the server end of the first data center, the second data center is a data center other than the first data center.
  • the first gateway is the second an API in the application programming interface API layer of the data center;
  • the first gateway is an API in the API layer of the second data center
  • the second gateway is an API of the first data center
  • the second data center is a data center other than the first data center.
  • the data processing module is further used for:
  • the data processing request is a data write request or a data read request carrying a real-time identifier of the first identifier
  • the data processing request is sent to the first data center for processing, and the data write The request is used to perform at least one of the following processing on the order: adding data, deleting data and modifying data.
  • the device further includes:
  • the second data processing module is configured to: if the data processing request is a data reading request, and the real-time identification carried by the data reading request is a second identification, then process the data reading request through the second data center For processing, the second data center is a data center other than the first data center.
  • the device further includes:
  • a configuration information modifying module configured to modify the preset configuration information
  • the stop processing module is configured to, during the process of modifying the preset configuration information, stop processing the data processing request of the area corresponding to the primary data center being modified in the preset configuration information.
  • the data processing request includes the target area
  • the target area determination module is further configured to:
  • the target area is extracted from a target field of the data processing request.
  • the data processing request includes domain name information of the device that submitted the data processing request, and the target area determination module Also used for:
  • the domain name information is analyzed to obtain the target area corresponding to the purchaser of the order.
  • the data processing request includes the identity information of the purchaser, and the target area determination module is further configured to :
  • the area corresponding to the identity information is obtained from the registration information as the target area corresponding to the purchaser of the order, and the registration information includes at least one attribution area registered with the identity information of the purchaser.
  • an electronic device including: at least one processor and a memory;
  • the memory stores computer-executable instructions
  • the at least one processor executes the computer-executed instructions stored in the memory, so that the electronic device implements the method according to any one of the first aspect.
  • a computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, Making a computing device implement the method of any one of the first aspects.
  • a computer program is provided, the computer program is used to implement the method described in any one of the first aspect.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种请求处理方法及装置、电子设备、存储介质、计算机程序及计算机程序产品,涉及计算机处理技术领域。该方法包括:接收数据处理请求,该数据处理请求用于对订单进行处理;确定订单的购买方对应的目标区域;从预设配置信息中选取目标区域对应的主数据中心作为对数据处理请求进行处理的第一数据中心,预设配置信息中包括至少一个区域分别对应的主数据中心;将数据处理请求发送给第一数据中心进行处理。对于购买方和售卖方对订单发起数据处理请求,均由购买方对应的目标区域的主数据中心对数据处理请求进行处理。这样,对于同一个订单,购买方和售卖方均是对同一个数据处理中心的数据进行处理,从而避免购买方和售卖方修改不同数据中心的数据,而导致的两个数据中心的数据不一致。

Description

请求处理方法及设备
相关申请的交叉引用
本公开要求于2022年2月28日提交的申请号为202210190744.9、名称为“请求处理方法及设备”的中国专利申请的优先权,此申请的内容通过引用并入本文。
技术领域
本公开实施例涉及计算机处理技术领域,尤其涉及一种请求处理方法及装置、电子设备、存储介质、计算机程序及计算机程序产品。
背景技术
在经济全球化的当代,商品的购买可以是跨区域的。一个国家可以为一个区域,或一个或多个国家构成一个区域。例如,国家A1的用户可以购买国家A2的售卖方的商品。这些购买过程形成了大量的订单,订单可以由数据中心进行存储和管理。例如,当数据处理请求用于新增订单时,数据中心可以存储新增的订单;当数据处理请求用于修改订单时,数据中心可以修改指定的订单;当数据处理请求用于删除订单时,数据中心可以删除指定的订单;当数据处理请求用于读取订单数据时,数据中心可以返回指定的订单的数据。
现有技术中,通常可以设置多个数据中心,但是每个区域对应一个负责该区域的数据中心,该区域的用户的数据处理请求由对应的该数据中心进行处理,该数据中心处理之后同步给其余数据中心。在接收到对订单的数据处理请求时,对应的该数据中心可以对订单的数据进行修改。
然而,在上述过程中,可能会导致同一订单的状态不一致。
发明内容
本公开实施例提供一种请求处理方法及设备。
第一方面,本公开实施例提供一种请求处理方法,应用于第一网关,所述方法包括:
接收数据处理请求,所述数据处理请求用于对订单进行处理;
确定所述订单的购买方所对应的目标区域;
从预设配置信息中选取所述目标区域对应的主数据中心作为对所述数据处理请求进行处理的第一数据中心,所述预设配置信息中包括至少一个区域分别对应的主数据中心;
将所述数据处理请求发送给所述第一数据中心进行处理。
第二方面,本公开实施例提供一种请求处理装置,应用于第一网关,所述装置包括:
数据处理请求接收模块,用于接收数据处理请求,所述数据处理请求用于对订单进行处理;
目标区域确定模块,用于确定所述订单的购买方所对应的目标区域;
数据中心确定模块,用于从预设配置信息中选取所述目标区域对应的主数据中心作为对所述数据处理请求进行处理的第一数据中心,所述预设配置信息中包括至少一个区域分别对应的主数据中心;
数据处理模块,用于将所述数据处理请求发送给所述第一数据中心进行处理。
第三方面,本公开实施例提供一种电子设备,包括:至少一个处理器和存储器;
所述存储器存储计算机执行指令;
所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述电子设备实现如第一方面所述的方法。
第四方面,本公开实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,使计算设备实现如第一方面所述的方法。
第五方面,本公开实施例提供一种计算机程序,所述计算机程序用于实现如第一方面所述的方法。
第六方面,本公开实施例提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如第一方面所述的方法。
附图说明
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本公开实施例适用的数据处理场景的示意图;
图2是本公开实施例提供的一种请求处理方法的步骤流程图;
图3和图4是本公开实施例提供的数据处理请求的两种处理流程示意图;
图5和图6是本公开实施例提供的一种数据中心的网关的两种布局示意图;
图7是本公开实施例提供的一种请求处理装置的结构框图;
图8是本公开实施例提供的一种电子设备的结构框图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
本公开实施例可以应用于订单的数据处理场景中。图1是本公开实施例适用的数据处理场景的示意图。图1中示例性示出了三个数据中心D1至D3,D1、D2和D3之间相互通信连接,以进行主数据中心至从数据中心的数据同步。这里的数据中心是指用于对数据进行处理以及存储的机房。
参照图1所示,D1用于对m1个区域A1_1至A1_m1的数据处理请求进行处理。也就是说,区域A1_1至A1_m1的主数据中心为D1,D2和D3为区域A1_1至A1_m1的从数据中心。在D1对区域A1_1至A1_m1中的用户的数据处理请求进行处理之后,可以将数据同步给D2和D3。
D2用于对m2个区域A2_1至A2_m2的数据处理请求进行处理。也就是说,A2_1至A2_m2的主数据中心为D2,D1和D3为区域A2_1至A2_m2的从数据中心。在D2对区域A2_1至A2_m2中的用户的数据处理请求进行处理之后,可以将数据同步给D1和D3。
D3用于对m3个区域A3_1至A3_m3的数据处理请求进行处理。也就是说,A3_1至A3_m3的主数据中心为D3,D1和D2为区域A3_1至A3_m3的从数据中心。在D3对区域A3_1至A3_m3中的用户的数据处理请求进行处理之后,可以将数据同步给D1和D2。
从图1中可以看出,一个区域仅对应一个主数据中心和多个从数据中心,但一个主数据中心可以对应一个或多个区域,一个从数据中心可以对应一个或多个区域。
现有技术中,当一个用户发起数据处理请求时,该数据处理请求由该用户所对应的区域的主数据中心进行处理,主数据中心处理之后同步给从数据中心。该用户可以为购买方和售卖方。例如,如果购买方U1在区域A1_1,那么购买方U1对订单发起的数据处理请求由该区域A1_1的主数据中心D1进行处理。又例如,如果售卖方U2在区域A2_1,那么售卖方U2对订单发起的数据处理请求由该区域A2_1的主数据中心D2进行处理。
可以看出,在上述过程中,当购买方和售卖方对应不同区域,并且不同区域对应不同的主数据中心时,购买方和售卖方对同一订单的数据处理请求由不同的主数据中心进行处理。这样,可能会导致同一订单的状态不一致。
例如,区域A1_1的购买方U1买了一个商品之后又要取消订单,此时,区域A1_1的主数据中心D1将该订单的状态修改为取消。而这个商品的售卖方U2在区域A2_1,U2对这个订单进行了发货,此时,区域A2_1对应的主数据中心D2将该订单的状态修改为已发货。这样,同一个订单在D1和D2中的状态不一致。
为了解决上述技术问题,本公开实施例考虑无论是购买方对订单发起数据处理请求,还是售卖方对订单发起数据处理请求,均由购买方对应的目标区域的主数据中心对数据处理请求进行处理。这样,对于同一个订单,购买方和售卖方均是对同一个数据处理中心的数据进行修改,从而避免购买方和售卖方修改不同数据中心的数据,而导致的两个数据中心的数据不一致。
例如,区域A1_1的购买方U1买了一个商品之后又要取消订单,此时,D1将该订单的状态修改为取消。在本公开实施例中,对订单的数据处理请求均由购买方的区域的主数据中心进行处理,从而这个商品的售卖方U2对这个订单进行发货时,区域A1_1对应的主数据中心D1将该订单的状态修改为已发货。这样,同一个订单的状态只有一种,不存在状态不一致的情况。
下面以具体地实施例对本公开实施例的技术方案以及本公开的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本公开实施例进行描述。
图2是本公开实施例提供的一种请求处理方法的步骤流程图。图2所示的方法可以应用在第一网关中,该第一网关用于对数据处理请求进行调度和转发,该第一网关可以是一个独立的设备,也可以是集成在其余设备上的虚拟模块。参照图2所示,该请求处理方法包括:
S101:接收数据处理请求,所述数据处理请求用于对订单进行处理。
其中,数据处理请求可以是购买方发起的,也可以是售卖方发起的,还可以使其余任意第三方发起的,本公开实施例对其不加以限制。
此外,数据处理请求可以分为两类:数据写入请求和数据读取请求。其中,数据写入请求用于新增数据、删除数据和修改数据。数据读取请求用于从数据中心中读取数据,并不会对数据中心中的数据进行修改、删除、新增。
例如,当购买方需要下单时,数据处理请求可以是数据写入请求,用于向数据中心中写入新生成的订单的数据。
又例如,当购买方需要取消订单或售卖方需要发货时,数据处理请求可以是数据写入请求,用于修改该订单在数据中心中的状态。
再例如,当需要清理订单数据时,数据处理请求可以是数据写入请求,用于删除数据中心中的指定订单的数据。
当购买方或售卖方需要查询订单时,数据处理请求可以是数据读取请求,用于从数据中心中获取订单的相关数据。
需要说明的是,购买方或售卖方可以通过各自使用的电子设备发起上述数据处理请求。具体地,可以在电子设备上运行的应用程序或网页中发起上述数据处理请求。
S102:确定上述订单的购买方所对应的目标区域。
其中,目标区域可以是以下任意区域:购买方当前所在的区域、购买方注册的归属区域。在实际应用中,可以按照一定需求设定目标区域是购买方当前所在的区域或购买方注册的归属区域。这里的区域是地理上划分的区域。
上述目标区域可以根据数据处理请求中携带的信息确定。该数据处理请求中可以包括以下至少一种信息:该目标区域、提交数据处理请求的设备的域名信息和购买方的身份标识信息。在本公开实施例中,按照订单的购买方的区域将所有订单的数据划分为多个子数据集。一个区域的子数据集对应一个主数据中心,该主数据中心具有写入该区域的唯一权限。在同一时刻,一个区域仅对应一个主数据中心。
但是,一个主数据中心可以对应一个或多个区域的子数据集,这些主数据中心的这些区域的子数据集构成该主数据中心的数据集。可以理解的是,其余数据中心的数据集和主数据中心的数据集均相同,并且均为所有订单的全量数据。
在本公开实施例的一种示例中,当一个设备需要发送数据处理请求时,该设备可以确定目标区域,并将目标区域添加到数据处理请求中发送出去。该设备可以根据以下多种信息确定目标区域:该设备上的SIM(subscriber identity module,用户识别卡)信息、该设备的IP(internet protocol,网络协议)地址和该设备的系统区域。
具体地,当根据SIM信息确定目标区域时,可以将SIM卡归属的区域确定为目标区域。例如,如果区域是国家,那么可以将SIM卡的MCC(mobile country code,移动国家码)作为目标区域。
当根据IP地址确定目标区域时,可以将IP地址归属的区域确定为目标区域。
当根据设备的系统区域确定目标区域时,可以将该设备的系统区域确定为目标区域。该设备的系统区域可以是用户在初次使用设备时设置的区域。
在实际应用中,上述确定目标区域的三种方法可以对应有优先级,从而,可以按照该优先级选取其中一个方法确定目标区域。例如,按照以下从高到低的优先级确定目标区域:通过SIM信息确定目标区域的优先级、根据IP地址确定目标区域、根据 设备的系统区域确定目标区域。
当然,上述优先级可以按照实际应用场景灵活调整,本公开实施例对其不加以限制。
在本公开实施例的另一种示例中,发起数据处理请求的设备并未确定目标区域,也就是说,数据处理请求中并未携带目标区域,从而在第一网关接收到该数据处理请求时,需要确定目标区域。此时,第一网关可以根据上述域名信息确定目标区域。具体地,对上述域名信息进行解析,得到订单的购买方所对应的目标区域。
在实际应用中,域名信息与区域对应,不同区域对应的域名信息不同。当购买方发起数据处理请求时,购买方的设备的域名信息代表了该购买方当前所在的区域,该当前所在的区域可以为目标区域。由于域名信息和区域之间的关系是固定的,从而根据域名信息确定的目标区域的准确度较高。
需要说明的是,域名信息对应的区域是发起数据处理请求的用户当前所在的区域,从而该区域可以是购买方当前所在的区域,也可以是售卖方当前所在的区域。如果通过售卖方所在的区域的数据中心对数据处理请求进行处理,那么与现有技术一样,售卖方和购买方的数据处理请求分别由两个数据中心进行处理,从而也就存在订单的状态不一致的问题。
为了进一步避免出现上述问题,在对域名信息进行解析之前,还需要判断数据处理请求是否为购买方发起的,如果是购买方发起的,那么可以将域名解析得到的区域确定为目标区域。如果是售卖方发起的,那么需要通过后面其余方法确定目标区域。这样,可以避免将售卖方当前所在的区域确定为目标区域,有助于提高目标区域的准确度,避免通过售卖方所在的区域的数据中心对数据处理请求进行处理,进一步保证订单的状态一致性。
在本公开实施例的另一种示例中,发起数据处理请求的设备并未确定目标区域,也就是说,数据处理请求中并未携带目标区域,从而在第一网关接收到该数据处理请求时,需要确定目标区域。此时,第一网关还可以根据身份标识信息确定目标区域,其中,身份标识信息是用于表示购买方的唯一标识。由于购买方在注册信息时,通常会注册该购买方所对应的归属区域,其中,这里的身份标识信息可以是一字符串,与购买方一一对应。从而,数据中心对该购买方生成唯一的身份标识信息之后,可以将该身份标识信息与该归属区域之间的对应关系记录下来,作为注册信息。从而本公开实施例还可以通过数据处理请求中的购买方的身份标识信息及注册信息确定目标区域。
具体地,从注册信息中获取上述数据处理请求中的身份标识信息对应的区域作为订单的购买方所对应的目标区域,上述注册信息中包括至少一个购买方的身份标识信 息注册的归属区域。例如,一个购买方在注册时注册的归属区域为区域A1_1,那么对该购买方的订单的数据处理请求的目标区域为A1_1,从而该数据处理请求可以由A1_1的主数据中心D1进行处理。同样地,根据购买方的身份标识信息确定的区域一定是购买方的归属区域,不可能是售卖方的区域,从而可以不需要判断数据处理请求的发起方是谁,也可以保证目标区域的准确度,进而保证订单的状态一致性。S103:从预设配置信息中选取上述目标区域对应的主数据中心作为对该数据处理请求进行处理的第一数据中心,该预设配置信息中包括至少一个区域分别对应的主数据中心。
其中,预设配置信息是预先配置得到的,预设配置信息的格式可以是灵活设置的,只要能表示区域和主数据中心之间的对应关系即可。
例如,对于图1所示的三个数据中心,预设配置信息的第一种格式可以为:{D1:A1_1、…、A1_m1}、{D2:A2_1、…、A2_m2}和{D3:A3_1、…、A3_m3}。
又例如,上述预设配置信息的第二种格式可以为:{A1,D1}、…、{A1_m1,D2}、{A2_1,D2}、…、{A2_m2,D2}、{A3_1、D3}、…、{A3_m3,D3}。本公开实施例对配置信息的格式不加以限制。
可以看出,第二种格式中的区域和主数据中心具有一一对应的关系,从而可以将区域作为索引,可以根据区域确定主数据中心,有助于提高检索效率,进而提高确定第一数据中心的获取速度。
基于上述配置信息,当S102确定的目标区域为A3_1时,从配置信息中确定的第一数据中心为D3。
当然,该配置信息可以修改。例如,在数据中心D1异常时,需要将区域A1_1至A1_m1对应的主数据中心修改为数据中心D2或D3,D1修改为从数据中心,该修改可以通过修改上述配置信息得到。下面以上述第一种格式的配置信息为例进行说明。当区域A1_1至A1_m1对应的主数据中心修改为D2时,修改后的配置信息可以为:{D2:A1_1、…、A1_m1、A2_1、…、A2_m2}和{D3:A3_1、…、A3_m3}。
除了上述修改配置信息的场景之外,还有其余场景需要修改配置信息。在修改配置信息的过程中,如果根据数据处理请求将数据写入到修改前的主数据中心,那么在修改之后,这部分数据可能会丢失或与新的主数据中心中的数据冲突。
为了避免出现这些问题,本公开实施例可以在修改上述预设配置信息的过程中,停止对预设配置信息中的正在修改的主数据中心对应的区域的数据处理请求进行处理。在修改配置信息之后再继续对该区域的数据处理请求进行处理。
具体地,第一网关在接收到一个数据处理请求时,首先确定该数据处理请求的目标区域,然后再确定该目标区域的第一数据中心,如果该第一数据中心是预设配置信息中正在修改的主数据中心,那么第一网关不会将该数据处理请求发送给该第一数据 中心进行处理。
当然,为了提高交互友好性,第一网关还可以向发起该数据处理请求的发起方回复指示消息,以提示该数据处理请求暂时无法处理。
从前述S101的说明中可以看出,上述数据处理请求可以划分为数据写入请求和数据读取请求。本公开实施例对于数据写入请求和数据读取请求按照不同的策略确定对其进行处理的数据中心。
当数据处理请求为数据写入请求时,该数据写入请求需要由主数据中心对其进行处理,并同步给从数据中心,以保证各个数据中心的数据是一致的。也就是说,第一网关可以从预设配置信息中选取目标区域对应的主数据中心作为对数据写入请求进行处理的第一数据中心,以通过该第一数据中心对该数据写入请求进行处理。
可以理解的是,如果数据写入请求不是按照本公开实施例提供的上述主数据中心进行处理,而是由从数据中心进行处理,那么会由于无法将写入的数据同步给主数据中心,而导致主数据中心和从数据中心的数据不一致。
当数据处理请求为数据读取请求时,可以考虑通过从数据中心对数据读取请求进行处理,这样可以避免所有请求均由主数据中心进行处理,有助于降低主数据中心的负荷。进而避免主数据中心由于符合较大而导致异常,可以保证主数据中心正常,以对数据写入请求进行处理,有助于提高主数据中心对数据写入请求的处理成功率和处理效率。
进一步地,数据读取请求可以携带实时性标识,用于表示该数据读取请求对数据实时性的要求。从而,第一网关可以根据该实时性标识确定对该数据读取请求进行处理的数据中心。由于主数据中心是对数据写入请求进行处理的数据中心,从而主数据中心中的数据是最新数据,也就是实时性较高的数据。从而可以由主数据中心对实时性要求较高的数据读取请求进行处理,由从数据中心对实时性要求较低的数据读取请求进行处理。
具体地,当数据读取请求携带的实时性标识为第一标识时,代表该数据读取请求对实时性的要求较高,从而第一网关可以从预设配置信息中选取目标区域对应的主数据中心作为对该数据读取请求进行处理的第一数据中心,以通过该第一数据中心对该数据读取请求进行处理。如此,可以保证数据读取请求对数据的高实时性要求。例如,由于获取订单的状态通常是要获取最新的状态,从而用于读取订单的状态的数据读取请求对实时性要求较高,其可以携带第一标识,从而可以由主数据中心对读取订单的状态的数据读取请求进行处理。
当数据读取请求携带的实时性标识为第二标识时,代表该数据读取请求对实时性的要求较低,从而第一网关可以通过第二数据中心对该数据读取请求进行处理,该第 二数据中心是该目标区域的第一数据中心之外的数据中心。例如,由于订单的商品信息的变更较小,从而用于读取订单的商品信息的数据读取请求对实时性要求较低,其可以携带第二标识,从而可以由从数据中心对读取订单的商品信息的数据读取请求进行处理。
可以理解的是,由于第一数据中心是该目标区域对应的主数据中心,从而第二数据中心是该目标区域对应的从数据中心。本公开实施例可以通过从数据中心对数据实时性要求较低的数据读取请求进行处理,这样可以在满足较低数据实时性要求的前提下,进一步降低主数据中心的负荷。进而避免主数据中心由于符合较大而导致异常,可以保证主数据中心正常,以对数据写入请求进行处理,有助于提高主数据中心对数据写入请求的处理成功率和处理效率。
S104:将上述数据处理请求发送给该第一数据中心进行处理。
在本公开实施例中,上述S101至S104的步骤可以由第一网关执行。这里的第一网关可以是任一数据中心对应的网关。本公开实施例的每个数据中心的网关均可以实现本公开实施例的数据处理请求的接收和转发,也就是任意网关均可以执行S101至S104的过程。
相对于只有一个网关进行接收和转发的场景,本公开实施例可以在一个网关出现异常的情况下,还可以通过其余网关对数据处理请求进行接收和转发,有助于提高数据处理请求的处理成功率,避免一个网关异常而整体不可用。此外,每个数据中心均具有网关,这样可以均衡每个网关的处理负荷,避免网关的处理符合较大而导致网关异常,进而进一步提高数据处理请求的处理成功率。
本公开实施例的第一数据中心可以是第一网关对应的数据中心,也可以是其余网关对应的数据中心。
当第一数据中心是上述第一网关所对应的数据中心时,第一网关可以将该数据处理请求发送给第一服务端进行处理,该第一服务端是第一数据中心的服务端。
当第一数据中心不是第一网关所对应的数据中心时,第一网关可以通过第二网关将数据处理请求发送给第二服务端进行处理,第二网关是第一数据中心的服务端,第二服务端是第一数据中心的服务端。
图3和图4是本公开实施例提供的数据处理请求的两种处理流程示意图。参照图3所示,数据中心D1对应服务端S1和网关G1,数据中心D2对应服务端S2和网关G2,数据中心D3对应服务端S3和网关G3。
参照图3所示,当网关G1接收到数据处理请求R1时,G1为第一网关。如果G1确定R1的第一数据中心为D1,那么D1的服务端S1为第一服务端。从而,G1可以将R1发送给S1进行处理。
参照图4所示,当网关G1接收到数据处理请求R2时,G1为第一网关。如果G1确定R2的第一数据中心为D2,那么D2的服务端S2为第二服务端。从而,G1可以将R2发送给G2,G2将R2发送给S2进行处理。
同理,当数据中心D2或D3接收到一个数据处理请求时,D2或D3为第一网关,并且按照上述过程确定第一数据中心,以根据第一数据中心是否是第一网关所对应的数据中心进行数据处理请求的转发,转发过程与上述图3和图4所示的过程类似,本公开实施例在此不再赘述。
图5和图6是本公开实施例提供的一种数据中心的网关的两种布局示意图。参照图5所示,一个数据中心设置有:应用程序接口(application programming interface,API)层、服务端和数据系统。
其中,应用程序接口层用于接收数据处理请求并转发给服务端,服务端用于根据数据处理请求对数据系统中的数据进行处理,数据系统可以理解为数据库。
参照图5所示,上述网关可以是数据中心中的API层中的一个API,参照图6所示,上述网关还可以是挂载在服务端上的一个服务。
当网关是挂载在服务端上的一个服务时,如果第一数据中心是第一网关所对应的数据中心,那么第一网关是挂载在第一数据中心的服务端上的服务,称为第一服务。从而第一网关将数据处理请求发送给第一服务端进行处理的过程,可以为第一服务将数据处理请求发送给第一服务对应的第一服务端,第一网关和第一服务端均属于第一数据中心。
当网关是挂载在服务端上的一个服务时,如果第一数据中心不是第一网关所对应的数据中心,那么第一网关是挂载在第二数据中心的服务端上的服务,可以称为第一服务,第二网关是挂载在第一数据中心的服务端上的服务,可以称为第二服务,第二数据中心是第一数据中心之外的数据中心。从而,第一网关可以通过该第二网关将数据处理请求发送给第二服务端进行处理的过程,可以为第一服务将数据处理请求发送给第二服务,第二服务将数据处理请求发送给第二服务对应的第二服务端进行处理。第二网关和第二服务端均属于第一数据中心。
当网关是数据中心中的API层中的一个API时,如果第一数据中心是第一网关所对应的数据中心,那么第一网关是第一数据中心的应用程序接口API层中的API,称为第一API。从而第一网关将数据处理请求发送给第一服务端进行处理的过程,可以为第一API将数据处理请求发送给第一API对应的第一服务端进行处理,第一网关和第一服务端均属于第一数据中心。
当网关是数据中心中的API层中的一个API时,如果第一数据中心不是第一网关所对应的数据中心,那么第一网关是第二数据中心的API层中的API,第二网关是第 一数据中心的API层中的API,第二数据中心是第一数据中心之外的数据中心。从而,第一网关可以通过该第二网关将数据处理请求发送给第二服务端进行处理的过程,可以为第一API将数据处理请求发送给第二API,第二API将数据处理请求发送给第二API对应的第二服务端进行处理。第二网关和第二服务端均属于第一数据中心。
可以理解的是,可以同时在API层和服务端设置网关,从而在API层可以确定目标区域时,由于可以确定第一数据中心,从而可以通过API将数据处理请求发送给第一数据中心。如果API层无法确定目标区域时,由于无法确定第一数据中心,从而需要API将数据处理请求先发送给自身对应的服务端,以使服务端确定目标区域和第一数据中心,并将数据处理请求发送给第二服务端的第二网关,第二网关将该数据处理请求发送给第一数据中心。如此,本公开实施例可以通过多种方式实现数据处理请求的转发,有助于提高数据处理请求的转发成功率,进而提高数据处理请求的处理成功率。
对应于上文实施例的请求处理方法,图7是本公开实施例提供的一种请求处理装置的结构框图,应用于第一网关。为了便于说明,仅示出了与本公开实施例相关的部分。参照图7,上述请求处理装置200包括:数据处理请求接收模块201、目标区域确定模块202、数据中心确定模块203和数据处理模块204。
其中,数据处理请求接收模块201,用于接收数据处理请求,所述数据处理请求用于对订单进行处理。
目标区域确定模块202,用于确定所述订单的购买方所对应的目标区域。
数据中心确定模块203,用于从预设配置信息中选取所述目标区域对应的主数据中心作为对所述数据处理请求进行处理的第一数据中心,所述预设配置信息中包括至少一个区域分别对应的主数据中心。
数据处理模块204,用于将所述数据处理请求发送给所述第一数据中心进行处理。
可选地,所述数据处理模块204还用于:
在将所述数据处理请求发送给所述第一数据中心进行处理时,若所述第一数据中心是所述第一网关所对应的数据中心,则将所述数据处理请求发送给第一服务端进行处理,所述第一服务端是所述第一数据中心的服务端。
若所述第一数据中心不是所述第一网关所对应的数据中心,则通过第二网关将所述数据处理请求发送给第二服务端进行处理,所述第二网关是所述第一数据中心的服务端,所述第二服务端是所述第一数据中心的服务端。
可选地,当所述第一数据中心是所述第一网关所对应的数据中心时,所述第一网关是挂载在所述第一数据中心的服务端上的服务。
当所述第一数据中心不是所述第一网关所对应的数据中心时,所述第一网关是挂 载在第二数据中心的服务端上的服务,所述第二网关是挂载在所述第一数据中心的服务端上的服务,所述第二数据中心是所述第一数据中心之外的数据中心。
可选地,当所述第一数据中心是所述第一网关所对应的数据中心时,所述第一网关是所述第一数据中心的应用程序接口API层中的API。
当所述第一数据中心不是所述第一网关所对应的数据中心时,所述第一网关是第二数据中心的API层中的API,所述第二网关是所述第一数据中心的API层中的API,所述第二数据中心是所述第一数据中心之外的数据中心。
可选地,上述数据处理模块204还用于:
若所述数据处理请求为数据写入请求或携带的实时性标识为第一标识的数据读取请求,则将所述数据处理请求发送给所述第一数据中心进行处理,所述数据写入请求用于对所述订单进行以下至少一种处理:新增数据、删除数据和修改数据。
可选地,所述装置还包括:
第二数据处理模块,用于若所述数据处理请求为数据读取请求,且所述数据读取请求携带的实时性标识为第二标识,则通过第二数据中心对所述数据读取请求进行处理,所述第二数据中心是所述第一数据中心之外的数据中心。
可选地,所述装置还包括:
配置信息修改模块,用于修改所述预设配置信息。
停止处理模块,用于在修改所述预设配置信息的过程中,停止对所述预设配置信息中的正在修改的主数据中心对应的区域的数据处理请求进行处理。
可选地,所述数据处理请求中包括所述目标区域,所述目标区域确定模块202还用于:
从所述数据处理请求的目标字段中提取所述目标区域。
可选地,所述数据处理请求中包括提交所述数据处理请求的设备的域名信息,所述目标区域确定模块202还用于:
对所述域名信息进行解析,得到所述订单的购买方所对应的目标区域。
可选地,所述数据处理请求中包括所述购买方的身份标识信息,所述目标区域确定模块202还用于:
从注册信息中获取所述身份标识信息对应的区域作为所述订单的购买方所对应的目标区域,所述注册信息中包括至少一个购买方的身份标识信息注册的归属区域。
本实施例提供的请求处理装置,可用于执行上述图2所示的方法实施例的技术方案,其实现原理和技术效果类似,本实施例此处不再赘述。
图8是本公开实施例提供的一种电子设备600的结构框图。该电子设备600包括存储器602和至少一个处理器601。
其中,存储器602存储计算机执行指令。
至少一个处理器601执行存储器602存储的计算机执行指令,使得电子设备601实现前述图2中的方法。
此外,该电子设备还可以包括接收器603和发送器604,接收器603用于接收从其余装置或设备的信息,并转发给处理器601,发送器604用于将信息发送到其余装置或设备。
在第一方面的第一种示例中,本公开实施例提供了一种请求处理方法,应用于第一网关,所述方法包括:
接收数据处理请求,所述数据处理请求用于对订单进行处理;
确定所述订单的购买方所对应的目标区域;
从预设配置信息中选取所述目标区域对应的主数据中心作为对所述数据处理请求进行处理的第一数据中心,所述预设配置信息中包括至少一个区域分别对应的主数据中心;
将所述数据处理请求发送给所述第一数据中心进行处理。
基于第一方面的第一种示例,在第一方面的第二种示例中,所述将所述数据处理请求发送给所述第一数据中心进行处理,包括:
若所述第一数据中心是所述第一网关所对应的数据中心,则将所述数据处理请求发送给第一服务端进行处理,所述第一服务端是所述第一数据中心的服务端;
若所述第一数据中心不是所述第一网关所对应的数据中心,则通过第二网关将所述数据处理请求发送给第二服务端进行处理,所述第二网关是所述第一数据中心的服务端,所述第二服务端是所述第一数据中心的服务端。
基于第一方面的第二种示例,在第一方面的第三种示例中,当所述第一数据中心是所述第一网关所对应的数据中心时,所述第一网关是挂载在所述第一数据中心的服务端上的服务;
当所述第一数据中心不是所述第一网关所对应的数据中心时,所述第一网关是挂载在第二数据中心的服务端上的服务,所述第二网关是挂载在所述第一数据中心的服务端上的服务,所述第二数据中心是所述第一数据中心之外的数据中心。
基于第一方面的第二种示例,在第一方面的第四种示例中,当所述第一数据中心是所述第一网关所对应的数据中心时,所述第一网关是所述第一数据中心的应用程序接口API层中的API;
当所述第一数据中心不是所述第一网关所对应的数据中心时,所述第一网关是第二数据中心的API层中的API,所述第二网关是所述第一数据中心的API层中的API,所述第二数据中心是所述第一数据中心之外的数据中心。
基于第一方面的第一至四任一种示例,在第一方面的第五种示例中,所述将所述数据处理请求发送给所述第一数据中心进行处理,包括:
若所述数据处理请求为数据写入请求或携带的实时性标识为第一标识的数据读取请求,则将所述数据处理请求发送给所述第一数据中心进行处理,所述数据写入请求用于对所述订单进行以下至少一种处理:新增数据、删除数据和修改数据。
基于第一方面的第五种示例,在第一方面的第六种示例中,所述方法还包括:
若所述数据处理请求为数据读取请求,且所述数据读取请求携带的实时性标识为第二标识,则通过第二数据中心对所述数据读取请求进行处理,所述第二数据中心是所述第一数据中心之外的数据中心。
基于第一方面的第一至四任一种示例,在第一方面的第七种示例中,还包括:
修改所述预设配置信息;
在修改所述预设配置信息的过程中,停止对所述预设配置信息中的正在修改的主数据中心对应的区域的数据处理请求进行处理。
基于第一方面的第一至四任一种示例,在第一方面的第八种示例中,所述数据处理请求中包括所述目标区域,所述确定所述订单的购买方所对应的目标区域,包括:
从所述数据处理请求的目标字段中提取所述目标区域。
基于第一方面的第一至四任一种示例,在第一方面的第九种示例中,所述数据处理请求中包括提交所述数据处理请求的设备的域名信息,所述确定所述订单的购买方所对应的目标区域,包括:
对所述域名信息进行解析,得到所述订单的购买方所对应的目标区域。
基于第一方面的第一至四任一种示例,在第一方面的第十种示例中,所述数据处理请求中包括所述购买方的身份标识信息,所述确定所述订单的购买方所对应的目标区域,包括:
从注册信息中获取所述身份标识信息对应的区域作为所述订单的购买方所对应的目标区域,所述注册信息中包括至少一个购买方的身份标识信息注册的归属区域。
在第二方面的第一种示例中,提供了一种请求处理装置,应用于第一网关,所述装置包括:
数据处理请求接收模块,用于接收数据处理请求,所述数据处理请求用于对订单进行处理;
目标区域确定模块,用于确定所述订单的购买方所对应的目标区域;
数据中心确定模块,用于从预设配置信息中选取所述目标区域对应的主数据中心作为对所述数据处理请求进行处理的第一数据中心,所述预设配置信息中包括至少一个区域分别对应的主数据中心;
数据处理模块,用于将所述数据处理请求发送给所述第一数据中心进行处理。
基于第二方面的第一种示例,在第二方面的第二种示例中,所述数据处理模块还用于:
在将所述数据处理请求发送给所述第一数据中心进行处理时,若所述第一数据中心是所述第一网关所对应的数据中心,则将所述数据处理请求发送给第一服务端进行处理,所述第一服务端是所述第一数据中心的服务端;
若所述第一数据中心不是所述第一网关所对应的数据中心,则通过第二网关将所述数据处理请求发送给第二服务端进行处理,所述第二网关是所述第一数据中心的服务端,所述第二服务端是所述第一数据中心的服务端。
基于第二方面的第二种示例,在第二方面的第三种示例中,当所述第一数据中心是所述第一网关所对应的数据中心时,所述第一网关是挂载在所述第一数据中心的服务端上的服务;
当所述第一数据中心不是所述第一网关所对应的数据中心时,所述第一网关是挂载在第二数据中心的服务端上的服务,所述第二网关是挂载在所述第一数据中心的服务端上的服务,所述第二数据中心是所述第一数据中心之外的数据中心。
基于第二方面的第二种示例,在第二方面的第四种示例中,当所述第一数据中心是所述第一网关所对应的数据中心时,所述第一网关是所述第一数据中心的应用程序接口API层中的API;
当所述第一数据中心不是所述第一网关所对应的数据中心时,所述第一网关是第二数据中心的API层中的API,所述第二网关是所述第一数据中心的API层中的API,所述第二数据中心是所述第一数据中心之外的数据中心。
基于第二方面的第一至四任一种示例,在第二方面的第五种示例中,所述数据处理模块还用于:
若所述数据处理请求为数据写入请求或携带的实时性标识为第一标识的数据读取请求,则将所述数据处理请求发送给所述第一数据中心进行处理,所述数据写入请求用于对所述订单进行以下至少一种处理:新增数据、删除数据和修改数据。
基于第二方面的第五种示例,在第二方面的第六种示例中,所述装置还包括:
第二数据处理模块,用于若所述数据处理请求为数据读取请求,且所述数据读取请求携带的实时性标识为第二标识,则通过第二数据中心对所述数据读取请求进行处理,所述第二数据中心是所述第一数据中心之外的数据中心。
基于第二方面的第一至四任一种示例,在第二方面的第七种示例中,所述装置还包括:
配置信息修改模块,用于修改所述预设配置信息;
停止处理模块,用于在修改所述预设配置信息的过程中,停止对所述预设配置信息中的正在修改的主数据中心对应的区域的数据处理请求进行处理。
基于第二方面的第一至四任一种示例,在第二方面的第八种示例中,所述数据处理请求中包括所述目标区域,所述目标区域确定模块还用于:
从所述数据处理请求的目标字段中提取所述目标区域。
基于第二方面的第一至四任一种示例,在第二方面的第九种示例中,所述数据处理请求中包括提交所述数据处理请求的设备的域名信息,所述目标区域确定模块还用于:
对所述域名信息进行解析,得到所述订单的购买方所对应的目标区域。
基于第二方面的第一至四任一种示例,在第二方面的第十种示例中,所述数据处理请求中包括所述购买方的身份标识信息,所述目标区域确定模块还用于:
从注册信息中获取所述身份标识信息对应的区域作为所述订单的购买方所对应的目标区域,所述注册信息中包括至少一个购买方的身份标识信息注册的归属区域。
第三方面,根据本公开的一个或多个实施例,提供了一种电子设备,包括:至少一个处理器和存储器;
所述存储器存储计算机执行指令;
所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述电子设备实现第一方面任一项所述的方法。
第四方面,根据本公开的一个或多个实施例,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,使计算设备实现第一方面任一项所述的方法。
第五方面,根据本公开的一个或多个实施例,提供了一种计算机程序,所述计算机程序用于实现第一方面任一项所述的方法。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单 独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (15)

  1. 一种请求处理方法,应用于第一网关,其中,所述方法包括:
    接收数据处理请求,所述数据处理请求用于对订单进行处理;
    确定所述订单的购买方所对应的目标区域;
    从预设配置信息中选取所述目标区域对应的主数据中心作为对所述数据处理请求进行处理的第一数据中心,所述预设配置信息中包括至少一个区域分别对应的主数据中心;
    将所述数据处理请求发送给所述第一数据中心进行处理。
  2. 根据权利要求1所述的方法,其中,所述将所述数据处理请求发送给所述第一数据中心进行处理,包括:
    若所述第一数据中心是所述第一网关所对应的数据中心,则将所述数据处理请求发送给第一服务端进行处理,所述第一服务端是所述第一数据中心的服务端;
    若所述第一数据中心不是所述第一网关所对应的数据中心,则通过第二网关将所述数据处理请求发送给第二服务端进行处理,所述第二网关是所述第一数据中心的服务端,所述第二服务端是所述第一数据中心的服务端。
  3. 根据权利要求2所述的方法,其中,
    当所述第一数据中心是所述第一网关所对应的数据中心时,所述第一网关是挂载在所述第一数据中心的服务端上的服务;
    当所述第一数据中心不是所述第一网关所对应的数据中心时,所述第一网关是挂载在第二数据中心的服务端上的服务,所述第二网关是挂载在所述第一数据中心的服务端上的服务,所述第二数据中心是所述第一数据中心之外的数据中心。
  4. 根据权利要求2所述的方法,其中,
    当所述第一数据中心是所述第一网关所对应的数据中心时,所述第一网关是所述第一数据中心的应用程序接口API层中的API;
    当所述第一数据中心不是所述第一网关所对应的数据中心时,所述第一网关是第二数据中心的API层中的API,所述第二网关是所述第一数据中心的API层中的API,所述第二数据中心是所述第一数据中心之外的数据中心。
  5. 根据权利要求1至4任一项所述的方法,其中,所述将所述数据处理请求发送给所述第一数据中心进行处理,包括:
    若所述数据处理请求为数据写入请求或携带的实时性标识为第一标识的数据读 取请求,则将所述数据处理请求发送给所述第一数据中心进行处理,所述数据写入请求用于对所述订单进行以下至少一种处理:新增数据、删除数据和修改数据。
  6. 根据权利要求5所述的方法,其中,所述方法还包括:
    若所述数据处理请求为数据读取请求,且所述数据读取请求携带的实时性标识为第二标识,则通过第二数据中心对所述数据读取请求进行处理,所述第二数据中心是所述第一数据中心之外的数据中心。
  7. 根据权利要求1至6任一项所述的方法,其中,还包括:
    修改所述预设配置信息;
    在修改所述预设配置信息的过程中,停止对所述预设配置信息中的正在修改的主数据中心对应的区域的数据处理请求进行处理。
  8. 根据权利要求1至7任一项所述的方法,其中,所述数据处理请求中包括所述目标区域,所述确定所述订单的购买方所对应的目标区域,包括:
    从所述数据处理请求的目标字段中提取所述目标区域。
  9. 根据权利要求1至7任一项所述的方法,其中,所述数据处理请求中包括提交所述数据处理请求的设备的域名信息,所述确定所述订单的购买方所对应的目标区域,包括:
    对所述域名信息进行解析,得到所述订单的购买方所对应的目标区域。
  10. 根据权利要求1至7任一项所述的方法,其中,所述数据处理请求中包括所述购买方的身份标识信息,所述确定所述订单的购买方所对应的目标区域,包括:
    从注册信息中获取所述身份标识信息对应的区域作为所述订单的购买方所对应的目标区域,所述注册信息中包括至少一个购买方的身份标识信息注册的归属区域。
  11. 一种请求处理装置,其中,应用于第一网关,所述装置包括:
    数据处理请求接收模块,用于接收数据处理请求,所述数据处理请求用于对订单进行处理;
    目标区域确定模块,用于确定所述订单的购买方所对应的目标区域;
    数据中心确定模块,用于从预设配置信息中选取所述目标区域对应的主数据中心作为对所述数据处理请求进行处理的第一数据中心,所述预设配置信息中包括至少一个区域分别对应的主数据中心;
    数据处理模块,用于将所述数据处理请求发送给所述第一数据中心进行处理。
  12. 一种电子设备,其中,包括:至少一个处理器和存储器;
    所述存储器存储计算机执行指令;
    所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述电子设备实现如权利要求1至10任一项所述的方法。
  13. 一种计算机可读存储介质,其中,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,使计算设备实现如权利要求1至10任一项所述的方法。
  14. 一种计算机程序,其中,所述计算机程序用于实现如权利要求1至10任一项所述的方法。
  15. 一种计算机程序产品,包括计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1至10任一项所述的方法。
PCT/CN2023/077450 2022-02-28 2023-02-21 请求处理方法及设备 WO2023160551A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210190744.9A CN114549137A (zh) 2022-02-28 2022-02-28 请求处理方法及设备
CN202210190744.9 2022-02-28

Publications (1)

Publication Number Publication Date
WO2023160551A1 true WO2023160551A1 (zh) 2023-08-31

Family

ID=81661619

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/077450 WO2023160551A1 (zh) 2022-02-28 2023-02-21 请求处理方法及设备

Country Status (2)

Country Link
CN (1) CN114549137A (zh)
WO (1) WO2023160551A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114549137A (zh) * 2022-02-28 2022-05-27 北京有竹居网络技术有限公司 请求处理方法及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106572069A (zh) * 2015-10-12 2017-04-19 阿里巴巴集团控股有限公司 一种网络访问控制方法及服务器
CN107315650A (zh) * 2016-04-26 2017-11-03 北京京东尚科信息技术有限公司 网络交易系统和由网络交易系统执行的方法
WO2021129008A1 (zh) * 2019-12-23 2021-07-01 中国银联股份有限公司 服务调用方法、装置、设备及介质
CN113094431A (zh) * 2021-03-30 2021-07-09 北京达佳互联信息技术有限公司 读写分离方法、装置及服务器
CN114549137A (zh) * 2022-02-28 2022-05-27 北京有竹居网络技术有限公司 请求处理方法及设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106572069A (zh) * 2015-10-12 2017-04-19 阿里巴巴集团控股有限公司 一种网络访问控制方法及服务器
CN107315650A (zh) * 2016-04-26 2017-11-03 北京京东尚科信息技术有限公司 网络交易系统和由网络交易系统执行的方法
WO2021129008A1 (zh) * 2019-12-23 2021-07-01 中国银联股份有限公司 服务调用方法、装置、设备及介质
CN113094431A (zh) * 2021-03-30 2021-07-09 北京达佳互联信息技术有限公司 读写分离方法、装置及服务器
CN114549137A (zh) * 2022-02-28 2022-05-27 北京有竹居网络技术有限公司 请求处理方法及设备

Also Published As

Publication number Publication date
CN114549137A (zh) 2022-05-27

Similar Documents

Publication Publication Date Title
AU2018348329B2 (en) Blockchain smart contract updates using decentralized decision
CN108470298B (zh) 资源数值转移的方法、装置和系统
US20200211092A1 (en) Adaptive product listing using blockchain inventory and smart contracts
US7756903B2 (en) Configuring a search engine results page with environment-specific information
WO2015078402A1 (en) Method, apparatus and device for exchanging name card
CN111047321A (zh) 业务处理方法及装置、电子设备、存储介质
WO2018201887A1 (zh) 数据响应方法、装置、终端设备及介质
CN104636895A (zh) 数据处理方法及其系统
US20220201064A1 (en) Method And System For Transferring Data
WO2023160551A1 (zh) 请求处理方法及设备
CN111488615A (zh) 业务数据区块链的跨链实现方法及装置
CN112860953A (zh) 图数据库的数据导入方法、装置、设备及存储介质
CN109729121B (zh) 一种云存储系统及用于云存储系统中实现自定义数据处理的方法
KR102114532B1 (ko) 정보 운용
WO2022143712A1 (zh) 数据处理、支付数据输出、支付优惠数据提供方法及装置
JP6941614B2 (ja) サービス処理方法及び装置
CN111181833B (zh) 一种企业互联的实现方法及装置
CN114675982A (zh) 一种业务集成系统的数据获取通用方法及系统
US20180218419A1 (en) Method and apparatus for providing digital product using user account synchronization
JP2014085995A (ja) ライセンス管理装置、ライセンス管理システム、及びライセンス管理方法
CA2990710A1 (en) Method for establishing interaction relationship, and interaction device
TW202236136A (zh) 資料存儲方法、裝置、設備及存儲介質
CN109462868B (zh) 无线接入点查询目标信息的方法与设备
JP5636394B2 (ja) 情報処理装置、情報処理方法、およびプログラム
US20240070614A1 (en) Methods for location mapping to facilitate collaboration for users sharing common attributes and devices thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23759176

Country of ref document: EP

Kind code of ref document: A1