CN111880949B - Service information processing method, system, device, server and terminal - Google Patents

Service information processing method, system, device, server and terminal Download PDF

Info

Publication number
CN111880949B
CN111880949B CN202010738923.2A CN202010738923A CN111880949B CN 111880949 B CN111880949 B CN 111880949B CN 202010738923 A CN202010738923 A CN 202010738923A CN 111880949 B CN111880949 B CN 111880949B
Authority
CN
China
Prior art keywords
service information
service
processing
processed
message
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
CN202010738923.2A
Other languages
Chinese (zh)
Other versions
CN111880949A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010738923.2A priority Critical patent/CN111880949B/en
Publication of CN111880949A publication Critical patent/CN111880949A/en
Application granted granted Critical
Publication of CN111880949B publication Critical patent/CN111880949B/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/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Computer And Data Communications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a method, a system, a device, a server and a terminal for processing service information, wherein the method is applied to message middleware deployed in a main server in a service processing system and comprises the following steps: acquiring a service message to be processed sent by a terminal; analyzing the service message to be processed to obtain service information and processing requirements; and controlling the master server and the slave servers to process the service information according to the processing requirements. The method is applied to the terminal and comprises the following steps: generating a service message to be processed for the target service when a processing instruction for the target service is acquired; and sending the service message to be processed to the message middleware so as to enable the message middleware to analyze the service message to be processed, obtain service information and processing requirements, and control the master server and the slave server to process the service information according to the processing requirements. By applying the embodiment of the invention, the timeliness requirement and the reliability requirement of different types of business on business information processing can be met.

Description

Service information processing method, system, device, server and terminal
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a method, a system, an apparatus, a server, and a terminal for processing service information.
Background
The message middleware is used as instant messaging software suitable for data transmission between devices in a distributed service processing system, and is widely applied to processing tasks of service information such as registration information, order information and the like. As shown in fig. 1, the distributed service processing system includes a master server 110, a plurality of slave servers 120, and a plurality of terminals 130, wherein the master server 110 can perform data interaction with the plurality of terminals.
Message middleware is deployed on a master server and a plurality of slave servers. The terminal may send the service information to a message middleware deployed on the master server, and after receiving the service information, the message middleware may store the service information in a disk of the master server and send feedback notification to the terminal, and may also send the service information to the slave server, where the slave server may store the service information in a disk of the slave server when receiving the service information.
At present, when the message middleware is deployed, the processing rule of the message middleware on the service information is preset. For example, the preset processing rule may be synchronous copy, synchronous disk storage, etc., when the master server receives the service information sent by the terminal, the message middleware stores the service information in a disk of the master server and synchronously sends the service information to the slave server, when the slave server receives the service information, the slave server stores the service information in a disk of the slave server, and the master server stores the service information in the disk and sends feedback notification to the terminal.
The timeliness and reliability requirements for the processing of the service information are also different for different types of services, and then the duplication and storage requirements for the service information are also different. However, the processing rule of the current message middleware on the service information is set when the message middleware is deployed, so that the processing modes of all the service information are the same, and the timeliness requirement and the reliability requirement of different types of services on the service information processing cannot be met.
Disclosure of Invention
The embodiment of the invention aims to provide a service information processing method, a system, a device, a terminal and a server, so as to meet the timeliness requirement and the reliability requirement of different types of services on service information processing. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for processing service information, which is applied to a message middleware deployed in a master server in a service processing system, where the service processing system further includes a slave server and a terminal, and the method includes:
acquiring a service message to be processed sent by a terminal, wherein the service message to be processed at least comprises service information and processing requirements, and the processing requirements are preset based on the attribute of the service information;
Analyzing the service message to be processed to obtain the service information and the processing requirement;
and controlling the master server and the slave server to process the service information according to the processing requirement, wherein the processing at least comprises disc storage and copying.
Optionally, the step of analyzing the service message to be processed to obtain the service information and the processing requirement includes:
analyzing the service message to be processed to obtain service information carried by the service message to be processed and field content of a preset field as target field content, wherein the service message to be processed comprises a plurality of fields;
and determining a target processing requirement corresponding to the target field content according to the corresponding relation between the preset field content and the processing requirement, and taking the target processing requirement as the processing requirement of the service information.
Optionally, the processing requirement is synchronous replication and synchronous disk storage;
the step of controlling the master server and the slave server to process the service information according to the processing requirement comprises the following steps:
when the service information to be processed is received, storing the service information in a disk of the master server, and sending the service information to the slave server, so that the slave server stores the service information in the disk of the slave server when receiving the service information;
And after the service information is stored in the disk of the master server and the disk of the slave server, sending a feedback notice to the terminal.
Optionally, the processing requirement is synchronous replication and asynchronous disk storage, and the service message to be processed further includes a first time requirement corresponding to the asynchronous disk storage;
the step of controlling the master server and the slave server to process the service information according to the processing requirement comprises the following steps:
when the service information to be processed is received, a first target time point is determined according to the first time requirement, and the service information and the time information are sent to the slave server, so that the slave server stores the service information in a disk of the slave server at the first target time point, wherein the time information comprises the first time requirement and/or the first target time point;
after the service information and the time information are sent to the slave server, a feedback notice is sent to the terminal;
and storing the service information in a disk of the main server at the first target time point.
Optionally, the processing requirement is asynchronous replication and synchronous disk storage, and the service message to be processed further includes a second time requirement corresponding to the asynchronous replication;
The step of controlling the master server and the slave server to process the service information according to the processing requirement comprises the following steps:
when the service information to be processed is received, the service information is stored in a disk of the main server;
after the service information is stored in the disk of the main server, a feedback notice is sent to the terminal;
and determining a second target time point according to the second time requirement, and transmitting the service information to the slave server at the second target time point so that the slave server stores the service information in a disk of the slave server when receiving the service information.
Optionally, the processing requirements are asynchronous replication and asynchronous disk storage, and the service message to be processed further includes a first time requirement corresponding to the asynchronous disk storage and a second time requirement corresponding to the asynchronous replication;
the step of controlling the master server and the slave server to process the service information according to the processing requirement comprises the following steps:
when the service information to be processed is received, a feedback notice is sent to a terminal;
determining a first target time point according to the first time requirement, determining a second time point according to the second time requirement, and sending the service information and the time information to the slave server at the second target time point so that the slave server stores the service information in a disk of the slave server at the first target time point, wherein the time information comprises the first time requirement and/or the first target time point;
And storing the service information in a disk of the main server at the first target time point.
In a second aspect, an embodiment of the present invention provides a method for processing service information, which is applied to a terminal in a service processing system, where the service processing system further includes a master server and a slave server, and a message middleware is deployed in the master server, and the method includes:
generating a service message to be processed for a target service when a processing instruction for the target service is acquired, wherein the service message to be processed at least comprises service information and processing requirements of the target service, and the processing requirements are set in advance based on the attribute of the service information;
and sending the service message to be processed to the message middleware so that the message middleware analyzes the service message to be processed to obtain the service information and the processing requirement, and controlling the master server and the slave server to process the service information according to the processing requirement.
Optionally, the step of generating a service message to be processed for the target service includes:
acquiring service information of the target service;
Determining the processing requirement of the service information according to the attribute of the service information, and taking the processing requirement as a target processing requirement;
determining target field content corresponding to the target processing requirement according to the corresponding relation between the preset processing requirement and the field content;
and inserting the target field content into a preset field of the to-be-processed service message corresponding to the service information to obtain the to-be-processed service message aiming at the target service, wherein the to-be-processed service message comprises a plurality of fields.
In a third aspect, an embodiment of the present invention provides a service processing system, where the service processing system includes a terminal, a master server, and a slave server, where a message middleware is deployed in the master server, where:
the terminal is used for generating a service message to be processed aiming at the target service when acquiring a processing instruction aiming at the target service; sending the service message to be processed to the message middleware, wherein the service message to be processed at least comprises service information of the target service and processing requirements, and the processing requirements are preset based on the attribute of the service information;
the message middleware is used for acquiring a service message to be processed sent by the terminal; analyzing the service message to be processed to obtain the service information and the processing requirement; and controlling the master server and the slave server to process the service information according to the processing requirement, wherein the processing at least comprises disc storage and copying.
In a fourth aspect, an embodiment of the present invention provides a service information processing apparatus, which is applied to a message middleware deployed in a master server in a service processing system, where the service processing system further includes a slave server and a terminal, and the apparatus includes:
the system comprises a service message acquisition module, a service message processing module and a service message processing module, wherein the service message acquisition module is used for acquiring a service message to be processed, which is sent by a terminal, wherein the service message to be processed at least comprises service information and processing requirements, and the processing requirements are preset based on the attribute of the service information;
the analysis module is used for analyzing the service message to be processed to obtain the service information and the processing requirement;
and the message processing module is used for controlling the master server and the slave server to process the service information according to the processing requirement, wherein the processing at least comprises disk storage and copying.
In a fifth aspect, an embodiment of the present invention provides a service information processing apparatus, which is applied to a terminal in a service processing system, where the service processing system further includes a master server and a slave server, and a message middleware is deployed in the master server, where the apparatus includes:
the service message generation module is used for generating a service message to be processed for a target service when a processing instruction for the target service is acquired, wherein the service message to be processed at least comprises service information and processing requirements of the target service, and the processing requirements are set on the basis of the attribute of the service information in advance;
And the service message sending module is used for sending the service message to be processed to the message middleware so that the message middleware can analyze the service message to be processed to obtain the service information and the processing requirement, and the master server and the slave server are controlled to process the service information according to the processing requirement.
In a sixth aspect, an embodiment of the present invention provides a server, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the business information processing method in any one of the first aspect when executing the program stored in the memory.
In a seventh aspect, an embodiment of the present invention provides a terminal, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the business information processing method in any one of the second aspects when executing the program stored in the memory.
In an eighth aspect, an embodiment of the present invention provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the steps of the method for processing service information according to any one of the first aspects.
In a ninth aspect, an embodiment of the present invention provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements the steps of the method for processing service information according to any one of the second aspects.
In the scheme provided by the embodiment of the invention, the message middleware deployed in the main server in the service processing system can acquire the service message to be processed sent by the terminal, wherein the service message to be processed at least comprises service information and processing requirements, and the processing requirements are preset based on the attribute of the service information; analyzing the service message to be processed to obtain service information and processing requirements; and controlling the master server and the slave server to process the service information according to the processing requirements, wherein the processing at least comprises disk storage and copying. The processing requirements included in the service message to be processed sent by the terminal are set according to the attribute of the service information, after the message middleware analyzes the service message to be processed to obtain the service information and the processing requirements, the main server and the auxiliary server can be controlled to process the service information according to the processing requirements, but not all the processing modes of the service information are the same, so that the timeliness requirements and the reliability requirements of different types of services on the service information processing can be met.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a schematic diagram of a prior art business processing system;
fig. 2 is a flowchart of a first method for processing service information according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a first method for processing service information according to an embodiment of the present invention;
FIG. 4 is a flowchart of a second method for processing service information according to an embodiment of the present invention;
FIG. 5 is a specific flowchart of step S401 in the embodiment shown in FIG. 4;
fig. 6 is a schematic structural diagram of a service processing system according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a first service information processing apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a second service information processing apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a service message generating module 801 in the apparatus shown in fig. 8;
fig. 10 is a schematic structural diagram of a server according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
In order to meet the timeliness requirement and the reliability requirement of different types of services on service information processing, the embodiment of the invention provides a service information processing method, a system, a device, a terminal, a server, a computer readable storage medium and a computer program product. The following first describes a method for processing the first service information provided by the embodiment of the present invention.
The first service information processing method provided by the embodiment of the invention can be applied to message middleware deployed in a main server in a service processing system, wherein the service processing system comprises the main server, a slave server and a terminal. The master server and the slave server finish processing the service information sent by the terminal together.
As shown in fig. 2, a method for processing service information is applied to message middleware deployed in a master server in a service processing system, where the service processing system further includes a slave server and a terminal, and the method includes:
s201, obtaining a service message to be processed sent by a terminal;
The service message to be processed at least comprises service information and processing requirements, wherein the processing requirements are preset based on the attribute of the service information.
S202, analyzing the service message to be processed to obtain the service information and the processing requirement;
and S203, controlling the master server and the slave server to process the service information according to the processing requirement.
Wherein the processing includes at least inventory and replication.
In the scheme provided by the embodiment of the invention, the message middleware deployed in the main server in the service processing system can acquire the service message to be processed sent by the terminal, wherein the service message to be processed at least comprises service information and processing requirements, and the processing requirements are preset based on the attribute of the service information; analyzing the service message to be processed to obtain service information and processing requirements; and controlling the master server and the slave server to process the service information according to the processing requirements, wherein the processing at least comprises disk storage and copying. Because the service information to be processed sent by the terminal comprises the processing requirements set according to the attribute of the service information, after the message middleware analyzes the service information to be processed to obtain the service information and the processing requirements, the main server and the auxiliary server can be controlled to process the service information according to the processing requirements instead of the same processing modes of all the service information, so that the timeliness requirements and the reliability requirements of different types of services on the service information processing can be met.
When the target service needs to be processed, the user can send out a processing instruction aiming at the target service. In this way, when the terminal obtains the processing instruction for the target service, the terminal can generate the service message to be processed for the target service and send the service message to be processed to the main server. The target service may be a service such as order release, account registration, and logistics information query, which are not specifically limited herein.
Thus, in the above step S201, the message middleware deployed in the main server may acquire the service message to be processed sent by the terminal. The service information to be processed at least comprises service information and processing requirements, the processing requirements are preset based on the attribute of the service information, the service information is information which is related to the target service and needs to be sent to a server for processing, for example, the service information can be specific order information of order service, specific account number information of account number registration service and the like.
The attribute of the service information is used for representing the reliability requirement and timeliness requirement which are required to be met for processing the service information. For example, the service information is order information, and because the processing of the order information generally requires higher reliability and lower timeliness, the attribute of the service information can be "high reliability and lower timeliness", which represents that the reliability requirement required to be met for processing the order information is higher and the timeliness requirement is lower, therefore, the order information needs to be backed up and saved in time, and the processing requirement can be set as "synchronous copy and synchronous save" based on the attribute of the order information, so that the information to be processed generated by the terminal can include the order information and the processing requirement of "synchronous copy and synchronous save".
After the service message to be processed is obtained, the message middleware can analyze the service message to be processed to obtain the service information and the processing requirement included in the service message to be processed. Specifically, the message middleware may parse the service message to be processed according to the network communication protocol, so as to obtain service information and processing requirements included in the service message.
Further, the message middleware may perform the above step S203, that is, control the master server and the slave server to process the service information according to the processing requirement. The processing of the service information at least comprises two processing modes of disk storage and copying. The disk storage processing may include synchronous disk storage and asynchronous disk storage, and the copy processing may include synchronous copy and asynchronous copy.
For example, when the service information included in the service message to be processed is order information and the processing requirement is synchronous copy and synchronous save, the message middleware can store the order information in the disk of the master server when receiving the service message to be processed and send the order information to the slave server, so that the slave server can store the order information in the disk of the slave server when receiving the order information, and the purpose of synchronous copy and synchronous save of the service information is achieved.
After the copying and the disk storing of the service information are completed, the main server can send the service information to other terminals subscribed to the service information. Since the service information is stored in the slave server, when the master server fails to operate due to a failure, maintenance, or the like, the slave server can distribute the service information as a new master server to the terminal or the like.
As an implementation manner of the embodiment of the present invention, the step of analyzing the to-be-processed service message to obtain the service information and the processing requirement may include:
analyzing the service message to be processed, and acquiring service information carried by the service message to be processed and field content of a preset field as target field content; and determining a target processing requirement corresponding to the target field content according to the corresponding relation between the preset field content and the processing requirement, and taking the target processing requirement as the processing requirement of the service information.
In order to store the processing requirement of the service information in the service message to be processed, the corresponding relation between the processing requirement and the field content can be preset, so that after the service side user sets the processing requirement of the target service according to the attribute of the service information, the terminal can acquire the processing requirement as the target processing requirement, and further after acquiring the service information of the target service, the terminal can determine the target field content corresponding to the target processing requirement according to the corresponding relation between the preset processing requirement and the field content, and further can insert the target field content into the preset field of the service message to be processed corresponding to the service information, so as to obtain the service message to be processed aiming at the target service. The service message to be processed includes a plurality of fields, and the preset field is a field at a preset position in the service message to be processed, for example, may be an MsgConfig field in a message header of the service message to be processed, which is not specifically limited herein.
After the message middleware obtains the service message to be processed, the message middleware can analyze the service message to be processed, obtain the service information carried by the service message to be processed, obtain the field content of the preset field in the service message to be processed as the target field content, and then determine the target processing requirement corresponding to the target field content according to the corresponding relation between the preset processing requirement and the field content stored locally, and serve as the processing requirement of the service information. Thus, the message middleware can control the master server and the slave server to correspondingly process the service information according to the target processing requirement.
For example, the correspondence between the preset processing requirements and the field contents is shown in the following table:
processing requirements Field content
Synchronous copying and synchronous storing disk ZD1
Asynchronous copy, asynchronous save ZD2
Synchronous copy, asynchronous disk storage ZD3
Asynchronous copy, synchronous disk storage ZD4
When the content of the target field is ZD2, the message middleware can determine that the target processing requirement included in the service message to be processed is asynchronous copy and asynchronous disk storage according to the corresponding relation shown in the table, and further can control the master server and the slave server to perform asynchronous copy and asynchronous disk storage processing on the service information.
In the scheme provided by the embodiment of the invention, the message middleware can analyze the service message to be processed to acquire the service information carried by the service message to be processed and the field content of the preset field as the target field content; and determining a target processing requirement corresponding to the target field content according to the corresponding relation between the preset field content and the processing requirement, and taking the target processing requirement as the processing requirement of the service information. Therefore, after the message middleware acquires the service message to be processed, the service information and the processing requirement carried by the service message to be processed can be accurately determined, and the master server and the slave server can be controlled to process the service information according to the processing requirement.
As an implementation of the embodiment of the present invention, the processing requirement may be synchronous replication and synchronous inventory.
When the attribute of the service information included in the service information to be processed is 'high reliability and low timeliness', the reliability requirement which is required to be met for processing the service information is characterized to be higher, and the timeliness requirement is lower. For example, when the service information included in the service message to be processed is information such as order information and account number password, because the service information has high requirements on processing reliability, the service information needs to be stored and backed up as soon as possible, and after the storage and the backup are completed, a feedback notification is sent to the terminal as soon as possible to inform the terminal that the storage and the backup of the service information are completed, and the processing requirements of the service information can be synchronous copy and synchronous disk storage.
In this case, the step of controlling the master server and the slave server to process the service information according to the processing requirement may include:
when receiving the service information to be processed, storing the service information in a disk of a master server, and sending the service information to a slave server, so that the slave server stores the service information in the disk of the slave server when receiving the service information; and after the service information is stored in the disk of the master server and the disk of the slave server, sending feedback notification to the terminal.
In order to save and backup the service information included in the service message to be processed in time, the message middleware can save the service information in a disk of the master server when receiving the service message to be processed, and simultaneously send the service information to the slave server, and the slave server can immediately save the service information in the disk of the slave server when receiving the service information.
After the service information is stored in the disk of the master server and the disk of the slave server, the message middleware can send a feedback notification to the terminal in order to inform the terminal that the master server and the slave server have processed the service message to be processed. Therefore, when the processing requirement of the service information is synchronous copy and synchronous disk storage, the message middleware can control the master server and the slave server to store and backup the service information in time, so that the reliability requirement on the service information processing can be met.
In one embodiment, the slave server may send notification information to the master server after storing the service information in the disk to inform the master server that the slave server has already stored the service information, and the master server may send feedback notification to the terminal after storing the service information in the disk and receiving the notification information sent by the slave server.
Therefore, in the scheme provided by the embodiment of the invention, the message middleware can store the service information in the disk of the master server when receiving the service information to be processed and send the service information to the slave server, so that the slave server stores the service information in the disk of the slave server when receiving the service information; and after the service information is stored in the disk of the master server and the disk of the slave server, sending feedback notification to the terminal. Therefore, when the processing requirement of the service information is synchronous copy and synchronous disk storage, the message middleware can control the master server and the slave server to store and backup the service information in time, so that the reliability requirement on the service information processing can be met.
As an implementation manner of the embodiment of the present invention, the processing requirement may be synchronous replication and asynchronous disk storage, and the service message to be processed may further include a first target time point corresponding to the asynchronous disk storage.
When the attribute of the service information included in the service information to be processed is 'high reliability and high timeliness', the service information to be processed has the requirements of high reliability and high timeliness, the service information needs to be backed up as soon as possible, and a feedback notification is sent to the terminal as soon as possible after the backup is completed so as to inform the terminal that the backup of the service information is completed, the processing requirements of the service information can be synchronous copy and asynchronous storage, and at this time, the service information to be processed can include the first time requirement corresponding to the asynchronous storage.
In this case, the step of controlling the master server and the slave server to process the service information according to the processing requirement may include:
when a service message to be processed is received, determining a first target time point according to a first time requirement, and sending the service information and the time information to a slave server so that the slave server stores the service information in a disk of the slave server at the first target time point; after the service information and the time information are sent to the slave server, a feedback notice is sent to the terminal; and storing the service information in a disk of the main server at a first target time point.
In one embodiment, the user may preset a time requirement corresponding to the asynchronous save according to the attribute of the service information, as the first time requirement, for example, the user may set the first time requirement to be within 5 minutes after receiving the service information.
In this way, the to-be-processed service message sent by the terminal also includes a first time requirement, when the message middleware receives the to-be-processed service message, the message middleware can analyze and acquire the service information and the first time requirement included in the to-be-processed service message, then determine a time point for storing the service information in a server disk according to the first time requirement, and send the service information and the time information point to the slave server at a first target time point as the first time point. Wherein the time information may comprise the first time requirement and/or the first target point in time.
It is reasonable that the slave server, after receiving the service information and the time information, may store the service information in the disk of the slave server at the first target time point, or may redefine the first target time point according to the first time requirement, and store the service information in the disk of the slave server at the redetermined first target time point.
After sending the service information and the time information to the slave server, the message middleware may send a feedback notification to the terminal in order to inform the terminal that the service information has been copied from the master server to the slave server. The primary server may store the traffic information in a disk of the primary server at a first target point in time.
For example, if the user sets the first time requirement to be within 10 minutes after receiving the service information, when the time point when the main server receives the service information is 2020, 2 months, 20 days, 15 hours, 0 minutes, 0 seconds, and the main server may determine any time point between 2020, 2 months, 20 days, 15 hours, 0 minutes, 0 seconds and 2020, 2 months, 20 days, 15 hours, 10 minutes, 0 seconds as the first target time point, and then save the service information from the memory to the disk at the first time point; when the time point of receiving the service information from the server is 0 minutes and 05 seconds of 15 days of 20 months of 2020, the slave server can re-determine any time point between 0 minutes and 05 seconds of 15 days of 20 months of 2020 and 15 minutes and 05 seconds of 20 days of 2020 to be a first target time point, and then store the service information from the memory to the disk at the first time point, or store the service information from the memory to the disk at the first time point corresponding to the master server.
In one embodiment, the slave server may send notification information to the master server when receiving the service information, notifying the master server that the slave server will have received the service information, and the master server may send a feedback notification to the terminal when receiving the notification information sent by the slave server.
Therefore, the user can set the first time requirement corresponding to the asynchronous disk storage according to the attribute of the service information, and after the message middleware obtains the service information to be processed, the message middleware can analyze and obtain the service information, the processing requirement and the first time requirement, and further the disk storage processing is carried out on the service information according to the first time requirement.
In the scheme provided by the embodiment of the invention, when the message middleware receives the service message to be processed, the first target time point can be determined according to the first time requirement, and the service information and the time information are sent to the slave server, so that the slave server stores the service information in a disk of the slave server at the first target time point; after the service information and the time information are sent to the slave server, a feedback notice is sent to the terminal; and storing the service information in a disk of the main server at a first target time point. Therefore, after the message middleware obtains the service message to be processed, the service information, the processing requirement and the first time requirement can be obtained in a resolving mode, and further the service information is subjected to disc storage processing according to the first time requirement.
As an implementation manner of the embodiment of the present invention, the processing requirement may be asynchronous replication and synchronous disk storage, and the service message to be processed may further include a second time requirement corresponding to the asynchronous replication.
When the attribute of the service information included in the service information to be processed is 'high reliability and high timeliness', the reliability requirement and timeliness requirement which are required to be met for processing the service information are higher, the service information may need to be stored in a disk of a main server as soon as possible, a feedback notification is sent to the terminal as soon as possible after the storage is completed so as to inform the terminal that the storage of the service information is completed, the processing requirement of the service information may be asynchronous copy and synchronous disk storage, and at this time, the service information to be processed may also include a second time requirement corresponding to the asynchronous copy.
In this case, the step of controlling the master server and the slave server to process the service information according to the processing requirement may include:
when the service information to be processed is received, storing the service information in a disk of a main server; after the service information is stored in a disk of the main server, a feedback notice is sent to the terminal; and determining a second target time point according to the second time requirement, and transmitting the service information to the slave server at the second target time point so that the slave server stores the service information in a disk of the slave server when receiving the service information.
In one embodiment, the user may preset a time requirement corresponding to the asynchronous replication according to the attribute of the service information, as the second time requirement, for example, the user may set the second time requirement to be within 10 minutes after the main server receives the service information. In this way, the to-be-processed service message sent by the terminal also includes the second time requirement, and when the message middleware receives the to-be-processed service message, the message middleware can analyze and acquire the service information and the second time requirement included in the to-be-processed service message, and can store the service information in a disk of the main server.
After storing the service information in the disk of the main server, the message middleware may send a feedback notification to the terminal in order to inform the terminal that the service information has been stored in the disk of the main server. Then, a second target time point can be determined according to the second time requirement, and further at the second target time point, the message middleware can send the service information to the slave server, and the slave server can store the service information in a disk of the slave server when receiving the service information.
For example, if the user sets the second time requirement to be within 20 minutes after the master server receives the service information, when the time point when the master server receives the service information is 2020, 2, 20, 15, 3 minutes, 11 seconds, the master server may determine any time point between 2020, 2, 20, 15, 3 minutes, 11 seconds and 2020, 2, 20, 15, 23 minutes, 11 seconds as the second target time point, and then send the service information to the slave server at the second target time point.
Therefore, the user can set a second target time point corresponding to asynchronous copying according to the attribute of the service information, and after the message middleware obtains the service information to be processed, the message middleware can analyze and obtain the service information, the processing requirement and the second target time point, and further copy the service information according to the second target time point.
In the scheme provided by the embodiment of the invention, the message middleware can store the service information in the disk of the main server when receiving the service information to be processed; after the service information is stored in a disk of the main server, a feedback notice is sent to the terminal; and determining a second target time point according to the second time requirement, and transmitting the service information to the slave server at the second target time point so that the slave server stores the service information in a disk of the slave server when receiving the service information. Therefore, after the message middleware obtains the service message to be processed, the service information, the processing requirement and the second target time point can be obtained in a parsing mode, and further the service information is copied according to the second target time point.
As an implementation manner of the embodiment of the present invention, the processing requirement may be asynchronous replication and asynchronous storage, and the service message to be processed may further include a first target time point corresponding to the asynchronous storage and a second target time point corresponding to the asynchronous replication.
When the service information included in the service information to be processed has higher timeliness requirement and lower reliability requirement on service information processing, a feedback notice needs to be sent to the terminal as soon as possible when the service information to be processed is received, and the terminal is informed that the service information to be processed is received, and the processing requirement of the service information can be asynchronous copying and asynchronous disk storage, and at this time, the service information to be processed can also include a first time requirement corresponding to the asynchronous disk storage and a second time requirement corresponding to the asynchronous copying.
In this case, the step of controlling the master server and the slave server to process the service information according to the processing requirement may include:
when receiving the service information to be processed, sending a feedback notice to the terminal; determining a first target time point according to the first time requirement, determining a second time point according to the second time requirement, and sending service information and time information to a slave server at the second target time point so that the slave server stores the service information in a disk of the slave server at the first target time point; and storing the service information in a disk of the main server at a first target time point.
The user can preset a time point corresponding to the asynchronous storage and a time requirement corresponding to the asynchronous copying according to the attribute of the service information, and the time point and the time requirement corresponding to the asynchronous storage are respectively used as a first time requirement and a second time requirement, so that the service message to be processed sent by the terminal also comprises the first time requirement and the second time requirement.
When the message middleware receives the service information to be processed, the message middleware can send a feedback notification to the terminal in order to inform the terminal that the main server has received the service information. Meanwhile, the message middleware can analyze the service information to be processed to obtain the service information, the first time requirement and the second time requirement contained in the service to be processed.
Furthermore, the message middleware may determine a first target time point to send according to the first time requirement, determine a second target time point according to the second time requirement, and then send the service information and the time information to the slave server at the second target time point, and the master server may store the service information in a disk of the master server at the first target time point. Wherein the time information may comprise a time requirement and/or a first target point in time.
It is reasonable that the slave server may store the service information in the disk of the slave server at the first target time point after receiving the service information and the time information, or may re-determine the first target time point according to the first time requirement and store the service information in the disk of the slave server at the re-determined first target time point.
In this way, the message middleware can send feedback notification to the terminal when the main server receives the service message to be processed, then perform the disk storage processing on the service information according to the first time requirement, and perform the copying processing on the service information according to the second time requirement.
In the scheme provided by the embodiment of the invention, the message middleware can send a feedback notice to the terminal when receiving the service information to be processed; determining a first target time point according to the first time requirement, determining a second time point according to the second time requirement, and sending service information and time information to a slave server at the second target time point so that the slave server stores the service information in a disk of the slave server at the first target time point; and storing the service information in a disk of the main server at a first target time point. In this way, the message middleware can send feedback notification to the terminal when the main server receives the service message to be processed, then perform the disk storage processing on the service information according to the first time requirement, and perform the copying processing on the service information according to the second time requirement.
A first method for processing service information according to an embodiment of the present invention will be described with reference to fig. 3, where m represents a master server and s represents a slave server in fig. 3.
The terminal may set a processing requirement based on an attribute of the service information, and generate a service message to be processed, where the service message to be processed includes the service information and the processing requirement. Then, the terminal can send the service message to be processed to the message middleware deployed on the main server, and the message middleware analyzes the service message to be processed to obtain service information and processing requirements.
If the processing requirement is synchronous copy and synchronous disk storage, the master server stores the service information in the disk of the master server when receiving the service information to be processed, and sends the service information to the slave server, and the slave server stores the service information in the disk of the slave server when receiving the service information, namely "m/s message disk storage" in fig. 3. After the master server and the slave server both store the service information in the disk, the message middleware may send a feedback notification to the terminal.
If the processing requirement is synchronous copy and asynchronous disk storage, the master server sends the service information to the slave server when receiving the service information to be processed, and the master server and the slave server both store the service information in the disk at the first target time point, namely the process of'm/s message in memory and asynchronous disk storage' in fig. 3. After the master server sends the service information to the slave server, the message middleware may send a feedback notification to the terminal.
If the processing requirement is asynchronous copy and synchronous disk storage, the master server stores the service information in the disk of the master server when receiving the service information to be processed, and sends the service information to the slave server at the second target time point, and the slave server stores the service information in the disk of the slave server when receiving the service information, which is the process of "m-drop disk and s-asynchronous copy and synchronous disk storage" in fig. 3. After the primary server service information is saved in disk, the message middleware may send a feedback notification to the terminal.
If the processing requirement is asynchronous copy and asynchronous disk storage, after receiving the service message to be processed, the master server sends the service information to the slave server at the second target time point, and the master server and the slave server both store the service information in the disk at the first target time point, which is the process of "m message in memory asynchronous disk storage and s asynchronous copy asynchronous disk storage" in fig. 3. After receiving the service message to be processed, the main server may send a feedback notification to the terminal by the message middleware.
Corresponding to the first service information processing method, the embodiment of the invention also provides a second service information processing method. The following describes a second method for processing service information provided by the embodiment of the present invention.
As shown in fig. 4, a method for processing service information is applied to a terminal in a service processing system, where the service processing system further includes a master server and a slave server, and a message middleware is deployed in the master server, and the method includes:
s401, when a processing instruction aiming at a target service is acquired, generating a service message to be processed aiming at the target service;
the service message to be processed at least comprises service information of the target service and processing requirements, wherein the processing requirements are set on the basis of the attribute of the service information in advance.
S402, sending the service message to be processed to the message middleware so that the message middleware analyzes the service message to be processed to obtain the service information and the processing requirement, and controlling the master server and the slave server to process the service information according to the processing requirement.
In the scheme provided by the embodiment of the invention, the terminal can generate the service message to be processed for the target service when acquiring the processing instruction for the target service, wherein the service message to be processed at least comprises the service information and the processing requirement of the target service, and the processing requirement is set on the basis of the attribute of the service information in advance; and sending the service message to be processed to the message middleware so as to enable the message middleware to analyze the service message to be processed, obtain the service information and the processing requirement, and control the master server and the slave server to process the service information according to the processing requirement. Therefore, the terminal can store the processing requirements of the service information in the service information to be processed, and the message middleware can process the service information according to the processing requirements of the service information, but not the processing modes of all the service information are the same, so that the timeliness requirements and the reliability requirements of different types of services on the service information processing can be met.
When the user needs to process the target service, the user can send out a processing instruction aiming at the target service. In this way, in the above step S401, the terminal may generate a service message to be processed for the target service when acquiring the processing instruction for the target service. The target service may be a service such as order issuing, account registration, and logistics information query, which is not limited herein.
The service message to be processed at least can comprise service information and processing requirements of the target service, wherein the processing requirements are preset based on the attribute of the service information, and the service information is related information of the target service.
The attribute of the service information is used for representing the reliability requirement and timeliness requirement which are required to be met for processing the service information. For example, the service information is order information, and because the processing of the order information generally requires higher reliability and lower timeliness, the attribute of the service information can be "high reliability and lower timeliness", which represents that the reliability requirement required to be met for processing the order information is higher and the timeliness requirement is lower, therefore, the order information needs to be backed up and saved in time, and the processing requirement can be set as "synchronous copy and synchronous save" based on the attribute of the order information, so that the information to be processed generated by the terminal can include the order information and the processing requirement of "synchronous copy and synchronous save".
After generating the service message to be processed for the target service, the terminal may send the service message to be processed to the message middleware. Therefore, after receiving the service message to be processed, the message middleware can analyze the service message to be processed to obtain the service information and the processing requirement included in the service message to be processed. And then, the message middleware can control the master server and the slave server to process the service information according to the processing requirements.
The processing of the service information at least comprises two processing modes of disk storage and copying. The disk storage processing may include synchronous disk storage and asynchronous disk storage, and the copy processing may include synchronous copy and asynchronous copy.
As an implementation manner of the embodiment of the present invention, as shown in fig. 5, the step of generating the service message to be processed for the target service may include:
s501, acquiring service information of the target service;
in order to send the service information of the target service to the message middleware, so that the message middleware processes the service information, and the terminal can acquire the service information of the target service. For example, when the target service is an account registration service, the terminal may obtain service information such as user data, an account, and a password corresponding to the account registration service.
S502, determining the processing requirement of the service information according to the attribute of the service information, and taking the processing requirement as a target processing requirement;
after the service information corresponding to the target service is obtained, the user can set the processing requirement of the service information according to the attribute of the service information, so that the terminal can determine the processing requirement of the service information as the target processing requirement.
For example, when the service information is information such as user data, account number, password and the like corresponding to the account number registration service, the attribute of the service information is "high reliability and low timeliness", which means that the service information needs to be backed up and stored as soon as possible, and then the processing requirement of the service information can be determined to be "synchronous copy and synchronous storage" as the target processing requirement.
S503, determining target field content corresponding to the target processing requirement according to the corresponding relation between the preset processing requirement and the field content;
in order to store the processing requirements of the service information in the service message to be processed, the corresponding relationship between the processing requirements and the field content may be preset. After determining the target processing requirement of the service information, the terminal can determine the target field content corresponding to the target processing requirement according to the corresponding relation between the preset processing requirement and the field content, and insert the target field content into the preset field of the to-be-processed service message corresponding to the service information to obtain the to-be-processed service message corresponding to the target service. The preset field is a field at a preset position in the service message to be processed, for example, may be an MsgConfig field in a header of the service message to be processed, which is not limited herein.
S504, inserting the target field content into the preset field of the to-be-processed service message corresponding to the service information to obtain the to-be-processed service message aiming at the target service.
After determining the target field content corresponding to the target processing requirement, the terminal can insert the target field content into the preset field of the to-be-processed service message corresponding to the service information to obtain the to-be-processed service message aiming at the target service, so that the message middleware can extract the target field content of the preset field in the to-be-processed service message after receiving the to-be-processed service message, and can determine the target processing requirement of the service information according to the corresponding relation between the preset processing requirement and the field content, and then the message middleware can control the master server and the slave server to process the service information according to the target processing requirement. Wherein the pending service message comprises a plurality of fields.
Therefore, in the scheme provided by the embodiment of the invention, the terminal can acquire the service information of the target service; determining the processing requirement of the service information according to the attribute of the service information, and taking the processing requirement as a target processing requirement; determining target field content corresponding to the target processing requirement according to the corresponding relation between the preset processing requirement and the field content; and inserting the content of the target field into a preset field of the service message to be processed corresponding to the service information to obtain the service message to be processed aiming at the target service. Therefore, the message middleware can extract the target field content of the preset field in the service message to be processed, and can rapidly and accurately determine the target processing requirement of the service information according to the corresponding relation between the preset processing requirement and the field content.
The embodiment of the present invention also provides a service processing system, as shown in fig. 6, where the service processing system includes a terminal 601, a master server 602, and a slave server 603, where a message middleware is deployed in the master server 602, where:
the terminal 601 is configured to generate a service message to be processed for a target service when a processing instruction for the target service is acquired; sending the service message to be processed to the message middleware;
the service message to be processed at least comprises service information of the target service and processing requirements, wherein the processing requirements are set on the basis of the attribute of the service information in advance.
The message middleware is configured to obtain a service message to be processed sent by the terminal 601; analyzing the service message to be processed to obtain the service information and the processing requirement; according to the processing requirement, the master server 602 and the slave server 603 are controlled to process the service information;
wherein the processing includes at least inventory and replication.
In the solution provided by the embodiment of the present invention, the service processing system includes a terminal, a master server and a slave server, where a message middleware is deployed in the master server, where: the terminal is used for generating a service message to be processed for the target service when a processing instruction for the target service is acquired; sending a service message to be processed to the message middleware; message middleware for obtaining the service message to be processed sent by the terminal; analyzing the service message to be processed to obtain service information and processing requirements; and controlling the master server and the slave servers to process the service information according to the processing requirements. Because the service information to be processed sent by the terminal comprises the processing requirements set according to the attribute of the service information, after the message middleware analyzes the service information to be processed to obtain the service information and the processing requirements, the main server and the auxiliary server can be controlled to process the service information according to the processing requirements instead of the same processing modes of all the service information, so that the timeliness requirements and the reliability requirements of different types of services on the service information processing can be met.
As an implementation manner of the embodiment of the present invention, the message middleware deployed in the main server 602 in the service processing system may be specifically configured to parse a service message to be processed, and obtain service information carried by the service message to be processed and field content of a preset field as target field content; and determining a target processing requirement corresponding to the target field content according to the corresponding relation between the preset field content and the processing requirement, and taking the target processing requirement as the processing requirement of the service information.
As an implementation of the embodiment of the present invention, the processing requirement may be synchronous replication and synchronous inventory;
the message middleware deployed in the master server 602 in the service processing system may be specifically configured to store the service information in a disk of the master server when receiving the service message to be processed, and send the service information to the slave server, so that the slave server 603 stores the service information in the disk of the slave server when receiving the service information; after storing the service information in the disk of the master server 602 and in the disk of the slave server 603, a feedback notification is sent to the terminal 601.
As an implementation manner of the embodiment of the present invention, the processing requirement may be synchronous replication and asynchronous disk storage, and the service message to be processed may further include a first time requirement corresponding to the asynchronous disk storage;
The message middleware deployed in the master server 602 in the service processing system may specifically be configured to determine, when a to-be-processed service message is received, a first target time point according to a first time requirement, and send the service information and the time information to the slave server 603, so that the slave server 603 stores the service information in a disk of the slave server 603 at the first target time point; after sending the service information and the time information to the slave server 603, sending a feedback notification to the terminal 601; the traffic information is stored on the disk of the primary server 602 at a first target point in time.
Wherein the time information comprises a time requirement and/or a first target point in time.
As an implementation manner of the embodiment of the present invention, the processing requirement may be asynchronous replication and synchronous disk storage, and the service message to be processed may further include a second time requirement corresponding to asynchronous replication;
the message middleware deployed in the main server 602 in the service processing system may be specifically configured to store the service information in a disk of the main server 602 when receiving the service information to be processed; after storing the service information in the disk of the main server 602, sending a feedback notification to the terminal 601; a second target time point is determined according to the second time requirement, and the service information is sent to the slave server 603 at the second target time point, so that the slave server 603 stores the service information in a disk of the slave server 603 when receiving the service information.
As an implementation manner of the embodiment of the present invention, the processing requirement may be asynchronous replication and asynchronous disk storage, and the service message to be processed may further include a first time requirement corresponding to the asynchronous disk storage and a second time requirement corresponding to the asynchronous replication;
the message middleware deployed in the main server 602 in the service processing system may be specifically configured to send a feedback notification to the terminal 601 when receiving the service information to be processed; determining a first target time point according to the first time requirement, determining a second time point according to the second time requirement, and sending the service information and the time information to the slave server 603 at the second target time point so that the slave server 603 stores the service information in a disk of the slave server 603 at the first target time point; the traffic information is stored on the disk of the primary server 602 at a first target point in time.
Wherein the time information comprises a time requirement and/or a first target point in time.
As an implementation manner of the embodiment of the present invention, the terminal 601 may be specifically configured to obtain service information of a target service; determining the processing requirement of the service information according to the attribute of the service information, and taking the processing requirement as a target processing requirement; determining target field content corresponding to the target processing requirement according to the corresponding relation between the preset processing requirement and the field content; and inserting the content of the target field into a preset field of the service message to be processed corresponding to the service information to obtain the service message to be processed aiming at the target service.
Wherein the pending service message comprises a plurality of fields.
Corresponding to the first service information processing method, the embodiment of the invention also provides a service information processing device. The following describes a first service information processing apparatus provided by an embodiment of the present invention.
As shown in fig. 7, a service information processing apparatus is applied to message middleware deployed in a master server in a service processing system, the service processing system further including a slave server and a terminal, the apparatus comprising:
a service message obtaining module 701, configured to obtain a service message to be processed sent by a terminal;
the service message to be processed at least comprises service information and processing requirements, wherein the processing requirements are preset based on the attribute of the service information.
The parsing module 702 is configured to parse the service message to be processed to obtain the service information and the processing requirement;
a message processing module 703, configured to control the master server and the slave server to process the service information according to the processing requirement;
wherein the processing includes at least inventory and replication.
In the scheme provided by the embodiment of the invention, the message middleware deployed in the main server in the service processing system can acquire the service message to be processed sent by the terminal, wherein the service message to be processed at least comprises service information and processing requirements, and the processing requirements are preset based on the attribute of the service information; analyzing the service message to be processed to obtain service information and processing requirements; and controlling the master server and the slave server to process the service information according to the processing requirements, wherein the processing at least comprises disk storage and copying. Because the service information to be processed sent by the terminal comprises the processing requirements set according to the attribute of the service information, after the message middleware analyzes the service information to be processed to obtain the service information and the processing requirements, the main server and the auxiliary server can be controlled to process the service information according to the processing requirements instead of the same processing modes of all the service information, so that the timeliness requirements and the reliability requirements of different types of services on the service information processing can be met.
As an implementation manner of the embodiment of the present invention, the parsing module 702 may include:
an parsing sub-module (not shown in fig. 7) for parsing the service message to be processed, and obtaining the service information carried by the service message to be processed and the field content of a preset field as target field content;
a processing requirement determining submodule (not shown in fig. 7) configured to determine a target processing requirement corresponding to the target field content according to a corresponding relationship between a preset field content and the processing requirement.
As an implementation of the embodiment of the present invention, the processing requirement may be synchronous replication and synchronous inventory.
The message processing module 703 may include:
a first forwarding sub-module (not shown in fig. 7) for storing the service information in a disk of the master server when the service message to be processed is received, and transmitting the service information to the slave server, so that the slave server stores the service information in the disk of the slave server when the service information is received;
a first feedback sending sub-module (not shown in fig. 7) is configured to send a feedback notification to the terminal after the service information is stored in the disk of the master server and the disk of the slave server.
As an implementation manner of the embodiment of the present invention, the processing requirement may be synchronous replication and asynchronous disk storage, and the service message to be processed may further include a first time requirement corresponding to the asynchronous disk storage.
The message processing module 703 may include:
a second forwarding sub-module (not shown in fig. 7) configured to determine a first target time point according to the first time requirement when the service message to be processed is received, and send the service information and the time information to the slave server, so that the slave server stores the service information in a disk of the slave server at the first target time point;
wherein the time information comprises the time requirement and/or the first target point in time.
A second feedback transmission sub-module (not shown in fig. 7) for transmitting a feedback notification to the terminal after transmitting the service information and the time information to the slave server;
a first storage sub-module (not shown in fig. 7) for storing the service information in a disk of the main server at the first target point in time.
As an implementation manner of the embodiment of the present invention, the processing requirement may be asynchronous replication and synchronous disk storage, and the service message to be processed may further include a second time requirement corresponding to asynchronous replication;
The message processing module 703 may include:
a second storage sub-module (not shown in fig. 7) that stores the service information in a disk of the main server when receiving the service information to be processed;
a third feedback transmission sub-module (not shown in fig. 7) for transmitting a feedback notification to the terminal after saving the service information in a disk of the main server;
a third forwarding sub-module (not shown in fig. 7) configured to determine a second target time point according to the second time requirement, and send the service information to the slave server at the second target time point, so that the slave server stores the service information in a disk of the slave server when receiving the service information.
As an implementation manner of the embodiment of the present invention, the processing requirement may be asynchronous replication and asynchronous storage, and the service message to be processed may further include a first time requirement corresponding to the asynchronous storage and a second time requirement corresponding to the asynchronous replication.
The message processing module 703 may include:
a fourth feedback sending sub-module (not shown in fig. 7) for sending a feedback notification to the terminal when receiving the service information to be processed;
A fourth forwarding sub-module (not shown in fig. 7) configured to determine a first target time point according to the first time requirement, determine a second time point according to the second time requirement, and send the service information and the time information to the slave server at the second target time point, so that the slave server stores the service information in a disk of the slave server at the first target time point;
wherein the time information comprises the time requirement and/or the first target point in time.
A third storage sub-module (not shown in fig. 7) for storing the service information in a disk of the main server at the first target point in time.
Corresponding to the second service information processing method, the embodiment of the invention also provides a service information processing device. The second service information processing device provided in the embodiment of the present invention is described below.
As shown in fig. 8, a processing device of service information is applied to a terminal in a service processing system, the service processing system further includes a master server and a slave server, a message middleware is deployed in the master server, and the device includes:
A service message generating module 801, configured to generate a service message to be processed for a target service when a processing instruction for the target service is acquired;
the service message to be processed at least comprises service information of the target service and processing requirements, wherein the processing requirements are set on the basis of the attribute of the service information in advance.
And a service message sending module 802, configured to send the service message to be processed to the message middleware, so that the message middleware parses the service message to be processed to obtain the service information and the processing requirement, and control the master server and the slave server to process the service information according to the processing requirement.
In the scheme provided by the embodiment of the invention, the terminal can generate the service message to be processed for the target service when acquiring the processing instruction for the target service, wherein the service message to be processed at least comprises the service information and the processing requirement of the target service, and the processing requirement is set on the basis of the attribute of the service information in advance; and sending the service message to be processed to the message middleware so as to enable the message middleware to analyze the service message to be processed, obtain the service information and the processing requirement, and control the master server and the slave server to process the service information according to the processing requirement. Therefore, the terminal can store the processing requirements of the service information in the service information to be processed, and the message middleware can process the service information according to the processing requirements of the service information, so that the timeliness requirements and the reliability requirements of different types of services on the service information processing can be met.
As shown in fig. 9, as an implementation manner of the embodiment of the present invention, the service message generating module 801 may include:
a service information obtaining sub-module 901, configured to obtain service information of the target service;
a target processing requirement determining sub-module 902, configured to determine a processing requirement of the service information according to an attribute of the service information, as a target processing requirement;
a target field content determining sub-module 903, configured to determine target field content corresponding to a target processing requirement according to a preset correspondence between the processing requirement and the field content;
and the service message generating sub-module 904 is configured to insert the target field content into a preset field of the service message to be processed corresponding to the service information, so as to obtain the service message to be processed for the target service.
Wherein the pending service message includes a plurality of fields.
The embodiment of the present invention also provides a server, as shown in fig. 10, including a processor 1001, a communication interface 1002, a memory 1003, and a communication bus 1004, where the processor 1001, the communication interface 1002, and the memory 1003 complete communication with each other through the communication bus 1004,
a memory 1003 for storing a computer program;
The processor 1001 is configured to implement the first service information processing method steps described in any one of the above embodiments when executing the program stored in the memory 1003.
In the scheme provided by the embodiment of the invention, the message middleware deployed in the main server in the service processing system can acquire the service message to be processed sent by the terminal, wherein the service message to be processed at least comprises service information and processing requirements, and the processing requirements are preset based on the attribute of the service information; analyzing the service message to be processed to obtain service information and processing requirements; and controlling the master server and the slave server to process the service information according to the processing requirements, wherein the processing at least comprises disk storage and copying. Because the service information to be processed sent by the terminal comprises the processing requirements set according to the attribute of the service information, after the message middleware analyzes the service information to be processed to obtain the service information and the processing requirements, the main server and the auxiliary server can be controlled to process the service information according to the processing requirements instead of the same processing modes of all the service information, so that the timeliness requirements and the reliability requirements of different types of services on the service information processing can be met.
The communication bus mentioned by the server may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the server and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
The embodiment of the present invention also provides a terminal, as shown in fig. 11, including a processor 1101, a communication interface 1102, a memory 1103 and a communication bus 1104, where the processor 1101, the communication interface 1102 and the memory 1103 complete communication with each other through the communication bus 1104,
a memory 1103 for storing a computer program;
the processor 1101 is configured to implement the steps of the second service information processing method according to any one of the above embodiments when executing the program stored in the memory 1103.
In the scheme provided by the embodiment of the invention, the terminal can generate the service message to be processed for the target service when acquiring the processing instruction for the target service, wherein the service message to be processed at least comprises the service information and the processing requirement of the target service, and the processing requirement is set on the basis of the attribute of the service information in advance; and sending the service message to be processed to the message middleware so as to enable the message middleware to analyze the service message to be processed, obtain the service information and the processing requirement, and control the master server and the slave server to process the service information according to the processing requirement. Therefore, the terminal can store the processing requirements of the service information in the service information to be processed, and the message middleware can process the service information according to the processing requirements of the service information, but not the processing modes of all the service information are the same, so that the timeliness requirements and the reliability requirements of different types of services on the service information processing can be met.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, where instructions are stored, when the computer readable storage medium runs on a computer, to cause the computer to execute the method for processing the first service information according to any one of the foregoing embodiments.
It can be seen that, in the solution provided in the embodiment of the present invention, when a computer program stored in a computer readable storage medium is executed by a processor, a service message to be processed sent by a terminal may be obtained, where the service message to be processed includes at least service information and a processing requirement, and the processing requirement is set in advance based on an attribute of the service information; analyzing the service message to be processed to obtain service information and processing requirements; and controlling the master server and the slave server to process the service information according to the processing requirements, wherein the processing at least comprises disk storage and copying. Because the service information to be processed sent by the terminal comprises the processing requirements set according to the attribute of the service information, after the message middleware analyzes the service information to be processed to obtain the service information and the processing requirements, the main server and the auxiliary server can be controlled to process the service information according to the processing requirements instead of the same processing modes of all the service information, so that the timeliness requirements and the reliability requirements of different types of services on the service information processing can be met.
In yet another embodiment of the present invention, a computer readable storage medium is provided, where instructions are stored, when the computer readable storage medium runs on a computer, to cause the computer to execute the second service information processing method according to any one of the foregoing embodiments.
It can be seen that, in the solution provided in the embodiment of the present invention, when a computer program stored in a computer readable storage medium is executed by a processor, a to-be-processed service message for a target service may be generated when a processing instruction for the target service is acquired, where the to-be-processed service message includes at least service information and a processing requirement of the target service, and the processing requirement is set in advance based on an attribute of the service information; and sending the service message to be processed to the message middleware so as to enable the message middleware to analyze the service message to be processed, obtain the service information and the processing requirement, and control the master server and the slave server to process the service information according to the processing requirement. Therefore, the terminal can store the processing requirements of the service information in the service information to be processed, and the message middleware can process the service information according to the processing requirements of the service information, but not the processing modes of all the service information are the same, so that the timeliness requirements and the reliability requirements of different types of services on the service information processing can be met.
In yet another embodiment of the present invention, a computer program product containing instructions, which when executed on a computer, causes the computer to perform the method for processing the first service information according to any one of the foregoing embodiments is provided.
In the scheme provided by the embodiment of the invention, when the computer program product containing the instruction runs on a computer, the to-be-processed service message sent by the terminal can be obtained, wherein the to-be-processed service message at least comprises service information and processing requirements, and the processing requirements are preset based on the attribute of the service information; analyzing the service message to be processed to obtain service information and processing requirements; and controlling the master server and the slave server to process the service information according to the processing requirements, wherein the processing at least comprises disk storage and copying. Because the service information to be processed sent by the terminal comprises the processing requirements set according to the attribute of the service information, after the message middleware analyzes the service information to be processed to obtain the service information and the processing requirements, the main server and the auxiliary server can be controlled to process the service information according to the processing requirements instead of the same processing modes of all the service information, so that the timeliness requirements and the reliability requirements of different types of services on the service information processing can be met.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
In yet another embodiment of the present invention, a computer program product containing instructions, which when executed on a computer, causes the computer to perform the method for processing the second service information according to any one of the foregoing embodiments is provided.
It can be seen that, in the solution provided in the embodiment of the present invention, when a computer program product including instructions runs on a computer, a to-be-processed service message for a target service may be generated when a processing instruction for the target service is acquired, where the to-be-processed service message includes at least service information and a processing requirement of the target service, and the processing requirement is set in advance based on an attribute of the service information; and sending the service message to be processed to the message middleware so as to enable the message middleware to analyze the service message to be processed, obtain the service information and the processing requirement, and control the master server and the slave server to process the service information according to the processing requirement. Therefore, the terminal can store the processing requirements of the service information in the service information to be processed, and the message middleware can process the service information according to the processing requirements of the service information, but not the processing modes of all the service information are the same, so that the timeliness requirements and the reliability requirements of different types of services on the service information processing can be met.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (11)

1. A method for processing service information, applied to message middleware deployed in a master server in a service processing system, the service processing system further comprising a slave server and a terminal, the method comprising:
acquiring a service message to be processed sent by a terminal, wherein the service message to be processed at least comprises service information and processing requirements, and the processing requirements are preset based on the attribute of the service information;
analyzing the service message to be processed to obtain the service information and the processing requirement;
according to the processing requirement, controlling the master server and the slave server to process the service information, wherein the processing at least comprises disc storage and copying;
the step of controlling the master server and the slave server to process the service information according to the processing requirement comprises the following steps:
when the processing requirement is synchronous copy and synchronous disk storage, when the service information to be processed is received, storing the service information in a disk of the master server, and sending the service information to the slave server, so that the slave server stores the service information in the disk of the slave server when receiving the service information; after the service information is stored in the disk of the master server and the disk of the slave server, a feedback notice is sent to the terminal;
When the processing requirements are synchronous copy and asynchronous disk storage, determining a first target time point according to a first time requirement when the service information to be processed is received, and sending the service information and the time information to the slave server so that the slave server stores the service information in a disk of the slave server at the first target time point; after the service information and the time information are sent to the slave server, a feedback notice is sent to the terminal; storing the service information in a disk of the main server at the first target time point; the first time requirement is a first time requirement corresponding to an asynchronous save disc included in the service message to be processed, the first time requirement is used for representing that the service information needs to be processed within a preset duration after the service information is received, and the time information comprises the first time requirement and/or the first target time point;
when the processing requirement is asynchronous copy and synchronous disk storage, the service information is stored in a disk of the main server when the service information to be processed is received; after the service information is stored in the disk of the main server, a feedback notice is sent to the terminal; determining a second target time point according to a second time requirement, and transmitting the service information to the slave server at the second target time point so that the slave server stores the service information in a disk of the slave server when receiving the service information; the second time requirement is a second time requirement corresponding to asynchronous replication included in the service message to be processed;
When the processing requirement is asynchronous copy and asynchronous disk storage, sending a feedback notice to a terminal when receiving the service information to be processed; determining a first target time point according to the first time requirement, determining a second time point according to the second time requirement, and transmitting the service information and the time information to the slave server at the second target time point so that the slave server stores the service information in a disk of the slave server at the first target time point; and storing the service information in a disk of the main server at the first target time point.
2. The method of claim 1, wherein the step of parsing the service message to be processed to obtain the service information and the processing requirements comprises:
analyzing the service message to be processed to obtain service information carried by the service message to be processed and field content of a preset field as target field content, wherein the service message to be processed comprises a plurality of fields;
and determining a target processing requirement corresponding to the target field content according to the corresponding relation between the preset field content and the processing requirement, and taking the target processing requirement as the processing requirement of the service information.
3. The method for processing the service information is characterized by being applied to a terminal in a service processing system, wherein the service processing system further comprises a master server and a slave server, and message middleware is deployed in the master server, and the method comprises the following steps:
generating a service message to be processed for a target service when a processing instruction for the target service is acquired, wherein the service message to be processed at least comprises service information and processing requirements of the target service, and the processing requirements are set in advance based on the attribute of the service information;
sending the service message to be processed to the message middleware so that the message middleware analyzes the service message to be processed to obtain the service information and the processing requirement, and controlling the master server and the slave server to process the service information according to the processing requirement;
the message middleware controls the mode of processing the service information by the master server and the slave server according to the processing requirement, and the message middleware comprises:
when the processing requirement is synchronous copy and synchronous disk storage, the message middleware stores the service information in a disk of the master server when receiving the service information to be processed, and sends the service information to the slave server, so that the slave server stores the service information in the disk of the slave server when receiving the service information; after the service information is stored in the disk of the master server and the disk of the slave server, a feedback notice is sent to the terminal;
When the processing requirements are synchronous replication and asynchronous disk storage, the message middleware determines a first target time point according to a first time requirement when receiving the service message to be processed, and sends the service information and the time information to the slave server so that the slave server stores the service information in a disk of the slave server at the first target time point; after the service information and the time information are sent to the slave server, a feedback notice is sent to the terminal; storing the service information in a disk of the main server at the first target time point; the first time requirement is a first time requirement corresponding to an asynchronous save disc included in the service message to be processed, the first time requirement is used for representing that the service information needs to be processed within a preset duration after the service information is received, and the time information comprises the first time requirement and/or the first target time point;
when the processing requirement is asynchronous copy and synchronous disk storage, the message middleware stores the service information in a disk of the main server when receiving the service information to be processed; after the service information is stored in the disk of the main server, a feedback notice is sent to the terminal; determining a second target time point according to a second time requirement, and transmitting the service information to the slave server at the second target time point so that the slave server stores the service information in a disk of the slave server when receiving the service information; the second time requirement is a second time requirement corresponding to asynchronous replication included in the service message to be processed;
When the processing requirement is asynchronous copy and asynchronous disk storage, the message middleware sends a feedback notice to a terminal when receiving the service information to be processed; determining a first target time point according to the first time requirement, determining a second time point according to the second time requirement, and transmitting the service information and the time information to the slave server at the second target time point so that the slave server stores the service information in a disk of the slave server at the first target time point; and storing the service information in a disk of the main server at the first target time point.
4. A method according to claim 3, wherein the step of generating a pending service message for the target service comprises:
acquiring service information of the target service;
determining the processing requirement of the service information according to the attribute of the service information, and taking the processing requirement as a target processing requirement;
determining target field content corresponding to the target processing requirement according to the corresponding relation between the preset processing requirement and the field content;
and inserting the target field content into a preset field of the to-be-processed service message corresponding to the service information to obtain the to-be-processed service message aiming at the target service, wherein the to-be-processed service message comprises a plurality of fields.
5. The service processing system is characterized by comprising a terminal, a master server and a slave server, wherein message middleware is deployed in the master server, and the message middleware comprises a message service module, a message service module and a message service module, wherein:
the terminal is used for generating a service message to be processed aiming at the target service when acquiring a processing instruction aiming at the target service; sending the service message to be processed to the message middleware, wherein the service message to be processed at least comprises service information of the target service and processing requirements, and the processing requirements are preset based on the attribute of the service information;
the message middleware is used for acquiring a service message to be processed sent by the terminal; analyzing the service message to be processed to obtain the service information and the processing requirement; according to the processing requirement, controlling the master server and the slave server to process the service information, wherein the processing at least comprises disc storage and copying;
the message middleware is specifically configured to store, when the to-be-processed service message is received, the service information in a disk of the master server and send the service information to the slave server under the condition that the processing requirement is synchronous copy and synchronous disk storage, so that the slave server stores the service information in the disk of the slave server when receiving the service information; after the service information is stored in the disk of the master server and the disk of the slave server, a feedback notice is sent to the terminal;
When the processing requirements are synchronous copy and asynchronous disk storage, determining a first target time point according to a first time requirement when the service information to be processed is received, and sending the service information and the time information to the slave server so that the slave server stores the service information in a disk of the slave server at the first target time point; after the service information and the time information are sent to the slave server, a feedback notice is sent to the terminal; storing the service information in a disk of the main server at the first target time point; the first time requirement is a first time requirement corresponding to an asynchronous save disc included in the service message to be processed, the first time requirement is used for representing that the service information needs to be processed within a preset duration after the service information is received, and the time information comprises the first time requirement and/or the first target time point;
when the processing requirement is asynchronous copy and synchronous disk storage, the service information is stored in a disk of the main server when the service information to be processed is received; after the service information is stored in the disk of the main server, a feedback notice is sent to the terminal; determining a second target time point according to a second time requirement, and transmitting the service information to the slave server at the second target time point so that the slave server stores the service information in a disk of the slave server when receiving the service information; the second time requirement is a second time requirement corresponding to asynchronous replication included in the service message to be processed;
When the processing requirement is asynchronous copy and asynchronous disk storage, sending a feedback notice to a terminal when receiving the service information to be processed; determining a first target time point according to the first time requirement, determining a second time point according to the second time requirement, and transmitting the service information and the time information to the slave server at the second target time point so that the slave server stores the service information in a disk of the slave server at the first target time point; and storing the service information in a disk of the main server at the first target time point.
6. A service information processing apparatus, applied to message middleware deployed in a master server in a service processing system, the service processing system further comprising a slave server and a terminal, the apparatus comprising:
the system comprises a service message acquisition module, a service message processing module and a service message processing module, wherein the service message acquisition module is used for acquiring a service message to be processed, which is sent by a terminal, wherein the service message to be processed at least comprises service information and processing requirements, and the processing requirements are preset based on the attribute of the service information;
the analysis module is used for analyzing the service message to be processed to obtain the service information and the processing requirement;
The message processing module is used for controlling the master server and the slave server to process the service information according to the processing requirement, wherein the processing at least comprises disk storage and copying;
the message processing module is specifically configured to store the service information in a disk of the master server and send the service information to the slave server when the to-be-processed service message is received under the condition that the processing requirement is synchronous copy and synchronous disk storage, so that the slave server stores the service information in the disk of the slave server when receiving the service information; after the service information is stored in the disk of the master server and the disk of the slave server, a feedback notice is sent to the terminal;
when the processing requirements are synchronous copy and asynchronous disk storage, determining a first target time point according to a first time requirement when the service information to be processed is received, and sending the service information and the time information to the slave server so that the slave server stores the service information in a disk of the slave server at the first target time point; after the service information and the time information are sent to the slave server, a feedback notice is sent to the terminal; storing the service information in a disk of the main server at the first target time point; the first time requirement is a first time requirement corresponding to an asynchronous save disc included in the service message to be processed, the first time requirement is used for representing that the service information needs to be processed within a preset duration after the service information is received, and the time information comprises the first time requirement and/or the first target time point;
When the processing requirement is asynchronous copy and synchronous disk storage, the service information is stored in a disk of the main server when the service information to be processed is received; after the service information is stored in the disk of the main server, a feedback notice is sent to the terminal; determining a second target time point according to a second time requirement, and transmitting the service information to the slave server at the second target time point so that the slave server stores the service information in a disk of the slave server when receiving the service information; the second time requirement is a second time requirement corresponding to asynchronous replication included in the service message to be processed;
when the processing requirement is asynchronous copy and asynchronous disk storage, sending a feedback notice to a terminal when receiving the service information to be processed; determining a first target time point according to the first time requirement, determining a second time point according to the second time requirement, and transmitting the service information and the time information to the slave server at the second target time point so that the slave server stores the service information in a disk of the slave server at the first target time point; and storing the service information in a disk of the main server at the first target time point.
7. A service information processing device, which is applied to a terminal in a service processing system, the service processing system further comprises a master server and a slave server, the master server is provided with message middleware, and the device comprises:
the service message generation module is used for generating a service message to be processed for a target service when a processing instruction for the target service is acquired, wherein the service message to be processed at least comprises service information and processing requirements of the target service, and the processing requirements are set on the basis of the attribute of the service information in advance;
the service message sending module is used for sending the service message to be processed to the message middleware so that the message middleware can analyze the service message to be processed to obtain the service information and the processing requirement, and the master server and the slave server are controlled to process the service information according to the processing requirement;
the message middleware controls the mode of processing the service information by the master server and the slave server according to the processing requirement, and the message middleware comprises:
when the processing requirement is synchronous copy and synchronous disk storage, the message middleware stores the service information in a disk of the master server when receiving the service information to be processed, and sends the service information to the slave server, so that the slave server stores the service information in the disk of the slave server when receiving the service information; after the service information is stored in the disk of the master server and the disk of the slave server, a feedback notice is sent to the terminal;
When the processing requirements are synchronous replication and asynchronous disk storage, the message middleware determines a first target time point according to a first time requirement when receiving the service message to be processed, and sends the service information and the time information to the slave server so that the slave server stores the service information in a disk of the slave server at the first target time point; after the service information and the time information are sent to the slave server, a feedback notice is sent to the terminal; storing the service information in a disk of the main server at the first target time point; the first time requirement is a first time requirement corresponding to an asynchronous save disc included in the service message to be processed, the first time requirement is used for representing that the service information needs to be processed within a preset duration after the service information is received, and the time information comprises the first time requirement and/or the first target time point;
when the processing requirement is asynchronous copy and synchronous disk storage, the message middleware stores the service information in a disk of the main server when receiving the service information to be processed; after the service information is stored in the disk of the main server, a feedback notice is sent to the terminal; determining a second target time point according to a second time requirement, and transmitting the service information to the slave server at the second target time point so that the slave server stores the service information in a disk of the slave server when receiving the service information; the second time requirement is a second time requirement corresponding to asynchronous replication included in the service message to be processed;
When the processing requirement is asynchronous copy and asynchronous disk storage, the message middleware sends a feedback notice to a terminal when receiving the service information to be processed; determining a first target time point according to the first time requirement, determining a second time point according to the second time requirement, and transmitting the service information and the time information to the slave server at the second target time point so that the slave server stores the service information in a disk of the slave server at the first target time point; and storing the service information in a disk of the main server at the first target time point.
8. The server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 or 2 when executing a program stored on a memory.
9. The terminal is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
A memory for storing a computer program;
a processor for implementing the method steps of any one of claims 3 or 4 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1 or 2.
11. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 3 or 4.
CN202010738923.2A 2020-07-28 2020-07-28 Service information processing method, system, device, server and terminal Active CN111880949B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010738923.2A CN111880949B (en) 2020-07-28 2020-07-28 Service information processing method, system, device, server and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010738923.2A CN111880949B (en) 2020-07-28 2020-07-28 Service information processing method, system, device, server and terminal

Publications (2)

Publication Number Publication Date
CN111880949A CN111880949A (en) 2020-11-03
CN111880949B true CN111880949B (en) 2024-03-08

Family

ID=73201876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010738923.2A Active CN111880949B (en) 2020-07-28 2020-07-28 Service information processing method, system, device, server and terminal

Country Status (1)

Country Link
CN (1) CN111880949B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979308B (en) * 2022-05-11 2024-04-16 北京沃东天骏信息技术有限公司 Message processing method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101925882A (en) * 2008-01-23 2010-12-22 欧睦技术公司 Method of improving replica server performance and replica server system
WO2011090599A2 (en) * 2009-12-30 2011-07-28 Sybase, Inc Message based synchronization for mobile business objects
EP2701065A1 (en) * 2012-08-24 2014-02-26 Siemens Aktiengesellschaft Method for operating a redundant automation system
US9319267B1 (en) * 2012-10-04 2016-04-19 Solace Systems, Inc. Replication in assured messaging system
CN109710394A (en) * 2018-12-27 2019-05-03 出门问问信息科技有限公司 Timing task processing system and method
CN110213317A (en) * 2018-07-18 2019-09-06 腾讯科技(深圳)有限公司 The method, apparatus and storage medium of message storage

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9727396B2 (en) * 2010-11-30 2017-08-08 Red Hat, Inc. Message queue deployment
US10009303B2 (en) * 2014-01-10 2018-06-26 Huawei Technologies Co., Ltd. Message push method and apparatus
US10021186B2 (en) * 2014-12-19 2018-07-10 Microsoft Technology Licensing, Llc Guaranteed delivery of replication message

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101925882A (en) * 2008-01-23 2010-12-22 欧睦技术公司 Method of improving replica server performance and replica server system
WO2011090599A2 (en) * 2009-12-30 2011-07-28 Sybase, Inc Message based synchronization for mobile business objects
EP2701065A1 (en) * 2012-08-24 2014-02-26 Siemens Aktiengesellschaft Method for operating a redundant automation system
US9319267B1 (en) * 2012-10-04 2016-04-19 Solace Systems, Inc. Replication in assured messaging system
CN110213317A (en) * 2018-07-18 2019-09-06 腾讯科技(深圳)有限公司 The method, apparatus and storage medium of message storage
CN109710394A (en) * 2018-12-27 2019-05-03 出门问问信息科技有限公司 Timing task processing system and method

Also Published As

Publication number Publication date
CN111880949A (en) 2020-11-03

Similar Documents

Publication Publication Date Title
US20160294886A1 (en) Registration Method and System for Common Service Entity
CN112055078B (en) Data transmission method, device, computer equipment and storage medium
CN111355600B (en) Main node determining method and device
EP3174318B1 (en) Method for realizing resource attribute notification, and common service entity
CN111880949B (en) Service information processing method, system, device, server and terminal
CN111355765B (en) Network request processing and sending method and device
CN115168031A (en) Fog calculation system, method, electronic equipment and storage medium
CN111526185A (en) Data downloading method, device, system and storage medium
CN111082953B (en) Configuration method, device and related equipment
CN114385374A (en) Message processing method and device based on message middleware and storage medium
CN109787789B (en) Compatibility management method, device and equipment for software upgrading and storage medium
CN112583630A (en) Device management method, device, system, device and storage medium
CN114338794B (en) Service message pushing method and device, electronic equipment and storage medium
EP4092961A1 (en) Group updating method, message sending method, and apparatuses
US20170353818A1 (en) Method for deleting notification resource, and common service entity
US10459816B2 (en) Communication setting notification apparatus
US20180219971A1 (en) Service Processing Method and Device
CN109450702A (en) A kind of data processing method and device
CN114979985A (en) Indirect communication message transmission method, system and gateway equipment
CN114298830A (en) Batch service processing method and device and batch service processing platform
CN114567524A (en) Communication system and method based on dynamic gateway
CN107707480B (en) Message forwarding method and device
CN111064609A (en) Master-slave switching method and device of message system, electronic equipment and storage medium
CN110855785B (en) Data processing method and device
CN113992566B (en) Message broadcasting method and device

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