Data asynchronous processing method and device, electronic equipment and storage medium
By adding computer room identification to data processing tasks in the production process and only processing tasks consistent with their own computer room identification in the consumption process, the problem of data asynchronous processing of cross-client traffic is solved, and the processing efficiency and traffic isolation of data requests are improved.
Patent Information
- Application Number
- CN202411867310.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-05-06
AI Technical Summary
During the asynchronous data processing, when the consumer process retrieves tasks from the database, it cannot ensure the isolation of the traffic room, resulting in cross-client room traffic and affecting the efficiency of data request processing.
By adding a computer room logo to the target data processing task in the production process, and only obtaining task information consistent with the computer room logo for processing in the consumption process, we ensure that the data request is processed asynchronously in the same computer room.
It realizes asynchronous processing of data requests in the same computer room, avoids the inefficiency problems caused by cross-computer room processing, improves the processing efficiency of data requests, and ensures traffic isolation.
Smart Images

Figure CN119938783A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data asynchronous processing method, device, electronic device and storage medium. Background Art
[0002] Producer-consumer model services, such as asynchronous message notification services, are generally deployed in two computer rooms. The service starts two processes: one is the producer process, which is responsible for receiving requests from upstream to create notification messages and storing the messages in the database; the other is the consumer process, which is responsible for retrieving tasks from the database, assembling messages, and sending them to downstream to implement the asynchronous message notification function.
[0003] In actual applications, the producer process processes requests only after they are received. The upstream traffic can ensure the isolation of the data center traffic. However, the consumer process retrieves tasks from the database for processing. The database is not deployed in a separate data center, and the isolation of the data center traffic of the consumer process cannot be guaranteed. This leads to the problem of cross-data center traffic during asynchronous data processing, which greatly affects the efficiency of data request processing. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a data asynchronous processing method, device, electronic device and storage medium to improve the data request processing efficiency.
[0005] According to one aspect of the present invention, a method for asynchronous data processing is provided, the method comprising:
[0006] Get target data request;
[0007] Generate a target data processing task based on the target data request through a production process, and store task information of the target data processing task in a preset database, wherein the task information includes a first computer room identifier, and the first computer room identifier is a computer room identifier of a computer room where the production process is located;
[0008] The target data processing task consistent with the second computer room identifier corresponding to the consumption process is obtained from the preset database through the consumption process and processed, wherein the second computer room identifier is the computer room identifier of the computer room where the consumption process is located.
[0009] In a possible embodiment, the method further includes:
[0010] Determine the corresponding target computer room based on the service identifier to which the target data request belongs,
[0011] The generating a target data processing task based on the target data request through the production process, and storing the task information of the target data processing task in a preset database, includes:
[0012] The production process in the target computer room is called to generate a target data processing task and stored in a preset message processing queue, and preset content in the target data request is extracted, and the preset content and the target computer room identifier are stored in the preset database in correspondence.
[0013] In a possible embodiment, the acquiring and processing the target data processing task consistent with the second computer room identifier corresponding to the consumption process from the preset database through the consumption process includes:
[0014] Traversing each task information in the preset database through the consumption process, determining a target data processing task consistent with the second computer room identifier corresponding to the consumption process;
[0015] The target data processing task that is consistent with the second computer room identifier corresponding to the consumption process is obtained from the preset message processing queue and processed.
[0016] In a possible embodiment, the task information also includes the receiving time of the target data request; and the method further includes:
[0017] The target data processing task whose receiving time exceeds a preset time threshold is obtained and processed through the consumption process.
[0018] According to another aspect of the present invention, there is provided a data asynchronous processing device, the device comprising:
[0019] An acquisition module, used to obtain a target data request;
[0020] A generating module, configured to generate a target data processing task based on the target data request through a production process, and store task information of the target data processing task in a preset database, wherein the task information includes a first computer room identifier, and the first computer room identifier is a computer room identifier of a computer room where the production process is located;
[0021] The consumption module is used to obtain and process the target data processing task consistent with the second computer room identifier corresponding to the consumption process from the preset database through the consumption process, wherein the second computer room identifier is the computer room identifier of the computer room where the consumption process is located.
[0022] In a possible embodiment, the device further includes:
[0023] a determination module, configured to determine a corresponding target computer room based on the service identifier to which the target data request belongs,
[0024] The generating a target data processing task based on the target data request through the production process, and storing the task information of the target data processing task in a preset database, includes:
[0025] The production process in the target computer room is called to generate a target data processing task and stored in a preset message processing queue, and preset content in the target data request is extracted, and the preset content and the target computer room identifier are stored in the preset database in correspondence.
[0026] In a possible embodiment, the acquiring and processing the target data processing task consistent with the second computer room identifier corresponding to the consumption process from the preset database through the consumption process includes:
[0027] Traversing each task information in the preset database through the consumption process, determining a target data processing task consistent with the second computer room identifier corresponding to the consumption process;
[0028] The target data processing task that is consistent with the second computer room identifier corresponding to the consumption process is obtained from the preset message processing queue and processed.
[0029] In a possible embodiment, the task information also includes the receiving time of the target data request; the consumption module is further used to obtain and process the target data processing task whose receiving time exceeds a preset time threshold through the consumption process.
[0030] According to another aspect of the present invention, there is provided an electronic device, comprising:
[0031] Processor; and
[0032] Memory for storing programs,
[0033] The program includes instructions, and when the instructions are executed by the processor, the processor executes any one of the above-mentioned data asynchronous processing methods.
[0034] According to another aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute any one of the above-mentioned data asynchronous processing methods.
[0035] One or more technical solutions provided in the embodiments of the present invention are as follows: the production process adds a computer room identifier when storing the target data processing task; when the consumer process retrieves the task for processing, it only retrieves the target data processing task that is consistent with its own computer room identifier, thereby ensuring that data requests are processed asynchronously in the same computer room, avoiding the inefficiency caused by cross-computer room processing of data requests, and improving the processing efficiency of data requests. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Further details, features and advantages of the invention are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0037] Figure 1 A schematic diagram of a process for asynchronous data processing in a related technology;
[0038] Figure 2 A schematic diagram of a flow chart of a data asynchronous processing method provided by an embodiment of the present invention;
[0039] Figure 3 Another schematic diagram of a flow chart of a data asynchronous processing method provided by an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of the structure of a data asynchronous processing device provided by an embodiment of the present invention;
[0041] Figure 5 A block diagram of an exemplary electronic device that can be used to implement an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0042] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0043] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0044] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0045] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0046] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0047] In related technologies, in order to improve data processing efficiency and prevent a single data request from causing serious obstruction to other data requests, data requests are usually processed through producer-consumer model services, such as asynchronous message notification services, such as netty. Asynchronous message processing services are usually deployed in dual or multiple computer rooms. In this case, it cannot be guaranteed that the production task of creating a message and the consumer task of sending a message are processed in the same computer room.
[0048] For example, Figure 1 The present invention is a flowchart of asynchronous data processing in the related technology, which may specifically include the following process: a request to create a message is sent from the upstream HBA computer room, and the HBA computer room is a single computer room in the production environment. The asynchronous message notification service in the HBA computer room will process this request and store the message in the MySQL database. The consumer process of the asynchronous message notification service is a preemptive task. The asynchronous message notification services of the HBA and HBB computer rooms may grab this message from the database for processing. When the consumer process of the asynchronous message notification service in the HBB computer room grabs this message for processing, the creation message is processed in the HBA computer room, and the sending message is processed in the HBB computer room, and the traffic will cross the computer room. When a single computer room fails, traffic isolation cannot be guaranteed. For example, when the HBB single computer room fails, the consumer process cannot achieve computer room isolation, and will still grab tasks, and the traffic cannot be completely cut to the HBA single computer room. Similarly, when the asynchronous message notification service code is upgraded, the HBF pre-release computer room cannot guarantee that the producer process and the consumer process are verified at the same time. The code needs to be fully pushed before verification, which has the risk of introducing problems.
[0049] Based on this, the embodiments of the present invention provide a data asynchronous processing method, device, electronic device and storage medium. The data asynchronous processing method provided by the embodiments of the present invention can be applied to any electronic device with asynchronous data processing function, and the electronic device can be a server, a computer or a mobile terminal, etc. The scheme of the present invention is described below with reference to the accompanying drawings:
[0050] Figure 2 A schematic flow chart of a data asynchronous processing method provided in an embodiment of the present invention may include the following steps:
[0051] S201, obtaining target data request;
[0052] S202, generating a target data processing task based on the target data request through a production process, and storing task information of the target data processing task in a preset database, wherein the task information includes a first computer room identifier, and the first computer room identifier is a computer room identifier of a computer room where the production process is located;
[0053] S203: Obtain and process a target data processing task consistent with a second computer room identifier corresponding to the consumption process from the preset database through the consumption process, wherein the second computer room identifier is the computer room identifier of the computer room where the consumption process is located.
[0054] By using the embodiment of the present invention, by using the production process to add a computer room identifier when storing the target data processing task, the consumer process only retrieves the target data processing task that is consistent with its own computer room identifier when retrieving task processing, ensuring that data requests are processed asynchronously in the same computer room, avoiding the inefficiency caused by cross-computer room processing of data requests, and improving the processing efficiency of data requests. In addition, by asynchronously processing data requests in a single computer room, traffic isolation is achieved, avoiding data request processing failures caused by failures in other computer rooms, and further improving the processing efficiency of data requests.
[0055] S201 to S203 are exemplarily described below:
[0056] The target data request in S201 can be any type of data request sent by any party, and the present invention does not impose any limitation on this. The target data request may include the sender of the target data request, the business line identifier to which it belongs, the request type, etc. The request type may include adding, modifying, deleting, and querying, etc.
[0057] As mentioned above, the asynchronous message service is usually deployed in two computer rooms, so in a possible embodiment, the corresponding target computer room can be determined based on the business identifier to which the target data request belongs. As a possible implementation method, the correspondence between the business and the computer room can be set in advance, and when a data request for a certain business is received, the target computer room for processing the data request is determined based on the correspondence. As another possible implementation method, the correspondence between the request type and the computer room can also be set, and the corresponding target computer room can be determined based on the request type of the target data request. The computer room that processes different data requests can be flexibly set according to the actual application scenario, and the present invention does not make specific limitations on this. In a possible embodiment, the computer room for creating the data processing task corresponding to the data request can also be defaulted. Processing the data request here refers to creating the data processing task corresponding to the data request.
[0058] After receiving the target data request, a target data processing task can be generated based on the target data request through the production process, and the task information of the target data processing task can be stored in a preset database. The production process can process multiple target data requests concurrently. Specifically, the production process can generate a target data processing task and store it in a preset message processing queue, and extract the preset content in the target data request, and store the preset content and the target computer room identifier in the preset database in correspondence. The above preset content can be pre-set according to the actual application scenario, such as including the requested target data identifier, the sender of the target data request, the corresponding business identifier, etc. In a possible embodiment, the generation process can be a process in the target computer room, that is, it is implemented by relying on a machine in the target computer room, which is usually a server.
[0059] The above-mentioned preset database can be created according to actual needs, and can be a relational database or a non-relational database. As a possible implementation method, the preset database can be a MySQL database. The MySQL database can be stored in multiple computer rooms in a distributed storage manner to enhance the stability of MySQL. As a possible implementation method, the MySQL relational database can create different tables and store the task information data of the data processing task in different tables, instead of putting all the data in a large warehouse, to increase the query speed of the data and improve the query flexibility of the data. Specifically, MySQL can store the unique identifier of the data processing task in correspondence with the task information, and the above-mentioned task information can be stored in different columns in the table, such as a business identification column, a computer room identification column, and the like.
[0060] The consumption process is a process for consuming information. Specifically, the target data processing task can be obtained from the above-mentioned consumption queue and forwarded to the downstream service for processing. The downstream service can be any type of data processing service, which can be set according to the actual application scenario. In a possible embodiment, the consumption process can traverse the task information in the preset database, determine the target data processing task that is consistent with the second computer room identifier corresponding to the consumption process; obtain the target data processing task that is consistent with the second computer room identifier corresponding to the consumption process from the preset message processing queue and process it.
[0061] As a possible implementation, the consumer process can traverse each message in the consumer queue and query the computer room identification of each message in the database. If the computer room identification is consistent with the computer room identification of the consumer process, the information can be retrieved and processed.
[0062] In this way, the consumer process only obtains the data processing tasks created by the production process in this computer room, so that the creation and consumption of messages are both in the same computer room, avoiding traffic across computer rooms.
[0063] In a possible embodiment, the task information of the data processing task may also include the receiving time of the target data request; the receiving time refers to the time when the production process receives the target data request, or the time when the target data processing task is created. Accordingly, the above method may also include obtaining and processing the target data processing task whose receiving time exceeds a preset time threshold through the consumption process.
[0064] The above-mentioned preset time threshold can be set according to the actual application scenario, such as 10 minutes, 5 minutes, etc. When the consumption process traverses the task information of each data processing task, it can simultaneously query the receiving time and computer room identification of the data processing task, and extract the tasks with the same computer room identification and the receiving time exceeding the above-mentioned preset time threshold. As a possible implementation method, the above-mentioned receiving time can be the system time when the target data request is received. Accordingly, the current system time can be set to be pushed forward 10 minutes as the preset time threshold. When the receiving time of the target data request is earlier than the preset time threshold, the message can be extracted. As another possible implementation method, a timer can be set for each data processing task, and the time interval from the time when the target data request is received to the current time is determined by the timer as the receiving time of the data processing task. Accordingly, when the time interval is greater than ten minutes, the consumption process can extract the information for consumption.
[0065] In this way, even if a single computer room fails, the data processing task can be consumed by the consumption process of another computer room, avoiding long-term blocking of the data processing task.
[0066] like Figure 3 As shown, Figure 3A flow chart of a data asynchronous processing method provided by an embodiment of the present invention, specifically, the request 1 of the upstream service is received by the HBA computer room, and the producer process in the HBA computer room creates the request message, and the computer room identifier HBA and the request message are stored in the MySQL database correspondingly, and the time and computer room identifier information are added. The request 2 of the upstream service is received by the HBB computer room, and the producer process in the HBB computer room creates the request message, and the computer room identifier HBB and the request message are stored in the MySQL database correspondingly, and the time and computer room identifier information are added, thereby obtaining two stored message contents, and when the consumption process in the HBA computer room retrieves information for consumption, it will only retrieve information that is consistent with its computer room identifier or the current time is ten minutes later than the message insertion time, that is, it will only retrieve the first task and will not retrieve the second one, and when the consumption process in the HBB computer room retrieves information for consumption, it will only retrieve information that is consistent with its computer room identifier or the current time is ten minutes later than the message insertion time, that is, it will only retrieve the second task and will not retrieve the first one. After the consumer process retrieves the information, it can notify the downstream service for processing based on the specific content of the information. The downstream service can be determined based on the request type of the target data request.
[0067] By applying the embodiments of the present invention, it is possible to ensure that the producer and consumer traffic are processed in the same computer room, thereby solving the two problems of failure of a single computer room, inability to cut off traffic, and inability to fully verify new functions in a pre-release environment.
[0068] Based on the same inventive concept, an embodiment of the present invention further provides a data asynchronous processing device, such as Figure 4 As shown, the apparatus 400 may include:
[0069] An acquisition module 401 is used to acquire a target data request;
[0070] A generating module 402 is used to generate a target data processing task based on the target data request through a production process, and store task information of the target data processing task in a preset database, wherein the task information includes a first computer room identifier, and the first computer room identifier is a computer room identifier of a computer room where the production process is located;
[0071] The consumption module 403 is used to obtain and process the target data processing task consistent with the second computer room identifier corresponding to the consumption process from the preset database through the consumption process, wherein the second computer room identifier is the computer room identifier of the computer room where the consumption process is located.
[0072] In a possible embodiment, the device further includes:
[0073] a determination module, configured to determine a corresponding target computer room based on the service identifier to which the target data request belongs,
[0074] The generating a target data processing task based on the target data request through the production process, and storing the task information of the target data processing task in a preset database, includes:
[0075] The production process in the target computer room is called to generate a target data processing task and stored in a preset message processing queue, and preset content in the target data request is extracted, and the preset content and the target computer room identifier are stored in the preset database in correspondence.
[0076] In a possible embodiment, the acquiring and processing the target data processing task consistent with the second computer room identifier corresponding to the consumption process from the preset database through the consumption process includes:
[0077] Traversing each task information in the preset database through the consumption process, determining a target data processing task consistent with the second computer room identifier corresponding to the consumption process;
[0078] The target data processing task that is consistent with the second computer room identifier corresponding to the consumption process is obtained from the preset message processing queue and processed.
[0079] In a possible embodiment, the task information also includes the receiving time of the target data request; the consumption module is further used to obtain and process the target data processing task whose receiving time exceeds a preset time threshold through the consumption process.
[0080] Among them, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in the present invention are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0081] The exemplary embodiment of the present invention further provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to enable the electronic device to perform a method according to an embodiment of the present invention when executed by the at least one processor.
[0082] Exemplary embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform a method according to an embodiment of the present invention.
[0083] An exemplary embodiment of the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to enable the computer to perform a method according to an embodiment of the present invention.
[0084] refer to Figure 5, a block diagram of an electronic device 500 that can be used as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0085] like Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0086] A plurality of components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 may be any type of device capable of inputting information to the electronic device 500, and the input unit 506 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 507 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 may include, but is not limited to, a disk, an optical disk. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0087] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, the above-mentioned data asynchronous processing method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via the ROM 502 and / or the communication unit 509. In some embodiments, the computing unit 501 may be configured to perform the above-mentioned data asynchronous processing method by any other appropriate means (e.g., by means of firmware).
[0088] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0089] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0090] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0091] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0092] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0093] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
Claims
1. A data asynchronous processing method, characterized in that: The method comprises: Get target data request; Generate a target data processing task based on the target data request through a production process, and store task information of the target data processing task in a preset database, wherein the task information includes a first computer room identifier, and the first computer room identifier is a computer room identifier of a computer room where the production process is located; The target data processing task consistent with the second computer room identifier corresponding to the consumption process is obtained from the preset database through the consumption process and processed, wherein the second computer room identifier is the computer room identifier of the computer room where the consumption process is located.
2. The method according to claim 1, characterized in that The method further comprises: Determine the corresponding target computer room based on the service identifier to which the target data request belongs, The generating a target data processing task based on the target data request through the production process, and storing the task information of the target data processing task in a preset database, includes: The production process in the target computer room is called to generate a target data processing task and stored in a preset message processing queue, and preset content in the target data request is extracted, and the preset content and the target computer room identifier are stored in the preset database in correspondence.
3. The method according to claim 2, characterized in that The acquiring and processing of a target data processing task consistent with a second computer room identifier corresponding to the consumption process from the preset database through the consumption process includes: Traversing each task information in the preset database through the consumption process, determining a target data processing task consistent with the second computer room identifier corresponding to the consumption process; The target data processing task that is consistent with the second computer room identifier corresponding to the consumption process is obtained from the preset message processing queue and processed.
4. The method according to claim 1, characterized in that: The task information also includes the receiving time of the target data request; the method also includes: The target data processing task whose receiving time exceeds a preset time threshold is obtained and processed through the consumption process.
5. A data asynchronous processing device, characterized in that: The device comprises: An acquisition module, used to obtain a target data request; A generating module, configured to generate a target data processing task based on the target data request through a production process, and store task information of the target data processing task in a preset database, wherein the task information includes a first computer room identifier, and the first computer room identifier is a computer room identifier of a computer room where the production process is located; The consumption module is used to obtain and process the target data processing task consistent with the second computer room identifier corresponding to the consumption process from the preset database through the consumption process, wherein the second computer room identifier is the computer room identifier of the computer room where the consumption process is located.
6. The device according to claim 5, characterized in that The device also includes: a determination module, configured to determine a corresponding target computer room based on the service identifier to which the target data request belongs, The generating a target data processing task based on the target data request through the production process, and storing the task information of the target data processing task in a preset database, includes: The production process in the target computer room is called to generate a target data processing task and stored in a preset message processing queue, and preset content in the target data request is extracted, and the preset content and the target computer room identifier are stored in the preset database in correspondence.
7. The device according to claim 6, characterized in that The acquiring and processing of a target data processing task consistent with a second computer room identifier corresponding to the consumption process from the preset database through the consumption process includes: Traversing each task information in the preset database through the consumption process, determining a target data processing task consistent with the second computer room identifier corresponding to the consumption process; The target data processing task that is consistent with the second computer room identifier corresponding to the consumption process is obtained from the preset message processing queue and processed.
8. The device according to claim 5, characterized in that The task information also includes the receiving time of the target data request; the consumption module is also used to obtain and process the target data processing task whose receiving time exceeds a preset time threshold through the consumption process.
9. An electronic device, comprising: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 4.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-4.