CN116302619B - Cross-site multi-activity processing method, device, apparatus and storage medium - Google Patents

Cross-site multi-activity processing method, device, apparatus and storage medium Download PDF

Info

Publication number
CN116302619B
CN116302619B CN202310560135.2A CN202310560135A CN116302619B CN 116302619 B CN116302619 B CN 116302619B CN 202310560135 A CN202310560135 A CN 202310560135A CN 116302619 B CN116302619 B CN 116302619B
Authority
CN
China
Prior art keywords
request message
request
updated
broadcast identifier
station
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310560135.2A
Other languages
Chinese (zh)
Other versions
CN116302619A (en
Inventor
杨顺
储巍
杨海阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengfang Financial Technology Co ltd
Original Assignee
Chengfang Financial Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengfang Financial Technology Co ltd filed Critical Chengfang Financial Technology Co ltd
Priority to CN202310560135.2A priority Critical patent/CN116302619B/en
Publication of CN116302619A publication Critical patent/CN116302619A/en
Application granted granted Critical
Publication of CN116302619B publication Critical patent/CN116302619B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • 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/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a cross-site multi-activity processing method, equipment, a device and a storage medium, and relates to the technical field of electric digital data processing, wherein the method comprises the following steps: acquiring a return result of the current site, wherein the return result is used for indicating whether the related operation on the call data is successfully executed or not; determining whether a broadcast identifier is set or not based on a request message corresponding to the returned result; if the broadcast identification is not set, the request message is updated by setting the broadcast identification, and the updated request message is forwarded to one or more opposite end stations included in the configuration information. On the basis of not influencing the execution of the original request message, the method and the system broadcast the request message to the active opposite end stations in a mode of copying the request message, have simple implementation mode, do not depend on the underlying system software, do not need to additionally increase a software architecture or increase a complex gateway design, and effectively reduce the implementation cost.

Description

Cross-site multi-activity processing method, device, apparatus and storage medium
Technical Field
The present invention relates to the field of electronic digital data processing technologies, and in particular, to a cross-site multi-activity processing method, apparatus, device, and storage medium.
Background
With the development of new technology, the requirement of storage technology is higher and higher, and dual-activity service is mainly provided by a plurality of databases, or database matched software, or gateway and other modes. In order to avoid the single equipment failure, or under the condition of abnormal connection between any two pieces of equipment, effective equipment still exists to provide services for the outside world, thereby ensuring that the service is not interrupted.
In the current mainstream dual-activity design, mainly based on a storage dual-activity solution of a dual-activity data center on a virtualized storage platform, a storage dual-activity or high-availability architecture is provided for an upper-layer application, so that any component failure of the storage layer is ensured not to have interrupt influence on the upper-layer application. Or stretching the double-node cross-site, dispersing the double-node cross-site in two different data centers, connecting the two data centers through optical fiber links, and mirroring the data to two storages on the two sites in real time through a virtual disk mirroring technology. However, the two-active design of the above and other mainstream designs requires additional software architecture or adds complex gateway design, but the project with smaller architecture design is slightly bulkier.
Therefore, how to simply and efficiently implement multi-live processing across sites under the condition of smaller software framework design has become a technical problem to be solved in the art.
Disclosure of Invention
Aiming at the problems existing in the prior art, the invention provides a cross-site multi-activity processing method, equipment, a device and a storage medium.
In a first aspect, the present invention provides a cross-site multi-activity processing method, including:
acquiring a return result of the current site; the return result is used for indicating whether the related operation on the call data is successfully executed or not;
determining whether a broadcast identifier exists or not based on the request message corresponding to the returned result;
if the broadcast identification does not exist, the request message is updated by setting the broadcast identification, and the updated request message is forwarded to one or more opposite end stations included in the configuration information;
the configuration information is used for configuring a plurality of stations for multiple activities, each station is used for processing related operations of the request message on data, and logs corresponding to the related operation results are recorded.
Optionally, the determining whether the broadcast identifier exists based on the request message corresponding to the returned result includes:
determining whether the related operation of the call data represented by the returned result is successfully executed;
if the related operation of the call data indicated by the return result is successfully executed, acquiring the request message corresponding to the return result; the request message is used for triggering the receiving station to execute related operation on the call data;
And determining whether a broadcast identifier is set in a request header of the request message.
Optionally, if the broadcast identifier does not exist, updating the request message by setting the broadcast identifier, and forwarding the updated request message to one or more peer stations included in the configuration information, including:
if the request header of the request message is not provided with the broadcast identifier, the request header is provided with the broadcast identifier, and the request message is updated;
determining one or more opposite end stations which need to keep alive with the current station based on configuration information of the current station;
and forwarding the updated request message to the opposite terminal station so that the opposite terminal station can execute the same related operation on the call data.
Optionally, if the broadcast identifier is not set in the request header of the request message, setting the broadcast identifier in the request header, and after updating the request message, including:
acquiring sender information of the request message, and updating the request header of the request message;
setting interface parameters corresponding to a request type according to the request type included in a request body of the request message to obtain an updated request body;
And determining a recombined request message as the updated request message based on the updated request header and the updated request body.
Optionally, before the forwarding the updated request message to the peer station for the peer station to perform the same operation related to the call data, the method includes:
and storing the updated request message for retransmission under the condition that the current station fails to forward the updated request message.
Optionally, the method further comprises:
acquiring the request message corresponding to the returned result indicating failure of executing the related operation of the call data from the configured logs corresponding to all the stations for multiple activities as a request message to be executed;
and periodically acquiring the request message to be executed by taking a natural day as a unit, and triggering a station receiving the request message to be executed to execute again.
Optionally, the method further comprises:
and collecting the returned result of the failure of the execution of the related operation of the call data, and providing prompt and early warning through a monitoring system.
In a second aspect, the present invention further provides an electronic device, including a memory, a transceiver, and a processor;
A memory for storing a computer program; a transceiver for transceiving data under control of the processor; and a processor for reading the computer program in the memory and implementing the cross-site multi-activity processing method according to the first aspect.
In a third aspect, the present invention further provides a cross-site multi-activity processing apparatus, including:
the acquisition module is used for acquiring a return result of the current site; the return result is used for indicating whether the related operation on the call data is successfully executed or not;
the determining module is used for determining whether a broadcast identifier exists or not based on the request message corresponding to the return result;
the updating module is used for updating the request message by setting the broadcast identifier if the broadcast identifier does not exist, and forwarding the updated request message to one or more opposite end stations included in the configuration information;
the configuration information is used for configuring a plurality of stations for multiple activities, each station is used for processing related operations of the request message on data, and logs corresponding to the related operation results are recorded.
In a fourth aspect, the present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a cross-site multi-lived processing method as described in the first aspect above.
In a fifth aspect, the present invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the cross-site multi-lived processing method of the first aspect as described above.
According to the cross-site multi-activity processing method, device and storage medium, the broadcast identification is set by the request message received by the current site and forwarded to other sites which keep multi-activity, so that all sites which keep multi-activity respectively execute the same request message, and the configured multi-site which is used for multi-activity is ensured to keep multi-activity. On the basis of not influencing the execution of the original request message, the request message is broadcast to the most active opposite terminal stations by setting the broadcast identification, the implementation mode is simple, the implementation mode does not depend on the underlying system software, and the additional software architecture or the complex gateway design is not required, so that the implementation cost is effectively reduced.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a cross-site multi-activity processing method provided by an embodiment of the invention;
FIG. 2 is a schematic flow chart of an implementation of a cross-site multi-activity processing method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a cross-site multi-activity processing apparatus according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The following describes a cross-site multi-activity processing method, device, apparatus and storage medium provided by the present invention with fig. 1 to 4.
Fig. 1 is a flow chart of a cross-site multi-activity processing method provided by an embodiment of the present invention, as shown in fig. 1, the method includes:
Step 101, obtaining a return result of a current site; the return result is used for indicating whether the related operation on the call data is successfully executed or not;
step 102, determining whether a broadcast identifier is set or not based on the request message corresponding to the return result;
step 103, if the broadcast identifier is not set, updating the request message by setting the broadcast identifier, and forwarding the updated request message to one or more opposite end stations included in the configuration information;
the configuration information is used for configuring a plurality of stations for multiple activities, each station is used for processing related operations of the request message on data, and logs corresponding to the related operation results are recorded.
Specifically, the station configured to implement multiple activities may be virtual equipment or physical equipment, and receive request messages sent by different users, where the request messages are used to trigger or request the receiving station to perform related operations on the call data; related operations herein may include reading, writing, adding, deleting, modifying, searching, etc.
And the processing logic and service logic of each station for the request message can be divided into an access layer, a service layer and a data storage layer.
The access layer is responsible for the front-end participation mechanism and the rear-end third party application multipoint access, sends a request message to the service processing layer, and performs authentication, system management and the like by the access layer; the business processing layer determines interface processing logic and calls the data storage layer to realize the interface of data related operations (reading, writing, etc.); the data storage layer receives the call of the service processing layer, performs related operation of calling data, and stores the data in a database corresponding to the local station; and after the data is successfully put into storage, returning the data layer by layer to the access layer.
The application sets the filter in the access layer, and when the access layer accepts the request message, the request message is obtained, the mode can not influence the site to execute the related operation on the data according to the request message, and meanwhile, the original received request message can be obtained, thereby ensuring the correctness and the effectiveness of the original received request message. The request message may be processed as an ad device specifically by a repoatdlyRequestWwrapper. In addition, when the request message is executed at the receiving station and the return result is fed back, the return result can be intercepted through the responsebody device, that is, the method for acquiring the return result of the current station in the application. The return result is used to indicate whether the associated operation on the call data was performed successfully. After the return result is obtained, whether the corresponding request message is executed successfully or not can be determined according to the return result, and under the condition that the execution of the local station is successful, the request message may need to be sent to other multi-activity opposite-end stations to execute the same request message. In case of failure of the execution of the own station, it may be necessary to execute the request message again at the own station.
When the current station executes successfully, the request message corresponding to the return result is acquired when the request message is required to be sent to other multi-activity opposite-end stations, whether the broadcast identification exists in the request message is determined, if the broadcast identification does not exist, after the current station executes the request message, the request message is required to be sent to other multi-activity opposite-end stations, and when the request message is set to the broadcast identification, the request message is updated and forwarded to other multi-activity opposite-end stations, so that the opposite-end stations can execute the same request message, execute the same operation on local data, and ensure the data synchronization among the multi-activity opposite-end stations. And after the returned result of each site indicates that the execution is successful, directly returning to the front end for subsequent display.
The multiple sites used for multiple activities can be configured in the configuration information corresponding to each site, which can be understood that the multiple sites used for multiple activities are taken as a set, and after any element in the set receives the request message, the element can acquire other elements in the set to which the element belongs and send the request message to the other elements. In addition, any element in the set has the capability of processing the request message, and can record the relevant result when processing the request message, and can be specifically expressed in a log form.
According to the cross-site multi-activity processing method provided by the invention, the broadcast identification is set by the request message received by the current site and is forwarded to other sites which keep multi-activity, so that all sites which are multi-activity execute the same request message respectively, and the configured multi-site which is used for multi-activity is ensured to keep multi-activity. On the basis of not influencing the execution of the original request message, the request message is broadcast to the most active opposite terminal stations by setting the broadcast identification, the implementation mode is simple, the implementation mode does not depend on the underlying system software, and the additional software architecture or the complex gateway design is not required, so that the implementation cost is effectively reduced.
Optionally, the determining whether the broadcast identifier is set based on the request message corresponding to the returned result includes:
determining whether the related operation of the call data represented by the returned result is successfully executed;
if the related operation of the call data indicated by the return result is successfully executed, acquiring the request message corresponding to the return result; the request message is used for triggering the receiving station to execute related operation on the call data;
it is determined whether a broadcast flag has been set in a request header of the request message.
Specifically, after intercepting a return result of the current site execution request message through a set filter, determining whether the related operation on the call data is successfully executed according to the return result; if the return result indicates that the associated operation on the call data was not performed successfully, then the request message need not be forwarded to the configured multi-active other site. If the related operation to the call data indicated by the return result is successfully executed, determining whether a broadcast identifier is set in a request message corresponding to the return result, if the broadcast identifier is not set, setting the broadcast identifier in the request message to ensure that data synchronization between other stations with multiple activities and the local station is realized, and if the broadcast identifier is set, indicating that the request message is forwarded by other stations and is not an original request message, and only the current station needs to process the request message.
Optionally, if the broadcast identifier is not set, updating the request message by setting the broadcast identifier, and forwarding the updated request message to one or more peer stations included in the configuration information, where the method includes:
if the request header of the request message is not provided with the broadcast identifier, the request header is provided with the broadcast identifier, and the request message is updated;
Determining one or more opposite end stations which need to keep alive with the current station based on configuration information of the current station;
and forwarding the updated request message to the opposite terminal station so that the opposite terminal station can execute the same related operation on the call data.
Specifically, a broadcast identifier is not set in a request message corresponding to a return result of a current station, which indicates that the current station is the first station to receive the request message, and the current station and other stations are configured in configuration information to be stations for multiple activities, and in a state that the current station executes related operations on the scheduling data requested in the request message and the return result is that the execution is successful, in order to ensure data synchronization with other multiple activities stations, the invention updates the request message and forwards the request message to other multiple activities stations by setting the broadcast identifier in a request header of the request message received by the current station, so that the other multiple activities stations execute the same related operations on the scheduling data. Thereby ensuring data synchronization among multiple stations. For example, the sites for multiple activities in the configuration information include site a, site B and site C, and it is assumed that after the site a receives the request message a and executes the request message a successfully, a broadcast identifier is set in a request header of the request message a, so as to obtain an updated request message a1, where the request message a1 and the request message a trigger the receiving site to execute the same operation on the call data. And forwarding the request message a1 to the site B and the site C, where the site B receives the request message a1, determines that the request message a1 includes a broadcast identifier, and directly processes the request message a1 according to the existing flow, that is, processes the request message a1 through an access layer, a service processing layer and a data storage layer of the site B, and returns a result. No additional processing of the request message a1 is required. Likewise, the process flow is the same for site C and site B.
Optionally, if the broadcast identifier is not set in the request header of the request message, setting the broadcast identifier in the request header, and after updating the request message, including:
acquiring sender information of the request message, and updating the request header of the request message;
setting interface parameters corresponding to a request type according to the request type included in a request body of the request message to obtain an updated request body;
and determining a recombined request message as the updated request message based on the updated request header and the updated request body.
Specifically, in the case that the broadcast identifier is not set in the request message received by the current station and the current station has successfully executed, it is determined that the request message needs to be forwarded to the configured multi-active other station, and because the token temporarily used for identity authentication in the request header does not exist when the current station processes the request message, the token in the request header of the request message needs to be updated according to the sender information. In addition, for different operations of data, corresponding to different request types, there may be a difference between different sites, and according to different request types, interface parameters corresponding to the request types need to be determined, and a request body of the request message needs to be updated. And then based on the updated request header and the request body, obtaining an updated request message. The broadcast flag is set in the updated request message here.
Optionally, before the forwarding the updated request message to the peer station for the peer station to perform the same operation related to the call data, the method includes:
and storing the updated request message for retransmission under the condition that the current station fails to forward the updated request message.
Specifically, after determining the updated request message, the current station may save the updated request message before forwarding to the configured multi-active other station, where in a case that there may be a link abnormality (such as a network flash or the like) between the current station and the configured multi-active other station, the updated request message may not be successfully forwarded to the configured multi-active other station, and then the current station may resend the updated request message to the configured multi-active other station after a period of time. Specifically, the retransmission may be performed with a timing, or the retransmission may be performed in case that the link is detected to be normal.
Optionally, the method further comprises:
acquiring the request message corresponding to the returned result indicating failure of executing the related operation of the call data from the configured logs corresponding to all the stations for multiple activities as a request message to be executed;
And periodically acquiring the request message to be executed by taking a natural day as a unit, and triggering a station receiving the request message to be executed to execute again.
Specifically, the multiple stations for multiple activities execute the request message, and feed back the returned result and record a log corresponding to the related operation result, where the log may indicate that the related operation on the call data is successfully executed or that the related operation on the call data is failed to be executed.
Logs used for representing failure in executing related operations on the call data are obtained, and request messages corresponding to the logs are determined to be the request messages to be executed.
And taking a natural day as a unit, periodically acquiring the request messages to be executed, and triggering the stations receiving the request messages to be executed to execute again. For example, the request message of the current multiple liveness failure is automatically reprocessed at fixed time through a fixed time task, the action does not need to be manually participated, the complexity of manual operation is reduced to a greater extent, and errors caused by the manual operation are avoided. By performing the daily timing processing, the request message (task) failed in the last natural day is not automatically reprocessed after the last day.
Optionally, the method further comprises:
and collecting the returned result of the failure of the execution of the related operation of the call data, and providing prompt and early warning through a monitoring system.
Specifically, the invention also adds a monitoring mechanism, collects the return result of the failure of the execution of the related operation of the call data, visually displays the result to the service personnel through the monitoring system, and provides prompt and early warning in real time, so that the service personnel can control the return result to indicate the site of the failure of the execution of the related operation of the call data through the platform, and execute the request message corresponding to the return result again. On one hand, the request message corresponding to the failure return result can be re-executed by the periodic automatic control station, on the other hand, the request message corresponding to the failure return result can be re-executed by the station is controlled by a manual mode, and the mode of re-executing the request message to be executed is increased, so that the method is more flexible.
According to the cross-site multi-activity processing method provided by the invention, the broadcast identification is set by the request message received by the current site and is forwarded to other sites which keep multi-activity, so that all sites which are multi-activity execute the same request message respectively, and the configured multi-site which is used for multi-activity is ensured to keep multi-activity. In addition, under the condition of multi-activity failure, the multi-activity of the cross-site is ensured by periodically automatically retransmitting the request message or manually controlling the retransmission request message, and prompt early warning is provided for the user in a visual mode. On the basis of not influencing the execution of the original request message, the obtained request message is up to active opposite end stations by recombining the original request message and setting a broadcast identifier, the realization mode is simple, the implementation mode is not dependent on the underlying system software, no additional software architecture or complex gateway design is required, the realization cost is effectively reduced, and the timeliness is high.
In order to more clearly describe the adaptive adjustment method of rank indication provided by the present invention, a specific example will be described below.
Fig. 2 is a schematic implementation flow chart of a cross-site multi-activity processing method provided by an embodiment of the present invention, where, as shown in fig. 2, the method includes:
suppose that site a and site B are configured in the configuration file for multiple activities. Site a is the first site to receive the request message and site B is the site to receive the request message with the added broadcast identification.
Station a receives a request message, which initiates a related operation to the call data;
the processing logic of site a may be split into an access layer, a service processing layer, and a data storage layer.
The access layer is responsible for the multipoint access of a front-end participation mechanism and a back-end third party application, sends an access request to a service processing layer (comprising authentication, system management and the like), filters the request when the request is accepted, processes the request message into a repeat request wrapper which can be used by an application, and continues to execute the call of the processing layer;
the service processing layer is mainly used for calling interface processing logic and calling the functions of the data storage layer to realize data reading, writing and other operations;
the data storage layer receives the call of the service processing layer to perform data reading, writing and other operations, and stores the data into the local site database.
After the data warehouse-in processing is successful, returning to an access layer success result layer by layer, intercepting the returned result by the response body device, and carrying out subsequent processing:
1. based on the returned result, determining whether the corresponding request message has set a broadcast identifier;
2. judging whether the access layer is processed normally or not;
3. acquiring a request body called by a background;
4. acquiring a request head, and setting a broadcast mark in the request head;
5. updating a token in the request header based on the information of the sender;
6. processing the request parameters, and processing the special interfaces independently; different interface parameters are configured for different service types corresponding to different operations;
7. storing the request header, the request body and other contents into a warehouse; so that when the station A forwards the updated request message to the station B, the station A and the station B are abnormally linked, and after the forwarding fails, the station A can send the updated request message to the station B again;
8. and calling an interface of the background service of the opposite terminal station, and sending the data reorganization http request to the opposite terminal station B.
After receiving the updated request message, the station B executes the related operation of the modulation data requested by the updated request message through the access layer, the service processing layer and the data storage layer, returns the successful result of the access layer by layer after the data warehousing processing is successful, acquires the returned result through the filter, determines whether the broadcast identification is configured in the request message according to the request message corresponding to the returned result, and if the broadcast identification is configured, namely, the request message sent by other stations (station A) is confirmed, the station B does not execute the broadcast processing any more, continues to execute the same processing logic, and directly returns the front end to perform subsequent display.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention; as shown in fig. 3, the electronic device includes a processor (processor) 310, a communication interface (Communications Interface) 320, a memory (memory) 330, and a communication bus 340, where the processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. Processor 310 may invoke logic instructions in memory 330 to perform cross-site multi-lived processing, the method comprising:
acquiring a return result of the current site; the return result is used for indicating whether the related operation on the call data is successfully executed or not;
determining whether a broadcast identifier is set or not based on the request message corresponding to the return result;
if the broadcast identification is not set, updating the request message by setting the broadcast identification, and forwarding the updated request message to one or more opposite end stations included in the configuration information;
the configuration information is used for configuring a plurality of stations for multiple activities, each station is used for processing related operations of the request message on call data, and logs corresponding to the related operation results are recorded.
Optionally, the determining whether the broadcast identifier is set based on the request message corresponding to the returned result includes:
Determining whether the related operation of the call data represented by the returned result is successfully executed;
if the related operation of the call data indicated by the return result is successfully executed, acquiring the request message corresponding to the return result; the request message is used for triggering the receiving station to execute related operation on the call data;
it is determined whether a broadcast flag has been set in a request header of the request message.
Optionally, if the broadcast identifier is not set, updating the request message by setting the broadcast identifier, and forwarding the updated request message to one or more peer stations included in the configuration information, where the method includes:
if the request header of the request message is not provided with the broadcast identifier, the request header is provided with the broadcast identifier, and the request message is updated;
determining one or more opposite end stations which need to keep alive with the current station based on configuration information of the current station;
and forwarding the updated request message to the opposite terminal station so that the opposite terminal station can execute the same related operation on the call data.
Optionally, if the broadcast identifier is not set in the request header of the request message, setting the broadcast identifier in the request header, and after updating the request message, including:
Acquiring sender information of the request message, and updating the request header of the request message;
setting interface parameters corresponding to a request type according to the request type included in a request body of the request message to obtain an updated request body;
and determining a recombined request message as the updated request message based on the updated request header and the updated request body.
Optionally, before the forwarding the updated request message to the peer station for the peer station to perform the same operation related to the call data, the method includes:
and storing the updated request message for retransmission under the condition that the current station fails to forward the updated request message.
Optionally, the method further comprises:
acquiring the request message corresponding to the returned result indicating failure of executing the related operation of the call data from the configured logs corresponding to all the stations for multiple activities as a request message to be executed;
and periodically acquiring the request message to be executed by taking a natural day as a unit, and triggering a station receiving the request message to be executed to execute again.
Optionally, the method further comprises:
and collecting the returned result of the failure of the execution of the related operation of the call data, and providing prompt and early warning through a monitoring system.
It should be noted that, the electronic device provided by the present invention can implement all the method steps implemented by the method embodiment and achieve the same technical effects, and the parts and beneficial effects that are the same as those of the method embodiment in the present embodiment are not described in detail herein.
Further, the logic instructions in the memory 330 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Fig. 4 is a schematic structural diagram of a cross-site multi-activity processing apparatus according to an embodiment of the present invention, where, as shown in fig. 4, the apparatus includes:
an obtaining module 401, configured to obtain a return result of the current site; the return result is used for indicating whether the related operation on the call data is successfully executed or not;
a determining module 402, configured to determine whether a broadcast identifier exists based on a request message corresponding to the returned result;
an updating module 403, configured to update the request message by setting a broadcast identifier if the broadcast identifier does not exist, and forward the updated request message to one or more peer stations included in the configuration information;
the configuration information is used for configuring a plurality of stations for multiple activities, each station is used for processing related operations of the request message on data, and logs corresponding to the related operation results are recorded.
Optionally, the apparatus further comprises:
the failure task module is used for acquiring the request message corresponding to the return result indicating that the execution of the related operation of the call data fails from the configured logs corresponding to all the sites for multiple activities, and taking the request message as a request message to be executed;
And the retransmission module is used for periodically acquiring the request message to be executed by taking a natural day as a unit and triggering a station receiving the request message to be executed to execute again.
Optionally, the apparatus further comprises:
and the early warning module is used for collecting the return result of the failure of executing the related operation of the call data and providing prompt early warning through the monitoring system.
Specifically, the cross-site multi-activity processing device provided by the invention can realize all the method steps realized by the method embodiment and can achieve the same technical effects, and the parts and the beneficial effects which are the same as those of the method embodiment in the embodiment are not described in detail.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are capable of performing the cross-site multi-lived processing method provided by the above embodiments.
In another aspect, the present invention further provides a processor readable storage medium, where a computer program is stored, where the computer program is configured to cause the processor to execute the cross-site multi-activity processing method provided in the foregoing embodiments.
The processor-readable storage medium may be any available medium or data storage device that can be accessed by a processor, including, but not limited to, magnetic storage (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical storage (e.g., CD, DVD, BD, HVD, etc.), semiconductor storage (e.g., ROM, EPROM, EEPROM, nonvolatile storage (NAND FLASH), solid State Disk (SSD)), and the like.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (7)

1. A method for cross-site multi-liveness processing, comprising:
acquiring a return result of the current site; the return result is used for indicating whether the related operation on the call data is successfully executed or not;
determining whether a broadcast identifier is set or not based on the request message corresponding to the return result;
if the broadcast identification is not set, updating the request message by setting the broadcast identification, and forwarding the updated request message to one or more opposite end stations included in the configuration information;
the configuration information is used for configuring a plurality of stations for multiple activities, each station is used for processing related operations of the request message on call data and recording logs corresponding to the related operation results;
The determining whether the broadcast identifier is set based on the request message corresponding to the returned result includes:
determining whether the related operation of the call data represented by the returned result is successfully executed;
if the related operation of the call data indicated by the return result is successfully executed, acquiring the request message corresponding to the return result; the request message is used for triggering the receiving station to execute related operation on the call data;
determining whether a broadcast identifier is set in a request header of the request message;
if the broadcast identifier is not set, updating the request message by setting the broadcast identifier, and forwarding the updated request message to one or more opposite end stations included in the configuration information, including:
if the request header of the request message is not provided with the broadcast identifier, the request header is provided with the broadcast identifier, and the request message is updated;
determining one or more opposite end stations which need to keep alive with the current station based on configuration information of the current station;
forwarding the updated request message to the opposite terminal station so that the opposite terminal station can execute the same related operation on the call data;
If the broadcast identifier is not set in the request header of the request message, the method includes that after the request header is set with the broadcast identifier and the request message is updated, the method includes:
acquiring sender information of the request message, and updating the request header of the request message;
setting interface parameters corresponding to a request type according to the request type included in a request body of the request message to obtain an updated request body;
and determining a recombined request message as the updated request message based on the updated request header and the updated request body.
2. The method according to claim 1, wherein the forwarding the updated request message to the peer station for the peer station to perform the same operation related to the call data comprises:
and storing the updated request message for retransmission under the condition that the current station fails to forward the updated request message.
3. The cross-site multi-liveness processing method of claim 1, wherein the method further comprises:
acquiring the request message corresponding to the returned result indicating failure of executing the related operation of the call data from the configured logs corresponding to all the stations for multiple activities as a request message to be executed;
And periodically acquiring the request message to be executed by taking a natural day as a unit, and triggering a station receiving the request message to be executed to execute again.
4. A cross-site multi-liveness processing method as in claim 1 or 3, wherein the method further comprises:
and collecting the returned result of the failure of the execution of the related operation of the call data, and providing prompt and early warning through a monitoring system.
5. An electronic device comprising a memory, a transceiver, and a processor;
a memory for storing a computer program; a transceiver for transceiving data under control of the processor; a processor for reading the computer program in the memory and performing the following operations:
acquiring a return result of the current site; the return result is used for indicating whether the related operation on the call data is successfully executed or not;
determining whether a broadcast identifier is set or not based on the request message corresponding to the return result;
if the broadcast identification is not set, updating the request message by setting the broadcast identification, and forwarding the updated request message to one or more opposite end stations included in the configuration information;
The configuration information is used for configuring a plurality of stations for multiple activities, and each station is used for processing related operations of the request message on data and recording logs corresponding to the related operation results;
the determining whether the broadcast identifier is set based on the request message corresponding to the returned result includes:
determining whether the related operation of the call data represented by the returned result is successfully executed;
if the related operation of the call data indicated by the return result is successfully executed, acquiring the request message corresponding to the return result; the request message is used for triggering the receiving station to execute related operation on the call data;
determining whether a broadcast identifier is set in a request header of the request message;
if the broadcast identifier is not set, updating the request message by setting the broadcast identifier, and forwarding the updated request message to one or more opposite end stations included in the configuration information, including:
if the request header of the request message is not provided with the broadcast identifier, the request header is provided with the broadcast identifier, and the request message is updated;
determining one or more opposite end stations which need to keep alive with the current station based on configuration information of the current station;
Forwarding the updated request message to the opposite terminal station so that the opposite terminal station can execute the same related operation on the call data;
if the broadcast identifier is not set in the request header of the request message, the method includes that after the request header is set with the broadcast identifier and the request message is updated, the method includes:
acquiring sender information of the request message, and updating the request header of the request message;
setting interface parameters corresponding to a request type according to the request type included in a request body of the request message to obtain an updated request body;
and determining a recombined request message as the updated request message based on the updated request header and the updated request body.
6. A cross-site multi-lived processing apparatus comprising:
the acquisition module is used for acquiring a return result of the current site; the return result is used for indicating whether the related operation on the call data is successfully executed or not;
the determining module is used for determining whether a broadcast identifier is set or not based on the request message corresponding to the return result;
the updating module is used for updating the request message by setting the broadcast identifier if the broadcast identifier is not set, and forwarding the updated request message to one or more opposite end stations included in the configuration information;
The configuration information is used for configuring a plurality of stations for multiple activities, and each station is used for processing related operations of the request message on data and recording logs corresponding to the related operation results;
the updating module is specifically configured to, in a process of determining whether a broadcast identifier is set based on a request message corresponding to the returned result:
determining whether the related operation of the call data represented by the returned result is successfully executed;
if the related operation of the call data indicated by the return result is successfully executed, acquiring the request message corresponding to the return result; the request message is used for triggering the receiving station to execute related operation on the call data;
determining whether a broadcast identifier is set in a request header of the request message;
the updating module is specifically configured to:
if the request header of the request message is not provided with the broadcast identifier, the request header is provided with the broadcast identifier, and the request message is updated;
determining one or more opposite end stations which need to keep alive with the current station based on configuration information of the current station;
forwarding the updated request message to the opposite terminal station so that the opposite terminal station can execute the same related operation on the call data;
If the broadcast identifier is not set in the request header of the request message, the method includes that after the request header is set with the broadcast identifier and the request message is updated, the method includes:
acquiring sender information of the request message, and updating the request header of the request message;
setting interface parameters corresponding to a request type according to the request type included in a request body of the request message to obtain an updated request body;
and determining a recombined request message as the updated request message based on the updated request header and the updated request body.
7. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for causing a computer to execute the cross-site multi-lived processing method of any one of claims 1 to 4.
CN202310560135.2A 2023-05-18 2023-05-18 Cross-site multi-activity processing method, device, apparatus and storage medium Active CN116302619B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310560135.2A CN116302619B (en) 2023-05-18 2023-05-18 Cross-site multi-activity processing method, device, apparatus and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310560135.2A CN116302619B (en) 2023-05-18 2023-05-18 Cross-site multi-activity processing method, device, apparatus and storage medium

Publications (2)

Publication Number Publication Date
CN116302619A CN116302619A (en) 2023-06-23
CN116302619B true CN116302619B (en) 2023-09-05

Family

ID=86796382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310560135.2A Active CN116302619B (en) 2023-05-18 2023-05-18 Cross-site multi-activity processing method, device, apparatus and storage medium

Country Status (1)

Country Link
CN (1) CN116302619B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018103099A1 (en) * 2016-12-09 2018-06-14 华为技术有限公司 Method, device and system for sending and receiving message
CN111614505A (en) * 2019-02-25 2020-09-01 华为技术有限公司 Message processing method and gateway equipment
CN113031858A (en) * 2021-02-10 2021-06-25 山东英信计算机技术有限公司 Data processing method, system and medium based on multi-double live storage
CN114579665A (en) * 2022-03-01 2022-06-03 深圳证券信息有限公司 Multi-cloud multi-activity data synchronization method and related equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018103099A1 (en) * 2016-12-09 2018-06-14 华为技术有限公司 Method, device and system for sending and receiving message
CN111614505A (en) * 2019-02-25 2020-09-01 华为技术有限公司 Message processing method and gateway equipment
CN114598626A (en) * 2019-02-25 2022-06-07 华为技术有限公司 Message processing method and gateway equipment
CN113031858A (en) * 2021-02-10 2021-06-25 山东英信计算机技术有限公司 Data processing method, system and medium based on multi-double live storage
CN114579665A (en) * 2022-03-01 2022-06-03 深圳证券信息有限公司 Multi-cloud multi-activity data synchronization method and related equipment

Also Published As

Publication number Publication date
CN116302619A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
CN111245900B (en) Distributed message sending processing system and processing method thereof
US11741075B2 (en) Methods and system of tracking transactions for distributed ledger
CN111835467B (en) Message sending method, device, computer equipment and storage medium
CN105306585A (en) Data synchronization method for plurality of data centers
CN108418859B (en) Method and device for writing data
CN112422684A (en) Target message processing method and device, storage medium and electronic device
CN113496004A (en) Message sending method and device
CN116302619B (en) Cross-site multi-activity processing method, device, apparatus and storage medium
CN116384993B (en) Method and system for realizing high consistency of order payment state based on cloud payment center
CN111190754B (en) Block chain event notification method and block chain system
CN112632093A (en) Work order processing method, device, system, storage medium and program product
CN110620684A (en) Storage double-control split-brain-preventing method, system, terminal and storage medium
CN113965447B (en) Online cloud diagnosis method, device, system, equipment and storage medium
CN114612204A (en) Account checking method and device
CN111752911A (en) Data transmission method, system, terminal and storage medium based on Flume
CN110365627B (en) Application program synchronization method and device, computing equipment and storage medium
CN110166528A (en) The method, apparatus and computer equipment for preventing node Notification of Changes from losing
CN116643733B (en) Service processing system and method
CN113315875B (en) Call information synchronization method and device, call information synchronization equipment and storage medium
CN111291296B (en) Content issuing method and device
CN115102854B (en) Remote procedure call route management control method, system and equipment for micro-service
CN116916299A (en) Authorization code emergency guarantee method, device, equipment and medium
CN116385003A (en) Transaction revocation method, apparatus, device, medium, and computer program product
CN114090299A (en) Inter-cluster data synchronization method and device and electronic equipment
CN116896592A (en) Service message processing method, device, equipment and medium

Legal Events

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