CN117041352A - Message processing method, device, electronic equipment and storage medium - Google Patents

Message processing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117041352A
CN117041352A CN202311072200.3A CN202311072200A CN117041352A CN 117041352 A CN117041352 A CN 117041352A CN 202311072200 A CN202311072200 A CN 202311072200A CN 117041352 A CN117041352 A CN 117041352A
Authority
CN
China
Prior art keywords
service
message
identifier
component
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311072200.3A
Other languages
Chinese (zh)
Inventor
张润
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202311072200.3A priority Critical patent/CN117041352A/en
Publication of CN117041352A publication Critical patent/CN117041352A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a method, a device, electronic equipment and a storage medium for processing a message, and relates to the technical field of computers. One embodiment of the method comprises the following steps: responding to the triggering of the message processing task, acquiring a service identifier corresponding to the message processing task, and extracting a service message set based on the service identifier; inquiring the execution sequence of a processing component corresponding to the service identifier, and acquiring the component identifier associated with each service message in the service message set so as to determine the arrangement sequence of each service message based on the execution sequence; based on the arrangement sequence, the service message is written into the file corresponding to the service identifier. The embodiment can solve the problems that the operation of the data analysis process is complex and the efficiency is low because the data of the business processing is analyzed and the message data is required to be searched from all servers of the cluster.

Description

Message processing method, device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for processing a message, an electronic device, and a storage medium.
Background
With the development of information systems, system clusters for processing each service are generally constructed in a distributed cluster manner, and the distributed cluster manner provides great convenience for high expansion, high performance and high availability of system data processing, and also brings about some problems. In the prior art, a system cluster constructed in a distributed cluster manner includes a plurality of servers, so when a service needing to interact with other clusters is processed, a situation that different servers in the cluster process the same service, namely, message data processed by the same service are stored in different servers, and in this case, if the data processed by the service need to be analyzed, the message data search needs to be performed from all servers in the cluster to acquire all data processed by the service, thereby leading to complex operation and lower efficiency of a data analysis process.
Disclosure of Invention
In view of the above, embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for processing a message, which can solve the problem that the operation of a data analysis process is complex and the efficiency is low because the data of a service process needs to be analyzed and the data of the message needs to be searched from all servers of a cluster.
In order to achieve the above object, according to an aspect of the embodiments of the present application, a method for processing a message is provided.
The method for processing the message comprises the following steps: responding to the triggering of a message processing task, acquiring a service identifier corresponding to the message processing task, and extracting a service message set based on the service identifier, wherein the corresponding relation between the service message and the corresponding service identifier is prestored; inquiring the execution sequence of the processing components corresponding to the service identifiers, and acquiring the component identifiers associated with each service message in the service message set so as to determine the arrangement sequence of each service message based on the execution sequence;
and writing the service message into a file corresponding to the service identifier based on the arrangement sequence.
In one embodiment, writing the service packet into the file corresponding to the service identifier based on the arrangement order includes:
acquiring the task type of the message processing task;
responding to the task type as a first type, and writing the service message into a file corresponding to the service identifier based on the arrangement sequence; and responding to the task type as a second type, acquiring a component identifier in the message processing task to determine a service message corresponding to the component identifier, and inserting the service message corresponding to the component identifier into a file associated with the service identifier based on the execution sequence and the arrangement sequence.
In yet another embodiment, after writing the service packet set into the file associated with the service identifier based on the arrangement order, the method further includes:
calling a preset detection model, and detecting service messages corresponding to the component identifiers based on the arrangement sequence to determine message detection parameters;
and generating a corresponding detection record based on the corresponding component identifier and the service identifier in response to the message detection parameter not meeting a preset condition.
In yet another embodiment, detecting each service packet corresponding to the component identifier based on the arrangement order to determine a packet detection parameter includes:
obtaining the message type of the service message corresponding to each component identifier so as to be matched with a preset type and obtain a matching result;
and determining corresponding message detection parameters based on the matching result.
In yet another embodiment, after the generating the corresponding detection record, the method further includes:
and acquiring a message processing task template to generate a corresponding message processing task based on the detection record.
In yet another embodiment, obtaining the component identifier associated with each service message in the service message set to determine the arrangement sequence of each service message based on the execution sequence includes:
and acquiring the component identifier and the global event number associated with each service message to determine the service messages corresponding to the same global event number, and determining the arrangement sequence of the service messages corresponding to the same global event number by combining the execution sequence.
In yet another embodiment, writing the service packet into the file corresponding to the service identifier based on the arrangement order includes:
inquiring the file associated with the service identifier to be processed;
and responding to the query result as the air conditioner, calling a preset building model to build the file associated with the service identifier to be processed, and writing the service message set into the file associated with the service identifier to be processed based on the arrangement sequence.
In order to achieve the above object, according to another aspect of the embodiments of the present application, there is provided an apparatus for processing a message.
The device for processing the message comprises the following components: the acquisition unit is used for responding to the triggering of the message processing task, acquiring a corresponding service identifier to be processed, and extracting a stored service message set based on the service identifier to be processed, wherein the corresponding relation between the service message and the corresponding service identifier is prestored;
the determining unit is used for inquiring the execution sequence of the processing components corresponding to the service identifiers to be processed so as to determine the arrangement sequence of the service messages by combining the component identifiers corresponding to the service messages in the service message set;
and the writing unit is used for writing the service message set into the file associated with the service identifier to be processed based on the arrangement sequence.
In an embodiment, the determining unit is specifically configured to:
acquiring the task type of the message processing task;
responding to the task type as a first type, and writing the service message into a file corresponding to the service identifier based on the arrangement sequence; and responding to the task type as a second type, acquiring a component identifier in the message processing task to determine a service message corresponding to the component identifier, and inserting the service message corresponding to the component identifier into a file associated with the service identifier based on the execution sequence and the arrangement sequence.
In yet another embodiment, the apparatus further comprises:
the detection unit is used for calling a preset detection model, detecting service messages corresponding to the component identifiers based on the arrangement sequence, and determining message detection parameters;
and the generating unit is used for generating a corresponding detection record based on the corresponding component identifier and the service identifier in response to the message detection parameter not meeting a preset condition.
In a further embodiment, the detection unit is specifically configured to:
obtaining the message type of the service message corresponding to each component identifier so as to be matched with a preset type and obtain a matching result;
and determining corresponding message detection parameters based on the matching result.
In a further embodiment, the generating unit is further configured to:
and acquiring a message processing task template to generate a corresponding message processing task based on the detection record.
In a further embodiment, the determining unit is specifically configured to:
and acquiring the component identifier and the global event number associated with each service message to determine the service messages corresponding to the same global event number, and determining the arrangement sequence of the service messages corresponding to the same global event number by combining the execution sequence.
In a further embodiment, the writing unit is specifically configured to:
inquiring the file associated with the service identifier to be processed;
and responding to the query result as the air conditioner, calling a preset building model to build the file associated with the service identifier to be processed, and writing the service message set into the file associated with the service identifier to be processed based on the arrangement sequence.
To achieve the above object, according to still another aspect of an embodiment of the present application, there is provided an electronic apparatus.
An electronic device according to an embodiment of the present application includes: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the message processing method provided by the embodiment of the application.
To achieve the above object, according to still another aspect of an embodiment of the present application, a computer-readable medium is provided.
The embodiment of the application provides a computer readable medium, on which a computer program is stored, the program when executed by a processor realizes the method for processing a message provided by the embodiment of the application.
To achieve the above object, according to still another aspect of an embodiment of the present application, there is provided a computer program product.
The computer program product of the embodiment of the application comprises a computer program, and the program is executed by a processor to realize the message processing method provided by the embodiment of the application.
One embodiment of the above application has the following advantages or benefits: in the embodiment of the application, after the message processing task is triggered, the corresponding service message set can be extracted from the stored service messages based on the service identification to be processed, and then the service message set is sequenced according to the execution sequence of the processing assembly and then the service-related file is written. In this way, in the embodiment of the application, the server in the cluster can write the service messages processed by each service into the file associated with the service identifier according to the calling sequence of the components through the message processing task, so as to integrate the corresponding messages of each service, thereby directly acquiring all the service data during the data analysis of the service processing, reducing the operation complexity of the data analysis process and improving the processing efficiency.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the application and are not to be construed as unduly limiting the application. Wherein:
FIG. 1 is a schematic diagram of a main flow of a message processing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of yet another main flow of a message processing method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of yet another main flow of a message processing method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of the main units of the apparatus for message processing according to an embodiment of the present application;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present application may be applied;
FIG. 6 is a schematic diagram of a computer system suitable for use in implementing embodiments of the present application.
Detailed Description
Exemplary embodiments of the present application will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present application are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It is noted that embodiments of the application and features of the embodiments may be combined with each other without conflict. The technical scheme of the application obtains, stores, uses, processes and the like the data, which all meet the relevant regulations of national laws and regulations.
The embodiment of the application provides a message processing system which can be used for processing a received message, in particular to a scene for processing a service message of each server in a service processing cluster.
In the embodiment of the application, the service message processing of each server in the cluster can be taken as an example, and each server in the cluster can record the service processing through carrying out service message interaction and processing with other components, so that the service messages corresponding to the same service processing can be stored in different servers. The service processing system can extract service messages from each server in advance through preset message processing tasks, and then sequences the extracted service messages according to the execution sequence of components corresponding to service processing and writes the extracted service messages into corresponding files so as to integrate the messages corresponding to each service, thereby directly acquiring all service data during data analysis of the service processing, reducing the operation complexity of the data analysis process and improving the processing efficiency.
The embodiment of the application provides a message processing method, which can be executed by a message processing system, as shown in fig. 1, and comprises the following steps:
s101: and responding to the triggering of the message processing task, acquiring a service identifier corresponding to the message processing task, and extracting a service message set based on the service identifier.
The message processing task is preset and is used for processing each service message in the cluster. The service identifier indicates an identifier of a service corresponding to the service message, such as a transaction service, a payment service, and the like. In this step, after the message processing task is triggered, a service identifier corresponding to the message processing task, that is, a service identifier for the current message processing, may be specifically obtained from the message processing task, or may be preconfigured. After the service identifier corresponding to the message processing task, the service message set can be extracted based on the service identifier, for example, the service message set corresponding to the service identifier is extracted from each server in the cluster.
In the embodiment of the application, the service messages are usually stored in the service processing process of each server in the cluster, and can comprise various types, such as request messages and response messages. In order to facilitate extraction of service messages, when the server stores each service message, attribute parameters of each service message, such as a corresponding service identifier, an associated component identifier, a message type, and the like, may be stored simultaneously. Because each service process usually needs a plurality of components to cooperate and execute, the attribute parameter of the service message can include the associated component identifier, which indicates that the service message is generated by interaction with that component, and in the service process, a request type message is usually generated between the server and the component, and then a corresponding response message is obtained to complete one interaction, so the attribute can also include the message type. Further, in some scenarios, each transaction may be directed to a different user or event, so the attribute parameters may also include a corresponding user identifier or time identifier, etc., for example, in a transaction message, the attribute parameters may also include a global event number to indicate which transaction in the transaction is being processed.
It should be noted that, in the embodiment of the present application, each server in the cluster may load preset configuration information, which includes an attribute parameter list required to be stored in the service message, and the server may store the service message based on the attribute parameter list in service processing, so that when this step is executed, the service identifier may correspond to a service message set from each server, and the service message set may include each service message and an attribute parameter corresponding to the service message.
In the embodiment of the application, the message processing task can be set to be periodically triggered, so that the service message can be processed periodically.
S102: inquiring the execution sequence of the corresponding processing components of the service identifiers, and acquiring the component identifiers associated with each service message in the service message set so as to determine the arrangement sequence of each service message based on the execution sequence.
The execution sequence of each component required by each service processing can be preconfigured, and a corresponding relation between the service identification and the execution sequence of the component is established, so that the execution sequence of the corresponding processing component of the service identification can be queried in the step, and the extracted service messages are ordered according to the execution sequence of the component by the component identification associated with the service messages.
In the embodiment of the application, the service messages are sequenced through the execution sequence of the components, so that the processing sequence of the service messages can be determined, and further the analysis of the service messages and the positioning processing of the problems can be more convenient.
In the transaction service processing scenario, the global event number of the service message identifies the corresponding transaction service, so that the service message can be distinguished according to the global event number in this step, so that after the execution sequence is queried, the component identifier and the global event number associated with each service message can be obtained in this step, so as to determine the service messages corresponding to the same global event number, and in combination with the execution sequence, determine the arrangement sequence of the service messages corresponding to the same global event number. Because the service messages corresponding to the same global event number represent the service messages corresponding to the same transaction, finer division can be performed based on the global event number in this step.
S103: based on the arrangement sequence, the service message is written into the file corresponding to the service identifier.
In order to facilitate the storage of the service messages, the files corresponding to the service identifiers can be preset, so that after the arrangement sequence of the service messages is determined, the files corresponding to the service identifiers can be written in according to the arrangement sequence. And writing the service message corresponding to each service identifier into a corresponding file, thereby realizing the division of the service messages. The service identification corresponding file may be set based on requirements, and the type may be an XML file.
In the embodiment of the application, before the writing of the service message is executed, the file associated with the service identifier to be processed can be queried; if the query result is not null, indicating that the file associated with the service identifier is established, writing the service message; if the query result is null, and the file associated with the service identifier is not established yet, a preset establishment model can be called to establish the file associated with the service identifier to be processed, and the service message set is written into the file associated with the service identifier to be processed based on the arrangement sequence. The building model is preconfigured, and a program for file building can be set so as to build the file associated with the service identifier to be processed by calling the preset building model.
It should be noted that, in the embodiment of the present application, the files associated with the service identifiers may be respectively established based on time, so as to be used for storing service messages in different times. Meanwhile, in a scene that the service messages are divided by global event numbers, files associated with the global event numbers can be established so as to store the service messages corresponding to the global event numbers.
In the embodiment of the present application, the message processing task may include two types, namely a first type and a second type. The first type represents that service messages of all components corresponding to the service identifiers are extracted from the server and written into corresponding files; the second type represents re-extraction and writing of the service message after the abnormality of the message detection in the file, and at this time, the second type of message processing task may include the component identifier and the service identifier of the message to be extracted at this time. So this step can be specifically performed as: acquiring a task type of a message processing task; responding to the task type as the first type, and writing the service message into a file corresponding to the service identifier based on the arrangement sequence; and responding to the task type as the second type, acquiring the component identifier in the message processing task to determine the service message corresponding to the component identifier, and inserting the service message corresponding to the component identifier into the file associated with the service identifier based on the execution sequence and the arrangement sequence.
If the message processing task is of the first type, writing the service message corresponding to the service identifier into an associated file; if the message processing task is of the second type, it is indicated that the corresponding service message is already stored in the service identifier association file, and the processing is a reprocessing of the service message, so that the service message corresponding to the component identifier extracted at the time can be inserted into the service identifier association file.
In the embodiment of the application, the server in the cluster can write the service messages processed by each service into the file associated with the service identifier according to the calling sequence of the components through the message processing task, so that the integration of the corresponding messages of each service is realized, and all the service data can be directly acquired during the data analysis of the service processing, thereby reducing the operation complexity of the data analysis process and improving the processing efficiency.
The method for processing the message after step S103 in the embodiment of the present application is specifically described below with reference to the embodiment shown in fig. 1, and as shown in fig. 2, the method includes:
s201: and calling a preset detection model, and detecting service messages corresponding to the component identifiers based on the arrangement sequence to determine message detection parameters.
The detection model is preconfigured and is used for detecting the service messages in the file. The detection parameters identify the result of the service message detection.
In the embodiment of the application, the detection can be performed from the aspect of service message integrity so as to ensure the service message integrity before service message molecules.
For example, since each service processing association component is preconfigured, service messages corresponding to each component exist in the complete service processing process. Therefore, in this step, after determining the component identifier corresponding to the service identifier, it may be detected by judging whether the file includes the service message corresponding to each component identifier, so this step may be executed to call a preset detection model, and detect the service message corresponding to each component identifier based on the arrangement sequence, so as to determine the message detection parameter. The detection parameters in this scenario may include whether the service message corresponding to each component gemstone exists.
For another example, for each component, the type of the service message needs to include a request type and a response type to represent the integrity of the service processing process, so that in this step, the message type of the service message corresponding to the component identifier can also be detected, that is, the message type of the service message corresponding to each component identifier is obtained, so as to be matched with the preset type, and a matching result is obtained; and determining corresponding message detection parameters based on the matching result. The preset type comprises a request type and a response type, and the matching result comprises matching success and matching unsuccessful. The successful matching indicates that the type of the service message corresponding to the component identifier is the same as the preset type, and the unsuccessful matching indicates that the type of the service message corresponding to the component identifier is different from the preset type. The message detection parameters in this scenario may include a matching result of each component identifier corresponding to the service message.
S202: and generating a corresponding detection record based on the corresponding component identifier and the service identifier in response to the message detection parameter not meeting the preset condition.
The preset price adjustment can be set based on the scene and the requirement, for example, the file can comprise service messages corresponding to the identifiers of the components, and/or the message types of the service messages corresponding to the components are successfully matched with the preset types. When the message detection parameters are determined not to meet the preset conditions, it is indicated that the service message cannot meet the preset requirements, so that the component identifiers which do not meet the preset conditions can be determined from the message detection parameters at the moment, and then corresponding detection records are generated for prompting or warning.
In the embodiment of the application, after the detection record is generated, a corresponding message processing task can be generated so as to facilitate the extraction of the service message from the server again, thereby avoiding the detection problem. The method specifically can be executed to obtain a message processing task template to generate a corresponding message processing task based on the detection record, and at this time, the task type of the message processing task can be set as a second type to be distinguished from the first type of the message processing task.
It should be noted that, in the embodiment of the present application, the data processing principle is the same as that of the embodiment shown in fig. 1, and will not be described herein.
The method for processing a message in the embodiment of the present application is specifically described below with reference to the embodiment shown in fig. 1, and as shown in fig. 3, the method includes:
s301: and responding to the triggering of the message processing task, acquiring a service identifier in the message processing task, and extracting a service message set based on the service identifier.
S302: the query service identification corresponds to the execution order of the processing components.
S303: and acquiring the component identifier associated with each service message in the service message set so as to determine the arrangement sequence of each service message based on the execution sequence.
S304: and acquiring the task type of the message processing task.
S305: and responding to the task type as the first type, and writing the service message into a file corresponding to the service identifier based on the arrangement sequence.
S306: and responding to the task type as the second type, acquiring the component identifier in the message processing task to determine the service message corresponding to the component identifier, and inserting the service message corresponding to the component identifier into the file associated with the service identifier based on the execution sequence and the arrangement sequence.
It should be noted that, in the embodiment of the present application, the data processing principle is the same as that of the embodiment shown in fig. 1 and fig. 2, and will not be described herein.
In order to solve the problems in the prior art, an embodiment of the present application provides a device 400 for processing a message, as shown in fig. 4, the device 400 includes:
an obtaining unit 401, configured to obtain a corresponding service identifier to be processed in response to the triggering of the message processing task, and extract a stored service message set based on the service identifier to be processed;
a determining unit 402, configured to query an execution sequence of the processing component corresponding to the service identifier to be processed, so as to determine an arrangement sequence of each service packet in combination with the component identifier corresponding to each service packet in the service packet set;
and a writing unit 403, configured to write the service packet set into the file associated with the service identifier to be processed based on the arrangement order.
It should be understood that the manner of implementing the embodiment of the present application is the same as that of implementing the embodiment shown in fig. 1, and will not be described herein.
In one embodiment, the determining unit 402 is specifically configured to:
acquiring the task type of the message processing task;
responding to the task type as a first type, and writing the service message into a file corresponding to the service identifier based on the arrangement sequence; and responding to the task type as a second type, acquiring a component identifier in the message processing task to determine a service message corresponding to the component identifier, and inserting the service message corresponding to the component identifier into a file associated with the service identifier based on the execution sequence and the arrangement sequence.
In yet another embodiment, the apparatus 400 further comprises:
the detection unit is used for calling a preset detection model, detecting service messages corresponding to the component identifiers based on the arrangement sequence, and determining message detection parameters;
and the generating unit is used for generating a corresponding detection record based on the corresponding component identifier and the service identifier in response to the message detection parameter not meeting a preset condition.
In a further embodiment, the detection unit is specifically configured to:
obtaining the message type of the service message corresponding to each component identifier so as to be matched with a preset type and obtain a matching result;
and determining corresponding message detection parameters based on the matching result.
In a further embodiment, the generating unit is further configured to:
and acquiring a message processing task template to generate a corresponding message processing task based on the detection record.
In yet another embodiment, the determining unit 402 is specifically configured to:
and acquiring the component identifier and the global event number associated with each service message to determine the service messages corresponding to the same global event number, and determining the arrangement sequence of the service messages corresponding to the same global event number by combining the execution sequence.
In yet another embodiment, the writing unit 403 is specifically configured to:
inquiring the file associated with the service identifier to be processed;
and responding to the query result as the air conditioner, calling a preset building model to build the file associated with the service identifier to be processed, and writing the service message set into the file associated with the service identifier to be processed based on the arrangement sequence.
It should be understood that the manner of implementing the embodiments of the present application is the same as that of implementing the embodiments shown in fig. 1, 2 and 3, and will not be described herein.
In the embodiment of the application, the server in the cluster can write the service messages processed by each service into the file associated with the service identifier according to the calling sequence of the components through the message processing task, so that the integration of the corresponding messages of each service is realized, and all the service data can be directly acquired during the data analysis of the service processing, thereby reducing the operation complexity of the data analysis process and improving the processing efficiency.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
The electronic equipment of the embodiment of the application comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by one processor, and the instructions are executed by at least one processor, so that the at least one processor performs the method for processing the message provided by the embodiment of the application.
Fig. 5 illustrates an exemplary system architecture 500 of a message processing method or a message processing apparatus to which embodiments of the present application may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 is used as a medium to provide communication links between the terminal devices 501, 502, 503 and the server 505. The network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 505 via the network 504 using the terminal devices 501, 502, 503 to receive or send messages or the like. Various client applications may be installed on the terminal devices 501, 502, 503.
The terminal devices 501, 502, 503 may be, but are not limited to, smartphones, tablets, laptop and desktop computers, and the like.
The server 505 may be a server providing various services, and may perform processing such as analysis on received data such as a product information query request, and feed back processing results (e.g., product information—merely by way of example) to the terminal device.
It should be noted that, the method for processing a message provided in the embodiment of the present application is generally executed by the server 505, and accordingly, the device for processing a message is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, there is illustrated a schematic diagram of a computer system 600 suitable for use in implementing embodiments of the present application. The computer system shown in fig. 6 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the present application are performed when the computer program is executed by a Central Processing Unit (CPU) 601.
The computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented in software or in hardware. The described units may also be provided in a processor, for example, described as: a processor includes an acquisition unit, a determination unit, and a writing unit. The names of these units do not constitute a limitation on the unit itself in some cases, and the acquisition unit may also be described as "a unit that identifies an acquisition function", for example.
As another aspect, the present application also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform the method of message processing provided by the present application.
As another aspect, the present application further provides a computer program product, including a computer program, where the program when executed by a processor implements a method for processing a message provided by an embodiment of the present application.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.

Claims (15)

1. A method for processing a message, comprising:
responding to the triggering of a message processing task, acquiring a service identifier corresponding to the message processing task, and extracting a service message set based on the service identifier, wherein the corresponding relation between the service message and the corresponding service identifier is prestored;
inquiring the execution sequence of the processing components corresponding to the service identifiers, and acquiring the component identifiers associated with each service message in the service message set so as to determine the arrangement sequence of each service message based on the execution sequence;
and writing the service message into a file corresponding to the service identifier based on the arrangement sequence.
2. The method of claim 1, wherein writing the service message to the file corresponding to the service identifier based on the ranking order comprises:
acquiring the task type of the message processing task;
responding to the task type as a first type, and writing the service message into a file corresponding to the service identifier based on the arrangement sequence; and responding to the task type as a second type, acquiring a component identifier in the message processing task to determine a service message corresponding to the component identifier, and inserting the service message corresponding to the component identifier into a file associated with the service identifier based on the execution sequence and the arrangement sequence.
3. The method of claim 1, further comprising, after writing the set of service messages to the file associated with the service identity based on the ranking order:
calling a preset detection model, and detecting service messages corresponding to the component identifiers based on the arrangement sequence to determine message detection parameters;
and generating a corresponding detection record based on the corresponding component identifier and the service identifier in response to the message detection parameter not meeting a preset condition.
4. A method according to claim 3, wherein detecting each of the component identifiers corresponding to a service message based on the ranking order to determine a message detection parameter comprises:
obtaining the message type of the service message corresponding to each component identifier so as to be matched with a preset type and obtain a matching result;
and determining corresponding message detection parameters based on the matching result.
5. The method of claim 3, further comprising, after the generating the corresponding detection record:
and acquiring a message processing task template to generate a corresponding message processing task based on the detection record.
6. The method of claim 1, wherein obtaining the component identifier associated with each service message in the service message set to determine the arrangement order of each service message based on the execution order comprises:
and acquiring the component identifier and the global event number associated with each service message to determine the service messages corresponding to the same global event number, and determining the arrangement sequence of the service messages corresponding to the same global event number by combining the execution sequence.
7. The method of claim 1, wherein writing the service message to the file corresponding to the service identifier based on the ranking order comprises:
inquiring the file associated with the service identifier to be processed;
and responding to the query result as the air conditioner, calling a preset building model to build the file associated with the service identifier to be processed, and writing the service message set into the file associated with the service identifier to be processed based on the arrangement sequence.
8. A message processing apparatus, comprising:
the acquisition unit is used for responding to the triggering of the message processing task, acquiring a corresponding service identifier to be processed, and extracting a stored service message set based on the service identifier to be processed, wherein the corresponding relation between the service message and the corresponding service identifier is prestored;
the determining unit is used for inquiring the execution sequence of the processing components corresponding to the service identifiers to be processed so as to determine the arrangement sequence of the service messages by combining the component identifiers corresponding to the service messages in the service message set;
and the writing unit is used for writing the service message set into the file associated with the service identifier to be processed based on the arrangement sequence.
9. The apparatus according to claim 8, wherein the determining unit is specifically configured to:
acquiring the task type of the message processing task;
responding to the task type as a first type, and writing the service message into a file corresponding to the service identifier based on the arrangement sequence; and responding to the task type as a second type, acquiring a component identifier in the message processing task to determine a service message corresponding to the component identifier, and inserting the service message corresponding to the component identifier into a file associated with the service identifier based on the execution sequence and the arrangement sequence.
10. The apparatus of claim 8, wherein the apparatus further comprises:
the detection unit is used for calling a preset detection model, detecting service messages corresponding to the component identifiers based on the arrangement sequence, and determining message detection parameters;
and the generating unit is used for generating a corresponding detection record based on the corresponding component identifier and the service identifier in response to the message detection parameter not meeting a preset condition.
11. The device according to claim 10, characterized in that the detection unit is specifically configured to:
obtaining the message type of the service message corresponding to each component identifier so as to be matched with a preset type and obtain a matching result;
and determining corresponding message detection parameters based on the matching result.
12. The apparatus of claim 10, wherein the generating unit is further configured to:
and acquiring a message processing task template to generate a corresponding message processing task based on the detection record.
13. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
14. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
15. A computer program product comprising a computer program, characterized in that the program, when executed by a processor, implements the method according to any of claims 1-7.
CN202311072200.3A 2023-08-24 2023-08-24 Message processing method, device, electronic equipment and storage medium Pending CN117041352A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311072200.3A CN117041352A (en) 2023-08-24 2023-08-24 Message processing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311072200.3A CN117041352A (en) 2023-08-24 2023-08-24 Message processing method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117041352A true CN117041352A (en) 2023-11-10

Family

ID=88629834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311072200.3A Pending CN117041352A (en) 2023-08-24 2023-08-24 Message processing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117041352A (en)

Similar Documents

Publication Publication Date Title
CN110708346B (en) Information processing system and method
CN105787077B (en) Data synchronization method and device
CN110262807B (en) Cluster creation progress log acquisition system, method and device
CN107302597B (en) Message file pushing method and device
CN111737270A (en) Data processing method and system, computer system and computer readable medium
CN111221793A (en) Data mining method, platform, computer equipment and storage medium
CN109828830B (en) Method and apparatus for managing containers
CN109218338B (en) Information processing system, method and device
CN114281663A (en) Test processing method, test processing device, electronic equipment and storage medium
CN116737662A (en) Method, device, electronic equipment and storage medium for processing business data
CN108933802B (en) Method and apparatus for monitoring operation
CN117041352A (en) Message processing method, device, electronic equipment and storage medium
CN113590447B (en) Buried point processing method and device
CN115658127A (en) Data processing method and device, electronic equipment and storage medium
CN113986995A (en) Request distribution method and device, storage medium and electronic equipment
CN111290873B (en) Fault processing method and device
CN110020906B (en) Order information detection method and device
CN117333170A (en) Service processing method, device, electronic equipment and storage medium
CN112668194B (en) Automatic driving scene library information display method, device and equipment based on page
CN112579553B (en) Method and apparatus for recording information
CN116010126B (en) Service aggregation method, device and system
CN113094268B (en) Test method, test device, test equipment and test medium
CN116258556A (en) Method, device, electronic equipment and storage medium for processing business data
CN108536362B (en) Method and device for identifying operation and server
CN117082149A (en) Transaction processing method, device, electronic equipment and computer readable medium

Legal Events

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