A method for business processing and related devices
By creating and managing information reporting objects in the application's business process, the problem of cumbersome information summary in application problem investigation is solved, and the effect of quickly locate error information and saving developers' time is achieved.
Patent Information
- Application Number
- CN201910714830.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-31
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2040-01-02
AI Technical Summary
When an application has problems on a mobile terminal, developers need to summarize and troubleshoot a large amount of user information, resulting in wasting time and energy.
Create an information reporting object at the beginning of the application's business process, and add information to be reported in the business process until the business process is completed, and then send the information reporting object to the server.
This enables the server to summarize information from a complete business process as a dimension, which facilitates application developers to locate error information and saves time and energy.
Smart Images

Figure CN112308501B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technologies, and in particular, to a method and apparatus for business processing. Background Art
[0002] In recent years, with the rapid development of mobile Internet technologies, the functions of mobile terminals such as mobile phones and tablet computers have become increasingly rich, and the types and quantities of third-party application programs installed by users on mobile terminals have also been increasing. Generally, application developers will perform data embedding in the application program to collect information, which is used to record corresponding information during the operation of the application program and report it to the server, facilitating the application developers to analyze the reported information on the server side.
[0003] When a problem occurs in the application program, application developers often need to aggregate all the information uploaded by users, and then check and analyze it one by one among all the aggregated information to locate the error information. Since the aggregated information is numerous and complex, application developers often need to spend a lot of time and effort on information checking and analysis. Summary of the Invention
[0004] Embodiments of this application provide a method and related apparatus for business processing. By creating an information reporting object at the start of the business process of the application program, and adding the information to be reported during the business process to the information reporting object, and then sending the information reporting object containing the information to be reported in the entire business process to the server after the business process ends, the server side can obtain the information aggregated in terms of the complete business process, which is beneficial for the server side to classify and process the information, facilitating the application developers to locate the error information and saving the time and effort of the application developers.
[0005] The first aspect of the embodiments of this application provides a method for business processing, including:
[0006] Obtain a business start instruction;
[0007] Create an information reporting object according to the business start instruction;
[0008] During the business process, if an information reporting instruction is obtained, add the information to be reported corresponding to the information reporting instruction to the information reporting object;
[0009] If a business end instruction is obtained, send the information reporting object to the server so that the server classifies and processes the information reporting object. The information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the information in the same business.
[0010] The second aspect of the embodiments of this application provides a method for business processing, including:
[0011] Receive an information reporting object sent by a mobile terminal. The information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the same service;
[0012] Classify the information reporting object according to the type of the service to which the information reporting object belongs.
[0013] A third aspect of the embodiments of the present application provides a service processing device, including:
[0014] An obtaining unit, configured to obtain a service start instruction;
[0015] A creating unit, configured to create an information reporting object according to the service start instruction;
[0016] An adding unit, configured to, during the service process, if an information reporting instruction is obtained, add the information to be reported corresponding to the information reporting instruction to the information reporting object;
[0017] A sending unit, configured to, if a service end instruction is obtained, send the information reporting object to the server, so that the server classifies the information reporting object. The information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the same service.
[0018] In a possible design, in an implementation manner of the third aspect of the embodiments of the present application, a determining unit is further included;
[0019] The obtaining unit is further configured to obtain a first timestamp of a first sub-information to be reported in the information to be reported;
[0020] The obtaining unit is further configured to obtain a second timestamp of a second sub-information to be reported in the information to be reported, where the second sub-information to be reported is the next information adjacent to the first sub-information to be reported;
[0021] The determining unit is configured to determine a service interval duration according to the first timestamp and the second timestamp;
[0022] The sending unit is further configured to, if a service end instruction is obtained, send the information reporting object and the service interval duration to the server.
[0023] In a possible design, in an implementation manner of the third aspect of the embodiments of the present application, a marking unit is further included;
[0024] The marking unit is configured to, if a service end instruction is obtained, mark the information reporting object as a to-be-reported state;
[0025] The sending unit is further configured to, if it is detected that the state of the information reporting object is the to-be-reported state, send the information reporting object to the server.
[0026] In a possible design, in an implementation manner of the third aspect of the embodiments of the present application,
[0027] An obtaining unit, configured to obtain the creation duration of an information reporting object;
[0028] A sending unit, further configured to, if the creation duration is greater than a preset time threshold, send the information reporting object to a server.
[0029] In a possible design, in an implementation manner of the third aspect of the embodiments of the present application,
[0030] An adding unit, further configured to, if it is detected that there is an exception in the service corresponding to the information reporting object, add service exception information to the information reporting object;
[0031] A sending unit, further configured to send the information reporting object added with the service exception information to a server.
[0032] The embodiments of the fourth aspect of the present application provide a service processing apparatus, including:
[0033] A receiving unit, configured to receive an information reporting object sent by a mobile terminal, where the information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the information in the same service;
[0034] A processing unit, configured to classify the information reporting object according to the type of the service to which the information reporting object belongs.
[0035] The embodiments of the fifth aspect of the present application provide a terminal device, including: a memory, a transceiver, a processor, and a bus system;
[0036] Wherein, the memory is used to store a program;
[0037] The processor is configured to execute the program in the memory, including the following steps:
[0038] Obtain a service start instruction;
[0039] According to the service start instruction, create an information reporting object;
[0040] During the process of the service, if an information reporting instruction is obtained, add the information to be reported corresponding to the information reporting instruction to the information reporting object;
[0041] If a service end instruction is obtained, send the information reporting object to a server, so that the server classifies the information reporting object. The information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the information in the same service;
[0042] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
[0043] A sixth aspect of the embodiments of the present application provides a server, including: a memory, a transceiver, a processor, and a bus system;
[0044] Wherein, the memory is used to store programs;
[0045] The processor is used to execute the programs in the memory, including the following steps:
[0046] Receive an information reporting object sent by a mobile terminal, where the information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the information in the same service;
[0047] Classify the information reporting object according to the type of the service to which the information reporting object belongs;
[0048] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
[0049] A seventh aspect of the embodiments of the present application provides a computer-readable storage medium, in which instructions are stored, and when it runs on a computer, it enables the computer to execute the method in any of the above aspects.
[0050] An eighth aspect of the embodiments of the present application provides a computer program product containing instructions, and when it runs on a computer or a processor, it enables the computer or the processor to execute the method in any of the above aspects.
[0051] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0052] The embodiments of the present application provide a method for business processing and related devices. By creating an information reporting object at the beginning of the business process of the application program, and adding the information to be reported during the business process to the information reporting object, and then sending the information reporting object containing the information to be reported in the entire business process to the server after the business process ends, so that the server side can obtain the information summarized in the dimension of the complete business process, which is beneficial to the server side to classify the information, facilitates the application developer to locate the error information, and saves the time and effort of the application developer. Description of the Drawings
[0053] Figure 1 It is a schematic diagram of an architecture of a business processing system in an embodiment of the present application;
[0054] Figure 2 It is an example diagram of a method for business processing provided by an embodiment of the present application;
[0055] Figure 3 An example diagram of the service processing method provided by the embodiment of the present application;
[0056] Figure 4 An example diagram of a service processing flow provided by the embodiment of the present application;
[0057] Figure 5 An example diagram of the structure of an information reporting object provided by the embodiment of the present application;
[0058] Figure 6 An example diagram of an information reporting object uploaded to the server provided by the embodiment of the present application;
[0059] Figure 7 An example diagram of a method for service processing provided by the embodiment of the present application;
[0060] Figure 8 A schematic diagram of an embodiment of a service processing device provided in the embodiment of the present application;
[0061] Figure 9 A schematic diagram of an embodiment of a service processing device provided in the embodiment of the present application;
[0062] Figure 10 A schematic diagram of an embodiment of a service processing device provided in the embodiment of the present application;
[0063] Figure 11 A schematic diagram of an embodiment of a service processing device provided in the embodiment of the present application;
[0064] Figure 12 The block diagram shows a partial structure of a mobile phone related to the mobile terminal provided by the embodiment of the present application;
[0065] Figure 13 A schematic diagram of a server structure provided by the embodiment of the present application. Detailed implementation manners
[0066] The embodiment of the present application provides a method for service processing and related devices, which are used to send information summarized in terms of a complete service process to the server, facilitating the server side to classify and process the information, helping application developers locate error information, and saving the time and effort of application developers.
[0067] In the description and claims of this application, and in the above-mentioned drawings, the terms "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "corresponding to" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0068] Generally, during the development of an application, in order to obtain some running information of the application during the user's use of the application, the developer of the application often buries points in the application to collect the corresponding running information of the application, and then the application reports these running information to the server, so that the developer can know the running situation of the application by viewing or analyzing the running information of the application on the server.
[0069] Currently, the application usually reports information to the server according to the user's operation behavior (such as button clicks, page displays, page closures, etc.), that is, after the user operates the application, the application immediately reports the current corresponding running information to the server. In this way, during the running process of the application, the server will successively receive the information reported by the application. After a certain period of time, a large amount of information reported by the application will be saved on the server, and there is no correlation between these information. Therefore, after the application has a problem, the developer of the application often needs to check and analyze one by one among the large amount of reported information saved on the server to locate the error information. Since the summarized information is numerous and complex, the application developer often needs to spend a lot of time and effort to check and analyze the reported information.
[0070] In view of this, the embodiments of this application propose a method for business processing. By creating an information reporting object at the beginning of the business process of the application, and adding the information to be reported during the business process to the information reporting object, and then sending the information reporting object containing the information to be reported in the entire business process to the server after the business process ends, so that the server side can obtain the information summarized in the dimension of the complete business process, which is beneficial to the server side to classify and process the information, facilitates the application developer to locate the error information, and saves the time and effort of the application developer.
[0071] It can be understood that an embodiment of the present application proposes a method for business processing, which is applied to Figure 1 the business processing system shown in Figure 1 , Figure 1 As shown in the figure, it is a schematic architecture diagram of the business processing system in an embodiment of the present application. As shown in the figure, the user interacts with the terminal, and the terminal is connected to the server through the network. An application program (such as WeChat, QQ, etc.) is deployed on the terminal.
[0072] Specifically, during the process of running the application program on the terminal, when the application program starts a business (such as the red envelope grabbing business, red envelope sending business, etc. in WeChat), the application program creates an information reporting object corresponding to the business, and then during the process of the business, records the information corresponding to some steps in the business and adds it to the information reporting object; after the business ends, the information reporting object corresponding to the business is sent to the server. Since the information reporting object stored in the server contains the information corresponding to the entire business process, when the developer of the application program needs to locate the problem of the application program, he can quickly obtain the information reporting object related to the error of the application program according to the business type corresponding to the information reporting object, and then locate the specific error information in the information reporting object, which is convenient for the application developer to locate the error information and saves the time and effort of the application developer.
[0073] Among them, Figure 1 the terminal shown in
[0074] is only a simple illustration. In actual applications, the terminal includes but is not limited to terminal devices such as mobile phones, tablet computers, desktop computers, laptop computers, and handheld computers. Figure 2 , Figure 2 is an example diagram of a method for business processing provided by an embodiment of the present application.
[0075] An embodiment of a method for business processing provided by an embodiment of the present application includes:
[0076] 201. Obtain a business start instruction;
[0077] It can be understood that during the running process of an application, the application can carry out various services. For example, in the WeChat application, services such as red envelope grabbing, red envelope sending, or posting on Moments can be carried out. Similarly, in the QQ application, services such as red envelope grabbing and sending, and uploading emoticons can be carried out. For these services in the application, there is a start and an end process, representing the start and end of the service respectively. For example, for the red envelope grabbing service, receiving a red envelope message on the application of the terminal represents the start of the red envelope grabbing service. After the red envelope grabbing is completed, displaying the result of the red envelope grabbing on the interface of the terminal application represents the end of the red envelope grabbing service. In other words, when the terminal receives a red envelope message, it can be considered that the terminal receives a start instruction for the red envelope grabbing service. When the terminal obtains an instruction to display the result of the red envelope grabbing on the interface of the application, it can be considered that the terminal obtains an end instruction for the red envelope grabbing service. Another example is for the service of posting on Moments. When the terminal obtains a posting on Moments instruction triggered by the user clicking the "Post on Moments" button on the application interface, it represents the start of the service of posting on Moments. When the user finishes editing the content of the Moments and sends the content of the Moments to the server through the terminal, it represents the end of the service of posting on Moments.
[0078] Obviously, during the running process of an application, for any service that the application can carry out, the terminal can obtain a start instruction for that service. The ways for the terminal to obtain a service start instruction can include but are not limited to receiving a certain message sent by the server, obtaining a certain instruction triggered by the user, a certain instruction triggered by the application itself, etc., and no specific limitation is made here.
[0079] 202. Create an information reporting object according to the service start instruction;
[0080] In this embodiment, after the terminal obtains a service start instruction, it can create an information reporting object corresponding to the service start instruction according to the service start instruction. That is to say, the information reporting object has an association relationship with the service corresponding to the service start instruction. For example, after the terminal obtains a start instruction for the red envelope grabbing service, it creates an information reporting object having an association relationship with the red envelope grabbing service. This information reporting object is used to represent the information to be reported during the red envelope grabbing service. Among them, the association relationship between the information reporting object and its corresponding service can be defined when creating the information reporting object.
[0081] Specifically, the information reporting object can be a data structure, and each information reporting object contains the information to be reported in a complete business process (for example, all the information to be reported in the entire payment process from initiating payment to completing payment). When creating an information reporting object according to the business start instruction, the information reporting object can be predefined, such as defining the business, client, user information, etc. corresponding to the information reporting object, and then encapsulating the information to be reported generated during the business process.
[0082] 203. During the business process, if an information reporting instruction is obtained, the information to be reported corresponding to the information reporting instruction is added to the information reporting object;
[0083] It can be understood that after the terminal obtains the business start instruction, that is, during the business process, if the terminal obtains an information reporting instruction triggered by the application program (when the application program runs to some key steps, it will trigger an information reporting instruction), at this time, the information to be reported corresponding to the information reporting instruction can be added to the information reporting object. For example, in the red envelope snatching business, after the user clicks the red envelope snatching button, the application program can trigger an information reporting instruction corresponding to "click the red envelope snatching button", so that the terminal can add the information to be reported corresponding to the information reporting instruction to the information reporting object.
[0084] Among them, the information reporting instruction triggered by the application program can specifically be used to indicate the content of the information to be reported, that is, the terminal can obtain the corresponding information to be reported according to the indication of the information reporting instruction; the information to be reported can specifically include the name of the specific step in the business (that is, the specific step in the business process when the application program triggers the information reporting instruction), relevant information of the business, error code, error reason, timestamp and other information.
[0085] It should be noted that during the business process, the terminal can obtain one or more information reporting instructions, that is, the terminal can add one or more information to be reported in the information reporting object. The information to be reported finally included in the information reporting object is determined according to the information reporting instructions triggered during the business process. The number of information to be reported included in the information reporting objects corresponding to different businesses is different, and this embodiment does not specifically limit the number of information to be reported in the information reporting object.
[0086] For example, for the red envelope snatching service, the red envelope snatching service may specifically include the following six steps: the terminal receives a red envelope message, the terminal displays the red envelope on the interface, the user clicks the red envelope snatching button, the terminal sends a red envelope snatching request to the server, the terminal obtains the red envelope snatching result returned by the server, and the terminal displays the red envelope snatching result on the interface; thus, for each of the above steps, corresponding information to be reported can be added to the information reporting object, that is, there are six pieces of information to be reported in the information reporting object.
[0087] For the service of posting on the Moments, the service of posting on the Moments may specifically include the following seven steps: the user clicks the button to post on the Moments, the terminal displays the interface for posting on the Moments, the user edits the text to be posted, the user selects the picture to be posted, the terminal sends the Moments to be posted to the server, the terminal receives the posting result returned by the server, and the terminal displays the posting effect of the Moments on the Moments interface; thus, for each of the above steps, corresponding information to be reported can be added to the information reporting object, that is, there are seven pieces of information to be reported in the information reporting object.
[0088] 204. If a service end instruction is obtained, send the information reporting object to the server so that the server can classify and process the information reporting object. The information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the information in the same service.
[0089] In this embodiment, if the terminal obtains a service end instruction, it means that no new information to be reported needs to be added to the information reporting object. At this time, the information reporting object can be sent to the server, so that the server can classify and process the information reporting object according to the service type corresponding to the information reporting object and time information (such as the time when the information reporting object is created or the time when the information reporting object is sent to the server), etc. For example, for the application programs on the same terminal, the information reporting objects sent by the application programs to the server may include the information reporting object representing the red envelope snatching service, the information reporting object for sending red envelopes, or the information reporting object for posting on the Moments, etc. And for the same service type, there may also be multiple corresponding information reporting objects. For example, the information reporting object corresponding to the red envelope snatching service initiated at 8:00 in the morning, the information reporting object corresponding to the red envelope snatching service initiated at 10:00 in the evening, etc.
[0090] Since each information reporting object has a corresponding service type, the server can classify different information reporting objects according to the service type, that is, classify the information reporting objects belonging to the same service type together. In addition, the server can also classify the information reporting objects according to the time information. For example, classify the information reporting objects sent to the server on the same day together. In this way, when the developer of the application wants to locate the error information in the information to be reported, he only needs to follow the information reporting objects classified by the server to quickly locate the specific error information. For example, on a certain day, an error occurred during the payment service of the application. Then, the developer of the application can quickly obtain the corresponding information reporting object in the server according to the date when the application error occurred and the payment service. Since the information reporting object contains the information to be reported in the entire payment process, the developer can quickly locate the error information in the information to be reported contained in the information reporting object, saving a lot of time and effort.
[0091] In this embodiment, by creating an information reporting object at the beginning of the service process of the application, and adding the information to be reported during the service process to the information reporting object, and then sending the information reporting object containing the information to be reported in the entire service process to the server after the service process ends, the server side can obtain the information summarized in the dimension of the complete service process, which is beneficial to the server side to classify the information, facilitates the application developer to locate the error information, and saves the time and effort of the application developer.
[0092] For the sake of easy understanding, the service processing method provided in the embodiment of the present application will be described in detail below with specific examples. Please refer to Figure 3 , Figure 3 which is an example diagram of the service processing method provided in the embodiment of the present application.
[0093] As Figure 3 shown, taking the red envelope grabbing as an application scenario for example:
[0094] Among them, S1 represents the specific process of the red envelope grabbing service, S2 represents the information reporting object; S3 represents the server;
[0095] 1. S11 indicates that the terminal receives the red envelope message sent by the server. Accordingly, the red envelope grabbing service start instruction is triggered, instructing the terminal to create an information reporting object, and obtain the basic information of the information reporting object according to the red envelope grabbing service, and then add the corresponding information to be reported S21 in the information reporting object, wherein the information to be reported S21 specifically includes: the title of the information reporting object (grab red envelope), red envelope type, red envelope title, red envelope ID, error code (for example, the code for an error in parsing the red envelope message, if an error occurs, the code is 1; if successful, the code is 0, and the same applies below), timestamp, application version number, user ID, network type (WIFI or mobile data, etc.) and other general information.
[0096] 2. S12 indicates that the terminal displays the red envelope on the application interface according to the red envelope message, and when the red envelope is successfully displayed or displayed in error, the corresponding message S22 to be reported is added to the information reporting object, wherein the information S22 to be reported specifically includes: the name of the business step (displaying red envelope), red envelope skin ID, error code, error cause, timestamp and other information.
[0097] 3. S13 indicates that the terminal obtains the red envelope grabbing instruction triggered by the user clicking the grab red envelope button on the interface, and then adds the corresponding information to be reported S23 in the information reporting object, wherein the information to be reported S23 specifically includes: the name of the business step (click the grab red envelope button), error code, error cause, timestamp and other information.
[0098] 4. S14 indicates that the terminal responds to the red envelope grabbing instruction and initiates a request to grab the red envelope to the server, and then adds the corresponding information to be reported S24 in the information reporting object, wherein the information to be reported S24 specifically includes: the name of the business step (requesting the server to grab the red envelope), red envelope ID, authentication code, user ID, error code, error cause, timestamp and other information.
[0099] 5. S15 indicates that after the terminal initiates a request to the server to grab a red envelope, the terminal obtains the red envelope notification result returned by the server, and then adds the corresponding information to be reported S25 in the information reporting object, wherein the information to be reported S25 specifically includes: the name of the business step (received red envelope notification result), success or failure in grabbing the red envelope, the amount obtained (failure means 0), error code, error cause, timestamp and other information.
[0100] 6. S16 means that the terminal displays the result of grabbing a red envelope on the interface of the application according to the result of the red envelope grabbing notification returned by the server, and then adds the corresponding information to be reported S26 to the information reporting object. Specifically, the information to be reported S26 includes: the name of the service step (display result), error code, error reason, timestamp, etc. In addition, since the entire process of grabbing a red envelope has been completed at this time, the terminal will also obtain an instruction to end the red envelope grabbing service.
[0101] 7. S17 means that after the terminal obtains the instruction to end the red envelope grabbing service, the terminal sends the information reporting object S2 to the server. The information reporting object S2 includes the above-mentioned information to be reported S21, information to be reported S22, information to be reported S23, information to be reported S24, information to be reported S25, and information to be reported S26.
[0102] Optionally, based on the corresponding embodiments above Figure 2 In an optional embodiment of the service processing method provided by the embodiment of the present application, before sending the information reporting object to the server if an instruction to end the service is obtained, the method further includes:
[0103] Obtain the first timestamp of the first sub-information to be reported in the information to be reported;
[0104] Obtain the second timestamp of the second sub-information to be reported in the information to be reported, where the second sub-information to be reported is the next information adjacent to the first sub-information to be reported;
[0105] Determine the service interval duration according to the first timestamp and the second timestamp;
[0106] If an instruction to end the service is obtained, sending the information reporting object to the server includes:
[0107] If an instruction to end the service is obtained, send the information reporting object and the service interval duration to the server.
[0108] In this embodiment, the above-mentioned information to be reported refers to the information in the information reporting object, the first sub-information to be reported or the second sub-information to be reported refers to one of the information in the information reporting object, and the second sub-information to be reported is the next information adjacent to the first sub-information to be reported, that is, the second service step corresponding to the second sub-information to be reported is the next step of the first service step corresponding to the first sub-information to be reported (for example, the first sub-information to be reported is the above-mentioned information to be reported S24, and the second sub-information to be reported is the above-mentioned information to be reported S25).
[0109] That is to say, when there are multiple pieces of information to be reported in the information reporting object, the terminal can obtain the time stamp corresponding to each piece of information to be reported in the information reporting object, and then calculate the time consumption (i.e., the service interval duration) of each service step based on two adjacent time stamps. Taking the above Figure 3 as an example, the interval duration between the step of displaying the red envelope and the step of the user clicking the red envelope button in the red envelope snatching service can be calculated based on the time stamp corresponding to the information to be reported S22 and the time stamp corresponding to the information to be reported S23. Therefore, when the terminal sends the information reporting object to the server, it can also send the service interval duration to the server. Specifically, the terminal can send the interval duration between every two service steps to the server, and can also send the total service time consumption obtained based on all the interval durations to the server.
[0110] In this way, when the server receives the information reporting object, it can also obtain corresponding time information such as the interval duration and the total service time consumption, so that the server can count the data in the service to obtain corresponding information, such as performance metrics, interface stay duration, and so on. Taking the red envelope snatching service as an example: by counting the time consumption, the server can generally know how long it takes from the user clicking the red envelope button to the user snatching the red envelope. If a certain step takes a long time, performance optimization can be carried out for this step, thereby optimizing the application program.
[0111] Optionally, based on the above Figure 2 corresponding embodiments, in an optional embodiment of the service processing method provided by the embodiments of the present application, if a service end instruction is obtained, sending an information reporting object to the server includes:
[0112] If a service end instruction is obtained, mark the information reporting object as a state to be reported;
[0113] If it is detected that the state of the information reporting object is the state to be reported, send the information reporting object to the server.
[0114] It can be understood that for the same application, multiple services may be in progress simultaneously. For example, for the WeChat application, in a chat, the application may receive a red envelope message, indicating that the red envelope grabbing service starts; when the red envelope grabbing service has not ended (for example, the red envelope grabbing service has only reached the step of displaying the red envelope message), the user can also initiate the red envelope sending service, indicating that the red envelope sending service starts. That is to say, within a certain period of time, the red envelope grabbing service and the red envelope sending service are in progress simultaneously. Then, during the simultaneous progress of the red envelope grabbing service and the red envelope sending service, correspondingly, the terminal will create information reporting objects respectively corresponding to the red envelope grabbing service and the red envelope sending service. That is, within a certain period of time, there may be two or more information reporting objects on the terminal. However, before the service ends, these information reporting objects need to be saved on the terminal first, and only after the service ends will the information reporting objects be sent to the server. Therefore, in order to ensure that the terminal can distinguish between the information reporting objects to be sent and the information reporting objects not to be sent, after the terminal obtains the service end instruction, the corresponding information reporting object is marked as the to-be-reported state. In this way, when the information reporting component of the terminal detects that the state of the information reporting object is the to-be-reported state, it can send the to-be-reported information reporting object to the server.
[0115] In this embodiment, by marking the information reporting object as the to-be-reported state after obtaining the service end instruction, the information reporting component of the terminal can know the to-be-reported information reporting object among a large number of information reporting objects, so as to send the information reporting object to the server after the service ends.
[0116] Optionally, based on the above Figure 2 corresponding embodiments, in an optional embodiment of the service processing method provided by the embodiments of the present application, after creating the information reporting object, the method further includes:
[0117] Obtain the creation duration of the information reporting object;
[0118] If the creation duration is greater than the preset time threshold, send the information reporting object to the server.
[0119] It can be understood that in this embodiment, the terminal will send the information reporting object to the server only when the business end instruction is obtained. That is to say, only after the entire business process ends, the information reporting object will be sent to the server. If an exception occurs in a certain step during the business process, resulting in the disconnection of the entire business process, that is, the business cannot end normally, then the information reporting object corresponding to this business cannot be sent to the server normally. Obviously, if these information reporting objects cannot be sent to the server, the server cannot obtain the relevant exception information, and at the same time, there will be too many information reporting objects accumulated on the terminal, resulting in a decline in the performance of the terminal.
[0120] In view of this, in order to handle the situation where an exception occurs in the business, the terminal can periodically query and obtain the creation duration of the information reporting object. If the creation of the information reporting object is greater than the preset time threshold, the information reporting object can be considered to be timed out and not reported, which means that the business corresponding to the information reporting object has not ended normally (for example, the payment business has started for 30 minutes and still has not ended). At this time, the information reporting object can be sent to the server. Among them, the preset time threshold can be determined according to the business type corresponding to the information reporting object, such as ten minutes, thirty minutes or one hour, etc., and no specific limitation is made here. Specifically, after the terminal detects that the creation duration of the information reporting object is greater than the preset time threshold, the information reporting object can be marked as the to-be-reported state, and then the information reporting component of the terminal will send the information reporting object to the server.
[0121] Optionally, on the basis of the above Figure 2 corresponding embodiments, in an optional embodiment of the business processing method provided by the embodiment of the present application, after creating the information reporting object, the method further includes:
[0122] If it is detected that the business corresponding to the information reporting object has an exception, add the business exception information to the information reporting object;
[0123] Send the information reporting object added with the business exception information to the server.
[0124] As can be seen from the above description, the terminal will send the information reporting object to the server only when the business end instruction is obtained. However, during the running process of the application program, the application program may have an exception, resulting in the interruption of the business process. For example, the application program suddenly crashes, the user forcibly ends the process of the application program by himself or the application program is ended by the terminal background process. Then, in these cases, the information reporting object corresponding to this business cannot be sent to the server normally.
[0125] Therefore, the terminal can detect the services in the application. When detecting that there is an abnormality in the service (for example, the application crashes and causes the service to disconnect), the terminal adds the specific service abnormality information (for example, the application crashes, resulting in the disconnection of the service process) to the information reporting object, and then sends the information reporting object added with the service abnormality information to the server. Specifically, after adding the service abnormality information to the information reporting object, the terminal can mark the information reporting object added with the service abnormality information as the to-be-reported status, and then the information reporting component of the terminal sends the information reporting object to the server.
[0126] The above has introduced in detail the service processing method provided by the embodiments of the present application. For ease of understanding, the following will introduce how the terminal specifically implements the service processing method. Please refer to Figure 4 , Figure 4 which is a schematic diagram of a service processing flow provided by the embodiments of the present application.
[0127] As Figure 4 shown, 401 represents the services that can be carried out in the application, which may specifically include: payment, grabbing red envelopes, posting on Moments, and so on.
[0128] 402 represents the information reporting object, which includes one or more to-be-reported information.
[0129] 403 represents the exception handling thread running on the terminal, which can detect the information reporting object and handle the information reporting object with an exception, such as detecting whether the creation of the information reporting object times out, detecting whether there is an abnormality in the information reporting object, and so on.
[0130] 404 represents the local cache space of the terminal. After the information reporting object is created, the information reporting object will be written into the local cache space and temporarily stored in the local cache space until the information reporting object is successfully reported to the server.
[0131] 405 represents the server. After the terminal obtains the service end instruction, the terminal will send the information reporting object to the server.
[0132] 406 represents the information statistics background. The server can transmit the information reporting object to the information statistics background to facilitate the information statistics background to classify, count, and other operations on the information reporting object according to the service type or timestamp and other information corresponding to the information reporting object.
[0133] 407 represents the background information library. After the information statistics background statistically processes the information reporting object, the statistically obtained information can be transmitted to the background information library, so that the developers of the application can perform operations such as real-time querying of the information and exporting statistical reports.
[0134] Please refer to Figure 5 and Figure 6 , Figure 5 which is a structural example diagram of an information reporting object provided by an embodiment of this application; Figure 6 which is an example diagram of an information reporting object uploaded to a server provided by an embodiment of this application.
[0135] Specifically, an information reporting object can be a data structure. Each information reporting object contains a packet header and a packet body. Each packet body contains one or more pieces of information to be reported. Each piece of information to be reported corresponds to a step in a business process (such as steps like popping up a password box, entering a password, or background verification in a payment business).
[0136] Among them, the packet header can contain some basic information related to this information reporting object, such as: client (application) platform and version, client version number, user ID, serial number, module name, operation name, network type, error code, International Mobile Equipment Identity (IMEI), Globally Unique Identifier (GUID), etc.
[0137] The packet body can contain some basic information about the business corresponding to the information reporting object, such as: keyword (business order number), business start time, total business duration, one or more pieces of information to be reported, etc.
[0138] Each piece of information to be reported can include information such as business step name, step duration, business parameters, error code, error reason, etc.
[0139] For ease of understanding, the following will introduce the specific process of business processing in combination with specific businesses. Taking the payment business as an example, the specific process of business processing is as follows:
[0140] The first step: When the payment business starts, the terminal creates an information reporting object.
[0141] The second step: The terminal calls the "business process start" interface and transmits corresponding information to the information reporting object: business keyword (such as: order number), step name (such as: initiate payment), business parameters (such as: payment type, user type, order number, login status, etc.), error code (such as: success 0), error reason (success is empty), so as to add the information to be reported in the information reporting object, and then write the information reporting object into the local cache space.
[0142] Step 3: The payment component initiates a network request to the payment backend. The terminal calls the "Add Report Node" interface to transmit the corresponding information to be reported to the information reporting object: step name (e.g., begin pay cgi), service parameters (e.g., the URL and parameters of the cgi), error code (fill in 0 if successful, fill in a non-zero error code if failed), and error description (empty if successful, fill in the reason if failed).
[0143] Step 4: The payment password pop-up window is pulled up. The terminal calls the "Add Report Node" interface to transmit the corresponding information to be reported to the information reporting object: step name (e.g., passwordwindowshow), service parameters (fill in the relevant parameters for invoking the payment password interface), error code (0 if successful), and error description (empty if successful).
[0144] Several steps in the middle are omitted.
[0145] Final step: Payment is successful. The terminal calls the "Add Report Node" interface to transmit the corresponding information to be reported to the information reporting object: step name (e.g., payment completed), service parameters (omitted), error code (0 if payment is successful, error code with the corresponding failure reason if payment fails), and error description (successful, or the specific error reason: user cancellation, password error, insufficient balance, etc.).
[0146] At this time, the entire business process ends. The terminal receives the business end instruction and marks the information reporting object as to be uploaded. The upload service of the client on the terminal will poll this local cache space and upload the information reporting object to be uploaded in the local cache space to the server. After successful upload, the corresponding information reporting object in the local cache space will be cleared. If the upload fails, it will be re-uploaded during the next poll.
[0147] Among them, after creating the information reporting object, the information reporting object will be initialized first, that is, the content in the header of the information reporting object will be automatically filled.
[0148] The above is an introduction to the business processing method provided by the embodiment of the present application from the perspective of the terminal. The following will introduce the business processing method provided by the embodiment of the present application from the perspective of the server.
[0149] Please refer to Figure 7 , Figure 7 which is an example diagram of a business processing method provided by the embodiment of the present application.
[0150] An embodiment of a business processing method provided by the embodiment of the present application includes:
[0151] 701. Receive an information reporting object sent by a mobile terminal. The information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the information in the same service.
[0152] In this embodiment, the information reporting object received by the server has an association relationship with the service performed by the application on the mobile terminal, and is created by the mobile terminal based on the service. Specifically, the creation process of the information reporting object can refer to the above steps S201 to S204 and will not be elaborated here.
[0153] 702. Classify the information reporting object according to the type of the service to which the information reporting object belongs.
[0154] Since each information reporting object has a corresponding service type, the server can classify different information reporting objects according to the service type, that is, classify the information reporting objects belonging to the same service type together. In addition, the server can also classify the information reporting objects according to the time information. For example, classify the information reporting objects sent to the server on the same day together. In this way, when the developer of the application wants to locate the error information in the information to be reported, only by following the information reporting objects classified by the server can the specific error information be quickly located. For example, on a certain day, an error occurred during the payment service of the application. Then, the developer of the application can quickly obtain the corresponding information reporting object in the server according to the date when the application had an error and the payment service. Since the information reporting object contains the information to be reported in the entire payment process, the developer can quickly locate the error information in the information to be reported contained in the information reporting object, saving a lot of time and effort.
[0155] The following describes in detail the device for service processing in the embodiments of the present application. Please refer to Figure 8 , Figure 8 which is a schematic diagram of an embodiment of a device for service processing provided in the embodiments of the present application. The device 80 for service processing includes:
[0156] An obtaining unit 801, configured to obtain a service start instruction;
[0157] A creating unit 802, configured to create an information reporting object according to the service start instruction;
[0158] An adding unit 803, configured to add the information to be reported corresponding to the information reporting instruction to the information reporting object if the information reporting instruction is obtained during the service process;
[0159] A sending unit 804, configured to, if a service end instruction is obtained, send an information reporting object to a server, so that the server performs classification processing on the information reporting object, where the information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the same service.
[0160] Optionally, based on the corresponding embodiment above, Figure 8 please refer to Figure 9 , Figure 9 which is a schematic diagram of an embodiment of a service processing device provided in an embodiment of the present application. In another embodiment of the service processing device 80 provided in the embodiment of the present application, a determining unit 805 is further included;
[0161] The obtaining unit 801 is further configured to obtain a first timestamp of a first sub-information to be reported in the information to be reported;
[0162] The obtaining unit 801 is further configured to obtain a second timestamp of a second sub-information to be reported in the information to be reported, where the second sub-information to be reported is the next information adjacent to the first sub-information to be reported;
[0163] The determining unit 805 is configured to determine a service interval duration according to the first timestamp and the second timestamp;
[0164] The sending unit 804 is further configured to, if a service end instruction is obtained, send the information reporting object and the service interval duration to the server.
[0165] Optionally, based on the corresponding embodiment above, Figure 8 please refer to Figure 10 , Figure 10 which is a schematic diagram of an embodiment of a service processing device provided in an embodiment of the present application. In another embodiment of the service processing device 80 provided in the embodiment of the present application, a marking unit 806 is further included;
[0166] The marking unit 806 is configured to, if a service end instruction is obtained, mark the information reporting object as a state to be reported;
[0167] The sending unit 804 is further configured to, if it is detected that the state of the information reporting object is the state to be reported, send the information reporting object to the server.
[0168] Optionally, based on the corresponding embodiment above, in another embodiment of the service processing device 80 provided in the embodiment of the present application, Figure 8 the obtaining unit 801 is configured to obtain a creation duration of the information reporting object;
[0169]
[0170] The sending unit 804 is further configured to send an information reporting object to the server if the creation duration is greater than a preset time threshold.
[0171] Optionally, based on the corresponding embodiment described above, in another embodiment of the service processing apparatus 80 provided in the embodiments of the present application, Figure 8 the adding unit 803 is further configured to add service exception information to the information reporting object if it is detected that the service corresponding to the information reporting object has an exception;
[0172] The sending unit 804 is further configured to send the information reporting object added with the service exception information to the server.
[0173] Please refer to
[0174] which is Figure 11 , Figure 11 a schematic diagram of an embodiment of a service processing apparatus provided in the embodiments of the present application. The service processing apparatus 110 includes:
[0175] The receiving unit 1101 is configured to receive an information reporting object sent by a mobile terminal. The information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the same service.
[0176] The processing unit 1102 is configured to classify the information reporting object according to the type of the service to which the information reporting object belongs.
[0177] The embodiments of the present application further provide a mobile terminal. As Figure 12 shown, for the sake of convenience of description, only the parts related to the embodiments of the present application are shown. For the specific technical details not disclosed, please refer to the method part of the embodiments of the present application. The mobile terminal may be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (PDA), a point of sales (POS), an in-vehicle computer, etc. Taking the mobile terminal as a mobile phone as an example:
[0178] Figure 12 shows a block diagram of a part of the structure of a mobile phone related to the mobile terminal provided in the embodiments of the present application. Referring to Figure 12 , the mobile phone includes: a radio frequency (RF) circuit 1210, a memory 1220, an input unit 1230, a display unit 1240, a sensor 1250, an audio circuit 1260, a wireless fidelity (WiFi) module 1270, a processor 1280, and a power supply 1290, etc. Those skilled in the art can understand that Figure 12The mobile phone structure shown does not constitute a limitation on the mobile phone, and it may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0179] The following will specifically introduce each component of the mobile phone in combination with Figure 12 :
[0180] The RF circuit 1210 can be used for receiving and transmitting information or signals during a call. Specifically, after receiving the downlink information from the base station, it is given to the processor 1280 for processing; in addition, it sends the uplink data designed to the base station. Generally, the RF circuit 1210 includes but is not limited to antennas, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 1210 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0181] The memory 1220 can be used to store software programs and modules. The processor 1280 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1220. The memory 1220 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory 1220 can include high-speed random access memory and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0182] The input unit 1230 can be used to receive input numerical or character information and generate key signal inputs related to the user settings and function controls of the mobile phone. Specifically, the input unit 1230 can include a touch panel 1231 and other input devices 1232. The touch panel 1231, also known as a touch screen, can collect touch operations of the user thereon or nearby (such as operations of the user using any suitable object or accessory such as a finger, a stylus, etc. on or near the touch panel 1231), and drive corresponding connection devices according to a preset program. Optionally, the touch panel 1231 can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 1280, and can receive and execute commands sent by the processor 1280. In addition, the touch panel 1231 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1231, the input unit 1230 can also include other input devices 1232. Specifically, the other input devices 1232 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.
[0183] The display unit 1240 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1240 can include a display panel 1241. Optionally, the display panel 1241 can be configured in forms such as a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 1231 can cover the display panel 1241. When the touch panel 1231 detects a touch operation thereon or nearby, it is transmitted to the processor 1280 to determine the type of touch event. Subsequently, the processor 1280 provides a corresponding visual output on the display panel 1241 according to the type of touch event. Although in Figure 12 the touch panel 1231 and the display panel 1241 are implemented as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 1231 and the display panel 1241 can be integrated to realize the input and output functions of the mobile phone.
[0184] The mobile phone may further include at least one sensor 1250, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 1241 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1241 and / or the backlight when the mobile phone is moved to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that the mobile phone can also be configured with, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be elaborated here.
[0185] The audio circuit 1260, the speaker 1261, and the microphone 1262 can provide an audio interface between the user and the mobile phone. The audio circuit 1260 can transmit the electrical signal converted from the received audio data to the speaker 1261, and the speaker 1261 converts it into a sound signal for output; on the other hand, the microphone 1262 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1260 and then converted into audio data. After the audio data is output to the processor 1280 for processing, it is sent through the RF circuit 1210 to, for example, another mobile phone, or the audio data is output to the memory 1220 for further processing.
[0186] WiFi belongs to short - range wireless transmission technology. The mobile phone can help users send and receive emails, browse the web, and access streaming media through the WiFi module 1270, which provides users with wireless broadband Internet access. Although Figure 12 the WiFi module 1270 is shown, it can be understood that it does not belong to an essential component of the mobile phone and can be omitted entirely within the scope of not changing the essence of the invention according to needs.
[0187] The processor 1280 is the control center of the mobile phone, connecting various parts of the entire mobile phone through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 1220, and by calling the data stored in the memory 1220, it executes various functions of the mobile phone and processes data. Optionally, the processor 1280 may include one or more processing units; optionally, the processor 1280 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above - mentioned modem processor may not be integrated into the processor 1280 either.
[0188] The mobile phone further includes a power supply 1290 (such as a battery) for powering each component. Optionally, the power supply can be logically connected to the processor 1280 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system.
[0189] Although not shown, the mobile phone may further include a camera, a Bluetooth module, etc., which will not be elaborated here.
[0190] In the embodiment of the present application, the processor 1280 included in the terminal further has the following functions:
[0191] Obtain a service start instruction;
[0192] Create an information reporting object according to the service start instruction;
[0193] During the service process, if an information reporting instruction is obtained, add the information to be reported corresponding to the information reporting instruction to the information reporting object;
[0194] If a service end instruction is obtained, send the information reporting object to the server, so that the server classifies the information reporting object. The information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the same service.
[0195] Figure 13 FIG. is a schematic structural diagram of a server provided by an embodiment of the present application. The server 1300 may vary greatly due to configuration or performance differences, and may include one or more central processing units (CPUs) 1322 (for example, one or more processors) and a memory 1332, and one or more storage media 1330 for storing application programs 1342 or data 1344 (for example, one or more mass storage devices). Among them, the memory 1332 and the storage media 1330 can be transient storage or persistent storage. The program stored in the storage media 1330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Further, the central processor 1322 can be set to communicate with the storage media 1330 and execute a series of instruction operations in the storage media 1330 on the server 1300.
[0196] The server 1300 may further include one or more power supplies 1326, one or more wired or wireless network interfaces 1350, one or more input / output interfaces 1358, and / or one or more operating systems 1341, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0197] In an embodiment of the present application, the CPU 1322 included in the server 1300 further has the following functions:
[0198] Receive an information reporting object sent by a mobile terminal, where the information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the information in the same service;
[0199] Classify the information reporting object according to the type of the service to which the information reporting object belongs.
[0200] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described system, device, and unit can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0201] In several embodiments provided by the present application, it should be understood that the disclosed system, device, and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be in an electrical, mechanical, or other form.
[0202] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0203] In addition, the functional units in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0204] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0205] As described above, the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of various embodiments of this application.
Claims
1. A method for business processing, characterized in that, Including: Obtain a service start instruction; According to the service start instruction, create an information reporting object, where the information reporting object has an associated relationship with the service corresponding to the service start instruction, and the information reporting object is a data structure; During the process of the service, if an information reporting instruction is obtained, add the information to be reported corresponding to the information reporting instruction to the information reporting object. The information reporting object includes a packet header and a packet body. The packet header contains basic information related to the information reporting object, and the basic information includes any one or a combination of a client platform and version, a client version number, a user ID, a serial number, a module name, an operation name, a network type, an error code, an International Mobile Equipment Identity (IMEI), and a globally unique identifier (GUID). The packet body includes the information to be reported and basic service information corresponding to the information reporting object. The basic service information includes keywords, a service start time, a total service duration, and the information to be reported. The information to be reported includes a name of a service step being performed in the service process when the application triggers the information reporting instruction, a step duration, service parameters, an error code, a reason for the error, and a timestamp; Obtain a first timestamp of a first sub-information to be reported in the information to be reported; Obtain a second timestamp of a second sub-information to be reported in the information to be reported, where the second sub-information to be reported is the next information adjacent to the first sub-information to be reported; Determine a service interval duration according to the first timestamp and the second timestamp; If a service end instruction is obtained, send the information reporting object to the server so that the server classifies and processes the information reporting object according to the service type. The information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the same service. The information reporting object includes the information to be reported in a complete service process. For each step in the service, add the corresponding information to be reported to the information reporting object. Among them, if a service end instruction is obtained, sending the information reporting object to the server includes: if a service end instruction is obtained, send the information reporting object and the service interval duration to the server; If it is detected that the service corresponding to the information reporting object has an exception, add service exception information to the information reporting object; Send the information reporting object added with the service exception information to the server.
2. The method for service processing according to claim 1, wherein The step of if a service end instruction is obtained, sending the information reporting object to the server further includes: If a service end instruction is obtained, mark the information reporting object as a state to be reported; If it is detected that the state of the information reporting object is a state to be reported, send the information reporting object to the server.
3. The method for business processing according to claim 1, wherein After creating the information reporting object, the method further includes: Obtain the creation duration of the information reporting object; If the creation duration is greater than a preset time threshold, send the information reporting object to the server.
4. A method for business processing, characterized in that, Including: Receive an information reporting object sent by a mobile terminal. One or more pieces of information to be reported are included in the information reporting object, and the information to be reported belongs to the information in the same service. The information reporting object is created according to the service start instruction. The information reporting object has an association relationship with the service corresponding to the service start instruction. The information reporting object is a data structure. The information reporting object includes a packet header and a packet body. The packet header contains basic information related to the information reporting object, and the basic information includes any one or combination of the client platform and version, client version number, user ID, serial number, module name, operation name, network type, error code, international mobile equipment identification code, and globally unique identifier. The packet body includes the information to be reported and the basic service information corresponding to the information reporting object. The basic service information includes keywords, service start time, total service duration, and the information to be reported. The information to be reported includes the name of the service step being performed in the service process when the application triggers the information reporting instruction, step duration, service parameters, error code, error reason, and timestamp. The information reporting object includes the information to be reported in a complete service process. For each step in the service, the corresponding information to be reported is added to the information reporting object. Among them, when the mobile terminal obtains a service end instruction or detects an exception in the service corresponding to the information reporting object, it adds the service exception information to the information reporting object and then sends the information reporting object and the service interval duration. The determination method of the service interval duration is as follows: obtain the first timestamp of the first sub-information to be reported in the information to be reported; obtain the second timestamp of the second sub-information to be reported in the information to be reported, where the second sub-information to be reported is the next information adjacent to the first sub-information to be reported; determine the service interval duration according to the first timestamp and the second timestamp; Classify the information reporting object according to the type of the service to which the information reporting object belongs.
5. An apparatus for business processing, characterized in that, Including: An obtaining unit, configured to obtain a service start instruction; A creating unit, configured to create an information reporting object according to the service start instruction. The information reporting object has an association relationship with the service corresponding to the service start instruction. The information reporting object is a data structure; An adding unit, configured to, during the process of a service, if an information reporting instruction is obtained, add the information to be reported corresponding to the information reporting instruction to the information reporting object, where the information reporting object includes a packet header and a packet body, the packet header contains basic information related to the information reporting object, and the basic information includes any one or combination of a client platform and version, a client version number, a user ID, a serial number, a module name, an operation name, a network type, an error code, an International Mobile Equipment Identity (IMEI), and a globally unique identifier (GUID), the packet body includes the information to be reported and service basic information corresponding to the information reporting object, and the service basic information includes a keyword, a service start time, a total service duration, and the information to be reported, and the information to be reported includes a name of a service step being performed in a service process when an application program triggers the information reporting instruction, a step duration, service parameters, an error code, an error reason, and a timestamp; The obtaining unit is further configured to obtain a first timestamp of a first sub-information to be reported in the information to be reported; Obtain a second timestamp of a second sub-information to be reported in the information to be reported, where the second sub-information to be reported is the next information adjacent to the first sub-information to be reported; A determining unit, configured to determine a service interval duration according to the first timestamp and the second timestamp; A sending unit, configured to, if a service end instruction is obtained, send the information reporting object to a server, so that the server performs a classification process on the information reporting object according to a service type, where the information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the same service, the information reporting object includes the information to be reported in a complete service process, and corresponding information to be reported is added to the information reporting object for each step in the service, and where, if a service end instruction is obtained, sending the information reporting object to the server includes: if a service end instruction is obtained, sending the information reporting object and the service interval duration to the server; The adding unit is further configured to, if it is detected that the service corresponding to the information reporting object is abnormal, add service abnormal information to the information reporting object; The sending unit sends the information reporting object added with the service abnormal information to the server.
6. The device according to claim 5, characterized in that The device further includes a marking unit; The marking unit is configured to, if a service end instruction is obtained, mark the information reporting object as a status to be reported; The sending unit is further configured to, if it is detected that the status of the information reporting object is the status to be reported, send the information reporting object to the server.
7. The device according to claim 5, characterized in that, The obtaining unit is configured to obtain a creation duration of the information reporting object; The sending unit is further configured to, if the creation duration is greater than a preset time threshold, send the information reporting object to the server.
8. An apparatus for business processing, characterized in that, including: A receiving unit, configured to receive an information reporting object sent by a mobile terminal. The information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the same service. The information reporting object is created according to the service start instruction, and the information reporting object has an association relationship with the service corresponding to the service start instruction. The information reporting object is a data structure, and the information reporting object includes a packet header and a packet body. The packet header contains basic information related to the information reporting object, and the basic information includes any one or a combination of a client platform and version, a client version number, a user ID, a serial number, a module name, an operation name, a network type, an error code, an International Mobile Equipment Identity, and a globally unique identifier. The packet body includes the information to be reported and the basic service information corresponding to the information reporting object. The basic service information includes keywords, a service start time, a total service duration, and the information to be reported. The information to be reported includes a service step name, a step duration, service parameters, an error code, an error reason, and a timestamp that are in progress in the service process when the application triggers an information reporting instruction. The information reporting object includes the information to be reported in a complete service process. For each step in the service, the corresponding information to be reported is added to the information reporting object. Wherein, when the mobile terminal obtains a service end instruction or detects an exception in the service corresponding to the information reporting object, the service exception information is added to the information reporting object, and then the information reporting object and the service interval duration are sent. The service interval duration determination method is: obtaining a first timestamp of a first sub-information to be reported in the information to be reported; obtaining a second timestamp of a second sub-information to be reported in the information to be reported, where the second sub-information to be reported is the next information adjacent to the first sub-information to be reported; determining the service interval duration according to the first timestamp and the second timestamp; A processing unit, configured to classify the information reporting object according to the type of the service to which the information reporting object belongs.
9. A terminal device, characterized in that, Comprising: A memory, a transceiver, a processor, and a bus system; Wherein, the memory is used to store programs; The processor is used to execute the programs in the memory, including the following steps: Obtaining a service start instruction; According to the service start instruction, creating an information reporting object, the information reporting object has an association relationship with the service corresponding to the service start instruction, and the information reporting object is a data structure; During the business process, if an information reporting instruction is obtained, the information to be reported corresponding to the information reporting instruction is added to the information reporting object. The information reporting object includes a packet header and a packet body. The packet header contains basic information related to the information reporting object, and the basic information includes any one or combination of the client platform and version, client version number, user ID, serial number, module name, operation name, network type, error code, international mobile equipment identification code, and globally unique identifier. The packet body includes the information to be reported and the basic business information corresponding to the information reporting object. The basic business information includes keywords, business start time, total business duration, and the information to be reported. The information to be reported includes the name of the business step being performed in the business process when the application triggers the information reporting instruction, step duration, business parameters, error code, error reason, and timestamp; Obtain the first timestamp of the first sub-information to be reported in the information to be reported; Obtain the second timestamp of the second sub-information to be reported in the information to be reported, where the second sub-information to be reported is the next information adjacent to the first sub-information to be reported; Determine the business interval duration according to the first timestamp and the second timestamp; If a business end instruction is obtained, send the information reporting object to the server so that the server classifies and processes the information reporting object according to the business type. The information reporting object includes one or more pieces of information to be reported, and the information to be reported belongs to the same business. The information reporting object includes the information to be reported in a complete business process. For each step in the business, the corresponding information to be reported is added to the information reporting object. Among them, if a business end instruction is obtained, sending the information reporting object to the server includes: if a business end instruction is obtained, sending the information reporting object and the business interval duration to the server; If it is detected that the business corresponding to the information reporting object is abnormal, add business exception information to the information reporting object; Send the information reporting object added with the business exception information to the server; The bus system is used to connect the memory and the processor to enable communication between the memory and the processor.
10. A server, characterized in that, Including: A memory, a transceiver, a processor, and a bus system; Among them, the memory is used to store programs; The processor is used to execute the programs in the memory, including the following steps: Receive an information reporting object sent by a mobile terminal. One or more pieces of information to be reported are included in the information reporting object, and the information to be reported belongs to the information in the same service. The information reporting object is created according to the service start instruction. The information reporting object has an association relationship with the service corresponding to the service start instruction. The information reporting object is a data structure. The information reporting object includes a packet header and a packet body. The packet header contains basic information related to the information reporting object. The basic information includes any one or combination of the client platform and version, client version number, user ID, serial number, module name, operation name, network type, error code, international mobile equipment identification code, and globally unique identifier. The packet body includes the information to be reported and the basic service information corresponding to the information reporting object. The basic service information includes keywords, service start time, total service duration, and the information to be reported. The information to be reported includes the name of the service step in progress in the service process when the application triggers the information reporting instruction, step duration, service parameters, error code, error reason, and timestamp. The information reporting object includes the information to be reported in a complete service process. For each step in the service, the corresponding information to be reported is added to the information reporting object. Among them, when the mobile terminal obtains a service end instruction or detects an exception in the service corresponding to the information reporting object, it adds the service exception information to the information reporting object and then sends the information reporting object and the service interval duration. The determination method of the service interval duration is as follows: obtain the first timestamp of the first sub-information to be reported in the information to be reported; obtain the second timestamp of the second sub-information to be reported in the information to be reported, where the second sub-information to be reported is the next information adjacent to the first sub-information to be reported; determine the service interval duration according to the first timestamp and the second timestamp; Classify the information reporting object according to the type of the service to which the information reporting object belongs; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate.
11. A computer-readable storage medium, characterized in that, Instructions are stored in the computer-readable storage medium. When it runs on a computer, it causes the computer to execute the method according to any one of claims 1-4.
12. A computer program product, characterized in that, The computer program product includes instructions. When it runs on a computer or a processor, it causes the computer or the processor to execute the method according to any one of claims 1-4.
Citation Information
Patent Citations
Service management method and system and plug-in
CN104144378A
Front-end application monitoring method, front-end application and front-end application monitoring system
CN105471932A