Business processing method and device, electronic equipment and medium

Through unified and standardized traceID and session information recording logs, the application efficiency problem caused by different log formats in multi-microservice systems is solved, efficient application and troubleshooting of logs is achieved, and the stability and adaptability of the system are improved.

CN119003272APending Publication Date: 2024-11-22SHENZHEN SNOWBALL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410994102.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In multi-micro service systems, the log formats of each microservice are different, resulting in low efficiency in later log applications and difficult to uniformly check and locate problems.

Method used

By generating unified and standardized traceID and session information, recording execution logs and preprocessing logs, using JSON format, realizing log classification and reorganization, supporting http protocol, and using monitoring system and intelligent troubleshooting module for abnormal alarms and log analysis.

Benefits of technology

It improves the adaptability, stability and expansion of logs, simplifies the application and troubleshooting process of logs, and realizes the connection and positioning of various microservice logs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003272A_ABST
    Figure CN119003272A_ABST
Patent Text Reader

Abstract

The invention provides a service processing method and device, electronic equipment and a medium. The method comprises the following steps: receiving a current processing request for a target service sent by a user terminal through an upstream server; generating first traceID information corresponding to the current step number; searching and executing the subprogram file corresponding to the current step number to obtain execution information; the subprogram file is a program file executed by at least one micro-service module; the execution information comprises a logic processing result executed by each micro-service module, first traceID information, session information and a service name executed by each micro-service module; if the current step number is the last step number, after the current step number is set as an end identifier EOF, new execution information is sent to the user terminal through the upstream server; and generating an execution log corresponding to the new execution information. According to the method, the logs have good adaptability, stability and expansibility through unified and normative log information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a business processing method, device, electronic device and medium. Background Art

[0002] In recent years, almost every Internet company has multiple systems, and each system may be composed of multiple microservices. Each microservice provides different capabilities and performs its own duties, thereby completing a series of functions.

[0003] In order to facilitate the troubleshooting and location of program problems in each microservice, each microservice often needs to print the log of the service runtime (such as the scheduled task log of the microservice, the request and response log of upstream and downstream microservices, and the log of its own problem processing operations, etc.).

[0004] Because each microservice has different responsibilities and needs to complete different functions, the log formats printed by each microservice are often different, which affects the application of subsequent logs. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a business processing method, device, electronic device and medium, which are used to improve the application efficiency of subsequent logs through unified and standardized log information.

[0006] In a first aspect, a business processing method is provided, which is applied to a service platform in a business processing system, wherein the business processing system further includes an upstream service end and a user terminal. The method may include:

[0007] Receiving a current processing request for a target service sent by a user terminal through an upstream server; the current processing request includes a current step number for processing the target service and pre-generated session control session information;

[0008] Generate the first traceID information corresponding to the current step number;

[0009] In the stored program execution file corresponding to the target business, the subprogram file corresponding to the current step number is searched and executed to obtain execution information; the program execution file includes subprogram files corresponding to different step numbers in the execution order; the subprogram file is a program file executed by at least one microservice module; the execution information includes the logical processing result executed by each microservice module, the first traceID information, the session information, and the service name executed by each microservice module;

[0010] If the current step number is the last step number in the program execution file, the current step number in the execution information is set as the end mark EOF, and the new execution information is sent to the user terminal through the upstream server;

[0011] At the same time, an execution log corresponding to the new execution information is generated.

[0012] In one possible implementation, the method further includes:

[0013] If the current step number is not the last step number in the program execution file, then after adding 1 to the current step number, the execution information containing the new step number is sent to the upstream server, so that the upstream server sends the interface information corresponding to the execution information to the user terminal, until the step number after the current step number is added by 1 becomes the last step number in the program execution file, and the execution step is returned: if the current step number is the last step number in the program execution file, then after setting the current step number to the end mark EOF, the execution information containing EOF is sent to the upstream server.

[0014] In a possible implementation, before receiving a current processing request for a target service sent by a user terminal through an upstream server, the method further includes:

[0015] Receiving a service request for a target service sent by a user terminal through an upstream service end; the service request includes a current step number and a service type for initiating the target service;

[0016] Generate second traceID information corresponding to the current step number, and process session information of the target service;

[0017] Preprocess the service request to obtain preprocessing information; the preprocessing information includes the second traceID information, session information, preprocessing execution result and corresponding service name;

[0018] Afterwards, the corresponding business step information is matched based on the business type;

[0019] If the current step number is not the last step number, determining the next step number based on the current step number;

[0020] The new preprocessing information including the next step number is sent to the user terminal through the upstream server; at the same time, a preprocessing log corresponding to the new preprocessing information is generated, and then the steps are performed: receiving the current processing request for the target business sent by the user terminal through the upstream server.

[0021] In one possible implementation, the method further includes:

[0022] If the current step number is the last step number in the business step information of the target business, the current step number in the preprocessing information is set to the end mark EOF, and the new preprocessing information containing EOF is sent to the user terminal through the upstream server. At the same time, a preprocessing log corresponding to the new preprocessing information is generated.

[0023] In a possible implementation, the execution log and the preprocessing log are both generated in JSON format;

[0024] The log structure of the execution log and the preprocessing log includes a log generation time field, a traceID field, a session field, a current service name currService field, a previous service name upperService field, a next requested service name nextService field, a next step number next_step field, a current step number current_step field and a log content field.

[0025] In one possible implementation, the method further includes:

[0026] If the http protocol is supported between the user terminal and the upstream server, the log structure includes the request field and the response field, the log generation time field, the current service name currService field, the previous service name upperService field, the next request service name nextService field and the log content field;

[0027] Among them, the request field includes the current_step field and the session field; the response field includes the next_step field and the session field.

[0028] In a possible implementation, the business processing system further includes a monitoring system and an intelligent troubleshooting module; and the method further includes:

[0029] Classifying and reorganizing the execution log and the preprocessing log to obtain classified and reorganized logs;

[0030] Among them, for the classified logs, the monitoring system is used to collect statistics based on the log information of the classified logs; if the amount of information of the statistical abnormal log information reaches a preset threshold, the statistical abnormal log information is used to issue an abnormal alarm through the alarm system;

[0031] For the reorganized logs, the intelligent troubleshooting module is used to analyze the log information of the reorganized logs, obtain log analysis information of each log, and respond to the user with the log analysis information corresponding to the log in the received work order troubleshooting request.

[0032] In a second aspect, a business processing device is provided, which is applied to a service platform in a business processing system, wherein the business processing system further includes an upstream service end and a user terminal. The device may include:

[0033] A receiving unit, configured to receive a current processing request for a target service sent by a user terminal through an upstream server; the current processing request includes a current step number for processing the target service and pre-generated session control session information;

[0034] A generating unit, used to generate first traceID information corresponding to the current step number;

[0035] A search unit is used to search and execute the subprogram file corresponding to the current step number in the stored program execution file corresponding to the target business to obtain execution information; the program execution file includes subprogram files corresponding to different step numbers in the execution sequence; the subprogram file is a program file executed by at least one microservice module; the execution information includes the logical processing result executed by each microservice module, the first traceID information, the session information, and the service name executed by each microservice module;

[0036] A setting unit, configured to set the current step number in the execution information as an end mark EOF if the current step number is the last step number in the program execution file;

[0037] The generating unit is further configured to send the new execution information to the user terminal through the upstream server; and generate an execution log corresponding to the new execution information.

[0038] In a third aspect, an electronic device is provided, the electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0039] Memory, used to store computer programs;

[0040] The processor is used to implement any method step described in the first aspect when executing the program stored in the memory.

[0041] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0042] The business processing method provided by the present application receives the current processing request for the target business sent by the user terminal through the upstream service end; the current processing request includes the current step number of the target business and the pre-generated session control session information; the first traceID information corresponding to the current step number is generated; in the program execution file corresponding to the stored target business, the subroutine file corresponding to the current step number is searched and executed to obtain the execution information; the program execution file includes subroutine files corresponding to different step numbers in the order of execution; the subroutine file is a program file executed by at least one microservice module; the execution information includes the logical processing results executed by each microservice module, the first traceID information, the session information, and the service name executed by each microservice module; if the current step number is the last step number in the program execution file, the current step number in the execution information is set to the end mark EOF, and the new execution information is sent to the user terminal through the upstream service end; the execution log corresponding to the new execution information is generated. The method makes the log have better adaptability, stability and extensibility through unified and standardized log information, and improves the application efficiency of the later log. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 A schematic diagram of the structure of a business processing system provided in an embodiment of the present application;

[0045] Figure 2 A flowchart of a business processing method provided in an embodiment of the present application;

[0046] Figure 3 A schematic diagram of the structure of a service processing device provided in an embodiment of the present application;

[0047] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application. Unless otherwise defined, the technical terms or scientific terms used in this application should be the common meanings understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in this application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "including" and other similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connected", "coupled" or "connected" and other similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0049] The service processing method provided in the embodiment of the present application can be applied to Figure 1 In the business processing system architecture shown in FIG. Figure 1 As shown, the business processing system may include: a service platform, an upstream service end and a user terminal, wherein the service platform may include an entry service module for executing an entry service and at least one microservice module (or "downstream microservice") for executing a corresponding microservice. The upstream service end may be a terminal server to which the user terminal is connected. The service platform is communicatively connected to the upstream service end, and the entry service module is communicatively connected to at least one microservice module.

[0050] Furthermore, the business processing system may also include a monitoring system and an intelligent troubleshooting module.

[0051] The monitoring system is used to collect statistics based on the log information of the classified logs; if the amount of information of the statistical abnormal log information reaches a preset threshold, the statistical abnormal log information will be used to issue an abnormal alarm through the alarm system.

[0052] The intelligent troubleshooting module is used to analyze the log information of the reorganized logs, obtain the log analysis information of each log, and respond to the user with the log analysis information corresponding to the log in the received work order troubleshooting request.

[0053] The business processing method provided by this application has the following specific advantages:

[0054] (1) Good scalability: When you want to expand the printed content of the log, you only need to add fields in the JSON format.

[0055] (2) Good adaptability: A set of automatic troubleshooting service code can be adapted to the logs of multiple microservices.

[0056] (3) Good stability: Unified and standardized logs can help us obtain the desired information stably (avoiding frequent changes in logs, which may result in the previous method being able to obtain log information normally, but the logic of the service code also needs to be changed after the log changes).

[0057] (4) The logs of the upper and lower microservices of each system are well correlated: because the trace and session fields as well as the currService, upperServic, and nextServic fields are defined, and each service prints this information, the logs of each microservice are connected in series, so that the logs of the downstream microservices can be directly located from the logs of the upstream microservice.

[0058] (5) When the upstream system does not know how many times it needs to interact with the downstream system to complete a business transaction, the defined next_step and current_step can solve the problem well.

[0059] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.

[0060] Figure 2 A flowchart of a business processing method provided in an embodiment of the present application. Figure 2 As shown, the method may include:

[0061] Step S20: The user terminal sends a current processing request (or "interface request") for the target service to the upstream server.

[0062] The current processing request may include a current step number current_step for processing the target service and pre-generated session control session information.

[0063] Step S21: The upstream server sends the current processing request to the service platform.

[0064] Specifically, the upstream server sends the current processing request to the entry service module in the service platform.

[0065] Step S22: After the service platform generates the first traceID information corresponding to the current step number, it searches for and executes the subprogram file corresponding to the current step number in the stored program execution file corresponding to the target business to obtain execution information.

[0066] Among them, the program execution file may include subprogram files corresponding to different step numbers in the execution order; the subprogram file is a program file executed by at least one microservice module. Since the microservices of different microservice modules are different, the executed program files are also different. The execution information may include the logical processing results executed by each microservice module, the first traceID information, session information, and the service name executed by each microservice module;

[0067] Specifically, after the entry service module in the service platform generates the first traceID information corresponding to the current step number, it searches for and executes the subprogram file corresponding to the current step number in the program execution file corresponding to the stored target business, and sends a service execution request to at least one microservice module in the service platform. The service execution request may include the executable subprogram file, session information and the first traceID information of the corresponding microservice module found. The corresponding microservice module executes the corresponding subprogram file, and then the corresponding microservice module sends the corresponding response information to the entry service module, which includes the logical processing result of the corresponding microservice module, session information, the first traceID information and the service name of the corresponding microservice module.

[0068] Step S23: Based on the current step number, the service platform sends new execution information including the new step number to the user terminal through the upstream server, and generates an execution log corresponding to the new execution information.

[0069] Specifically, if the current step number is the last step number in the program execution file, the current step number in the execution information is set to the end mark EOF, and the new execution information is sent to the user terminal through the upstream server; at the same time, an execution log corresponding to the new execution information is generated.

[0070] If the current step number is not the last step number in the program execution file, the current step number is increased by 1, and the execution information containing the new step number is sent to the upstream server, so that the upstream server sends the interface information corresponding to the execution information to the user terminal, and generates an execution log corresponding to the new execution information.

[0071] Until the current step number is increased by 1 and the step number is the last step number in the program execution file, return to the execution step: if the current step number is the last step number in the program execution file, the current step number is set to the end mark EOF, and the execution information containing EOF is sent to the upstream server.

[0072] Among them, the execution log may include the first traceID information, session information, the set current step number, the service name executed by each microservice module, and the logical processing result executed by the corresponding microservice module.

[0073] In some embodiments, before step S20, service preprocessing needs to be performed in the user terminal to create preliminary preparations for the target service, such as generating session information for processing the target service, including:

[0074] Step 1: The user terminal sends a service request for the target service to the upstream server.

[0075] The service request may include a current step number for initiating a target service and a service type.

[0076] Step 2: The upstream server sends the service request to the service platform.

[0077] Step 3: After the service platform generates the second traceID information corresponding to the current step number and the session information of the target service, it pre-processes the service request to obtain pre-processing information.

[0078] The preprocessing information may include the second traceID information, session information, the preprocessing execution results executed by each microservice module, and the service name executed by the corresponding microservice module.

[0079] Specifically, after the entry service module in the service platform generates the second traceID information (traceID of the preprocessing stage) corresponding to the current step number and the session information of processing the target business, it sends a preprocessing request for the business request to at least one microservice module in the service platform. The preprocessing request may include the preprocessing service executable by the corresponding microservice module found. After that, the corresponding microservice module sends the corresponding response information to the entry service module, which includes the preprocessing execution result of the corresponding microservice module, session information, the second traceID information and the service name of the corresponding microservice module.

[0080] Step 4: Based on the current step number, the service platform sends the preprocessing information to the user terminal through the upstream server, and generates a preprocessing log corresponding to the preprocessing information.

[0081] The entry service module in the service platform matches the corresponding business step information based on the business type;

[0082] If the current step number is the last step number in the business step information of the target business, it means that the business is completed as long as the business initialization interface is completed. Then, after setting the current step number in the preprocessing information to the end mark EOF, the new preprocessing information containing EOF is sent to the user terminal through the upstream server. At the same time, a preprocessing log corresponding to the new preprocessing information is generated, and then the process ends. The new preprocessing information includes EOF, preprocessing execution results, session information, the second traceID information, and the service name of the corresponding microservice module. At this time, the preprocessing log may include the second traceID information, session information, EOF, preprocessing execution results, and the service name of the corresponding microservice module.

[0083] If the current step number is not the last step number in the business steps of the target business, the next step number is determined based on the current step number. For example, if the current step number current_step=0 and the current step number is not the last step number, the next step number next_step=1;

[0084] The new preprocessing information including the next step number is sent to the user terminal through the upstream server. The new preprocessing information includes the next step number, the preprocessing execution result, the session information, the second traceID information and the service name of the corresponding microservice module. At the same time, a preprocessing log corresponding to the new preprocessing information is generated. After that, step S20 is executed.

[0085] Among them, the preprocessing log may include the second traceID information, session information, the next step number, the preprocessing execution result and the service name of the corresponding microservice module.

[0086] In an example, taking the target business of querying a payment order as an example, the business initialization steps include:

[0087] (1) The user clicks a button to initiate a business request of the "Query Payment Order" business type

[0088] (2) The upstream server receives the user's service request, carrying the service type that the user wants to perform (that is, the service type of querying payment orders) and the current pre-processing number current_step=0 to request the entry service of the service platform;

[0089] (3) The entry service module generates traceID and session information, and caches the session information. In addition, it matches the corresponding business steps according to the business type passed in by the user (that is, how many steps the entry service module needs to interact with the upstream server to query the business type: querying the payment order only requires 0 steps);

[0090] (4) Carry traceID and session information to make a request to the downstream microservice module;

[0091] (5) The downstream microservice module returns relevant processing information after performing logical processing;

[0092] (6) Because the step of this service type has been determined to be step 0 in step (3), which means that the service is completed as long as the service initialization interface is completed, the program determines that the service is completed, so next_step = EOF;

[0093] (7) The downstream microservice module responds to the upstream server through the entry service module

[0094] (8) When the upstream server receives next_step=EOF, it knows that the service is completed and returns a request response to the user terminal.

[0095] It should be noted that steps S20 to S23 do not exist in the target business of querying payment orders.

[0096] In another example, taking the target service of opening a Beijing bus card as an example, the service initialization steps include:

[0097] (1) The user clicks a button to initiate a service request of the "activate card" service type;

[0098] (2) The upstream server receives the user's service request, which carries the service type that the user wants to perform (that is, the service type for card activation) and current_step=0 to request the entry service module;

[0099] (3) The entry service module generates traceID and session information, and caches the session information. In addition, it matches the corresponding business steps according to the business type passed in by the user (that is, how many steps the business entry service module and the upstream server need to interact, and the business type is queried: the card opening business requires 5 steps), and binds the generated session and the user's business complete steps, which require 5 steps to complete, and caches them.

[0100] (4) Carry traceID and session information to make a request to the downstream microservice module;

[0101] (5) The downstream microservice module returns relevant processing information after performing logical processing;

[0102] (6) Because it has been determined in step (3) that the number of steps for this business type is 5, there are still 5 steps to go. Therefore, the program determines that the business is not completed at this time, so next_step = 1 at this time, and records that the user needs to complete step 1 next time (assuming that it is recorded in field B in database A);

[0103] (7) The entry service module performs an interface response;

[0104] (8) After receiving next_step=1, the upstream server detects that the service has not been completed, so after returning it to the user device, a subsequent request is required;

[0105] The cycle step (refer to steps S20-S23) includes:

[0106] (9) The device sends a request;

[0107] (10) The upstream server sends an interface request to the entry service module with current_step and session information;

[0108] (11) The entry service module regenerates a new traceID and verifies the current_step field passed in by the user with the B field in database A cached in step (6) to see if it conforms to the current step sequence;

[0109] (12) Request the downstream microservice with the latest traceID and session information;

[0110] (13) Downstream microservices perform logical processing and response;

[0111] (14) The entry service module makes a program judgment. Because it has not yet reached step 5, it increases next_step by 1, and next_step is 2. It also records that the user needs to complete step 2 next time (assuming that it is recorded in field B in database A);

[0112] (15) Then respond to the upstream server;

[0113] (16) The upstream server responds to the user device;

[0114] (17) Repeat steps (9) to (16) until the value of next_step is accumulated to 6. Since 6>5, the business is completed and next_step is recorded as EOF.

[0115] (18) Then respond to the upstream server. After receiving EOF, the upstream server knows that the service is over and responds to the user device, it terminates the subsequent request and the service is completed.

[0116] In some embodiments, the execution log and the pre-processing log may both be generated in JSON format;

[0117] The log structure of the execution log and preprocessing log may include the log generation time field, traceID field, session field, current service name currService field, previous service name upperService field, next requested service name nextService field, next step number next_step field, current step number current_step field and log content field.

[0118] Among them, the current service name currService, the previous service name upperService, and the next requested service name nextService are three adjacent different services to be executed when the user terminal initiates a service request (such as a current processing request or a processing trigger request). That is, the execution order of the three microservice modules can be obtained according to the order in which these three different services are executed (current service name, previous service name, next requested service name).

[0119] The current step number current_step and the next step number next_step respectively represent the current service request initiated by the user terminal and the next service request of the current service request.

[0120] Furthermore, if the http protocol is supported between the user terminal and the upstream server, the log structure includes the request field and the response field, the log generation time field, the current service name currService field, the previous service name upperService field, the next request service name nextService field and the log content field;

[0121] Among them, the request field includes the current_step field and the session field; the response field includes the next_step field and the session field.

[0122] In a specific example, if the http protocol is supported between the user terminal and the upstream server, the log structure information may be as shown in Table 1.

[0123] Table 1

[0124]

[0125]

[0126] In some embodiments, both the execution log and the pre-processing log may be classified and reorganized to obtain a classified and reorganized log;

[0127] For the classified logs, the monitoring system can collect statistics based on the log information of the classified logs; if the amount of abnormal log information collected by statistics reaches a preset threshold, the abnormal log information collected by statistics will be used as an abnormal alarm through the alarm system;

[0128] For the reorganized logs, the intelligent troubleshooting module can analyze the log information of the reorganized logs to obtain log analysis information of each log, and respond to the user with the log analysis information corresponding to the log in the received work order troubleshooting request.

[0129] In some embodiments, the system may further include a log center and a log cleaning module;

[0130] The generated execution logs and preprocessing logs can be stored in the log center. Kafka is used to automatically and continuously extract the logs in the log center and send them to the log cleaning module through the log buffer queue. The log cleaning module is used to analyze, classify and reorganize the extracted logs.

[0131] In some embodiments, an aging mechanism can be set for the logs stored in the log center, and the log center can periodically identify its own space utilization; when the space utilization reaches a preset alarm value, the stored logs are aged according to the extraction frequency of different log categories, or the storage space of the log center is expanded.

[0132] The aging process for the stored logs according to the extraction frequencies of different log categories may include: performing aging process on the logs corresponding to the log categories with lower extraction frequencies in a historical time period adjacent to the current moment.

[0133] The preset alarm value may be determined based on a weighted average of the maximum space utilization of the log center and the space utilization at multiple preset time points. The multiple preset time points may be any time points within the historical time period.

[0134] The log center can detect in real time whether the load of the buffer queue has reached the preset abnormal threshold; if the load of the buffer queue has reached the preset abnormal threshold, the log center generates log information including the preprocessing event start message and sends it to the log cleaning module. When performing preprocessing operations on the log of its buffer queue, if it is detected that the load of the buffer queue has not reached the preset abnormal threshold, log information including the preprocessing event end message is generated and sent to the log cleaning module. Among them, the preprocessing event start message includes the preprocessing start time message and the preprocessing strategy message. The preprocessing event end message includes the preprocessing end time message and the preprocessing strategy message.

[0135] Corresponding to the above method, the embodiment of the present application also provides a service processing device, such as Figure 3 As shown, the device comprises:

[0136] The receiving unit 310 is used to receive a current processing request for a target service sent by a user terminal through an upstream server; the current processing request includes a current step number for processing the target service and pre-generated session control session information;

[0137] A generating unit 320, configured to generate first traceID information corresponding to the current step number;

[0138] The search unit 330 is used to search and execute the subprogram file corresponding to the current step number in the stored program execution file corresponding to the target business to obtain execution information; the program execution file includes subprogram files corresponding to different step numbers in the execution sequence; the subprogram file is a program file executed by at least one microservice module; the execution information includes the logical processing result executed by each microservice module, the first traceID information, the session information, and the service name executed by each microservice module;

[0139] A setting unit 340, configured to set the current step number in the execution information as an end mark EOF if the current step number is the last step number in the program execution file;

[0140] The generating unit 320 is further configured to send the new execution information to the user terminal through the upstream server; and generate an execution log corresponding to the new execution information.

[0141] The functions of each functional unit of the business processing device provided in the above embodiments of the present application can be implemented through the above method steps. Therefore, the specific working process and beneficial effects of each unit in the business processing device provided in the embodiments of the present application are not repeated here.

[0142] The present application also provides an electronic device, such as Figure 4 As shown, it includes a processor 410 , a communication interface 420 , a memory 430 and a communication bus 440 , wherein the processor 410 , the communication interface 420 , and the memory 430 communicate with each other via the communication bus 440 .

[0143] Memory 430, for storing computer programs;

[0144] The processor 410 is used to execute the program stored in the memory 430 to implement the following steps:

[0145] Receiving a current processing request for a target service sent by a user terminal through an upstream server; the current processing request includes a current step number for processing the target service and pre-generated session control session information;

[0146] Generate the first traceID information corresponding to the current step number;

[0147] In the stored program execution file corresponding to the target business, the subprogram file corresponding to the current step number is searched and executed to obtain execution information; the program execution file includes subprogram files corresponding to different step numbers in the execution order; the subprogram file is a program file executed by at least one microservice module; the execution information includes the logical processing result executed by each microservice module, the first traceID information, the session information, and the service name executed by each microservice module;

[0148] If the current step number is the last step number in the program execution file, the current step number in the execution information is set as the end mark EOF, and the new execution information is sent to the user terminal through the upstream server;

[0149] At the same time, an execution log corresponding to the new execution information is generated.

[0150] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0151] The communication interface is used for communication between the above electronic device and other devices.

[0152] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0153] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0154] The implementation methods and beneficial effects of the components of the electronic device in the above embodiments to solve the problems can be seen in Figure 2 The various steps in the illustrated embodiment are implemented, therefore, the specific working process and beneficial effects of the electronic device provided by the embodiment of the present application are not repeated here.

[0155] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer executes the business processing method described in any one of the above embodiments.

[0156] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the business processing methods described in the above embodiments.

[0157] Those skilled in the art will appreciate that the embodiments in the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt a complete hardware embodiment, a complete software embodiment, or a form of an embodiment combining software and hardware. Moreover, the present application may adopt a form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0158] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0159] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0161] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.

[0162] Obviously, those skilled in the art can make various changes and modifications to the embodiments in the present application without departing from the spirit and scope of the embodiments in the present application. Thus, if these modifications and variations of the embodiments in the present application fall within the scope of the claims and their equivalents in the embodiments of the present application, the embodiments of the present application are also intended to include these modifications and variations.

Claims

1. A business processing method, It is characterized in that A service platform applied to a business processing system, wherein the business processing system further comprises an upstream service end and a user terminal, and the method comprises: Receiving a current processing request for a target service sent by a user terminal through an upstream server; the current processing request includes a current step number for processing the target service and pre-generated session control session information; Generate the first traceID information corresponding to the current step number; In the stored program execution file corresponding to the target business, the subprogram file corresponding to the current step number is searched and executed to obtain execution information; the program execution file includes subprogram files corresponding to different step numbers in the execution order; the subprogram file is a program file executed by at least one microservice module; the execution information includes the logical processing result executed by each microservice module, the first traceID information, the session information, and the service name executed by each microservice module; If the current step number is the last step number in the program execution file, the current step number in the execution information is set as the end mark EOF, and the new execution information is sent to the user terminal through the upstream server; At the same time, an execution log corresponding to the new execution information is generated.

2. The method according to claim 1, It is characterized in that The method further comprises: If the current step number is not the last step number in the program execution file, then after adding 1 to the current step number, the execution information containing the new step number is sent to the upstream server, so that the upstream server sends the interface information corresponding to the execution information to the user terminal, until the step number after the current step number is added by 1 becomes the last step number in the program execution file, and the execution step is returned: if the current step number is the last step number in the program execution file, then after setting the current step number to the end mark EOF, the execution information containing EOF is sent to the upstream server.

3. The method according to claim 2, It is characterized in that Before receiving a current processing request for a target service sent by a user terminal through an upstream server, the method further includes: Receiving a service request for a target service sent by a user terminal through an upstream service end; the service request includes a current step number and a service type for initiating the target service; Generate second traceID information corresponding to the current step number, and process session information of the target service; Preprocess the service request to obtain preprocessing information; the preprocessing information includes the second traceID information, session information, preprocessing execution result and corresponding service name; Afterwards, the corresponding business step information is matched based on the business type; If the current step number is not the last step number, determining the next step number based on the current step number; The new preprocessing information including the next step number is sent to the user terminal through the upstream server; at the same time, a preprocessing log corresponding to the new preprocessing information is generated, and then the steps are performed: receiving the current processing request for the target business sent by the user terminal through the upstream server.

4. The method according to claim 3, It is characterized in that The method further comprises: If the current step number is the last step number in the business step information of the target business, the current step number in the preprocessing information is set to the end mark EOF, and the new preprocessing information containing EOF is sent to the user terminal through the upstream server. At the same time, a preprocessing log corresponding to the new preprocessing information is generated.

5. The method according to claim 3, It is characterized in that The execution log and the preprocessing log are both generated in JSON format; The log structure of the execution log and the preprocessing log includes a log generation time field, a traceID field, a session field, a current service name currService field, a previous service name upperService field, a next requested service name nextService field, a next step number next_step field, a current step number current_step field and a log content field.

6. The method according to claim 5, It is characterized in that The method further comprises: If the http protocol is supported between the user terminal and the upstream server, the log structure includes the request field and the response field, the log generation time field, the current service name currService field, the previous service name upperService field, the next request service name nextService field and the log content field; Among them, the request field includes the current_step field and the session field; the response field includes the next_step field and the session field.

7. The method according to claim 6, It is characterized in that The business processing system also includes a monitoring system and an intelligent troubleshooting module; the method also includes: Classifying and reorganizing the execution log and the preprocessing log to obtain classified and reorganized logs; Among them, for the classified logs, the monitoring system is used to collect statistics based on the log information of the classified logs; if the amount of information of the statistical abnormal log information reaches a preset threshold, the statistical abnormal log information is used to issue an abnormal alarm through the alarm system; For the reorganized logs, the intelligent troubleshooting module is used to analyze the log information of the reorganized logs, obtain log analysis information of each log, and respond to the user with the log analysis information corresponding to the log in the received work order troubleshooting request.

8. A business processing device, It is characterized in that A service platform applied to a business processing system, wherein the business processing system further comprises an upstream service end and a user terminal, and the device comprises: A receiving unit, configured to receive a current processing request for a target service sent by a user terminal through an upstream server; the current processing request includes a current step number for processing the target service and pre-generated session control session information; A generating unit, used to generate first traceID information corresponding to the current step number; A search unit is used to search and execute the subprogram file corresponding to the current step number in the stored program execution file corresponding to the target business to obtain execution information; the program execution file includes subprogram files corresponding to different step numbers in the execution sequence; the subprogram file is a program file executed by at least one microservice module; the execution information includes the logical processing result executed by each microservice module, the first traceID information, the session information, and the service name executed by each microservice module; A setting unit, configured to set the current step number in the execution information as an end mark EOF if the current step number is the last step number in the program execution file; The generating unit is further configured to send the new execution information to the user terminal through the upstream server; and generate an execution log corresponding to the new execution information.

9. An electronic device, It is characterized in that The electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-7 when executing a program stored in a memory.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.