Transaction category identification method and device, electronic equipment and storage medium
By obtaining and collecting business field values in business requests and generating splicing addresses to identify transaction categories, the problem of being unable to distinguish different transaction categories of the same request URL in the prior art is solved, and accurate identification and performance analysis of transaction categories are achieved.
Patent Information
- Application Number
- CN202410830669.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2025-01-17
AI Technical Summary
The prior art cannot effectively distinguish different transaction categories of page network requests for the same request URL, resulting in the inability to conduct specific performance analysis.
By obtaining the target service request, determining the service type, collecting the service field values in the business field collection, generating splicing addresses, and identifying transaction categories based on the splicing addresses.
When the request address is the same, the transaction category of the business request is effectively distinguished, which solves the problem that the transaction category of the business request cannot be identified, and realizes the accurate identification of the transaction category.
Smart Images

Figure CN119323475A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a transaction category identification method and device, electronic device and storage medium. Background Art
[0002] The page network request performance of the mobile terminal (for example, the H5 (HyperText Markup Language 5, a programming language for creating web pages and network applications) page network request performance) is an important performance for analyzing application performance.
[0003] In the related art, only the request URL (Uniform Resource Locator) of the page network request can be used to distinguish transaction categories (e.g., purchase transaction category, payment transaction category, etc.) so as to perform performance analysis based on the transaction category. However, in actual business, the request URLs of some page network requests are the same, and only the business parameters are passed in the request parameters. As a result, when performing performance analysis of page network requests, it is impossible to effectively distinguish different transaction categories of page network requests with the same request URL, and thus it is impossible to perform effective performance analysis based on specific transaction categories.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a transaction category identification method and device, electronic device and storage medium, so as to at least solve the technical problem in the related art that the transaction category of a business request cannot be effectively identified.
[0006] According to one aspect of an embodiment of the present invention, a method for identifying a transaction category is provided, comprising: obtaining a target business request, and determining a business type based on the target business request; obtaining a business field set based on the business type, and collecting business field values corresponding to each business field in the business field set based on the target business request; generating a splicing address based on all the business field values and the target business request; and identifying the splicing address to obtain a target transaction category of the target business request.
[0007] Furthermore, the identification method further includes: when configuring a request address of a service request, determining the service type corresponding to the request address; and configuring a corresponding service field set for each service type.
[0008] Furthermore, based on the target business request, the step of collecting the business field value corresponding to each business field in the business field set includes: obtaining a request message of the target business request; when the target business request is initiated by a first operating system terminal, constructing a parameter acquisition function; using the parameter acquisition function to replace the original function in the first operating system, and using the parameter acquisition function to obtain the business field value corresponding to each business field from the request message, wherein the first operating system is an operating system initiated by the first operating system terminal.
[0009] Furthermore, based on the target business request, the step of collecting the business field value corresponding to each business field in the business field set also includes: obtaining a request message of the target business request; when the target business request is initiated by a second operating system terminal, using a dynamic proxy interface in the second operating system to obtain the business field value corresponding to each business field from the request message, wherein the second operating system is an operating system initiated by the second operating system terminal, and the second operating system and the first operating system are different operating systems.
[0010] Furthermore, based on all the business field values and the target business request, the step of generating a spliced address includes: determining a target request address of the target business request; splicing all the business fields and the business field values corresponding to the business fields to the target request address to obtain the spliced address.
[0011] Furthermore, the identification method also includes: based on the transaction attribute information of each of the transaction categories, determining multiple preset business field values corresponding to the transaction category and the preset logical relationship between the multiple preset business field values, and representing the multiple preset business field values and the preset logical relationship as business field value information of the transaction category; based on the business field value information of all the transaction categories, constructing a transaction category correspondence table.
[0012] Furthermore, the step of identifying the splicing address to obtain the target transaction category of the target business request includes: identifying the splicing address to obtain all the business field values and the logical relationship between all the business field values; matching the business field value information from the transaction category correspondence table; when each of the preset business field values in the target business field value information matches any of the business field values, determining whether the preset logical relationship in the target business field value information matches the logical relationship between the matching business field values, wherein the matching business field value is the business field value that matches the preset business field value; when the preset logical relationship in the target business field value information matches the logical relationship between the matching business field values, taking the transaction category corresponding to the target business field value information as the target transaction category of the target business request.
[0013] According to another aspect of an embodiment of the present invention, a device for identifying a transaction category is also provided, including: an acquisition unit, used to acquire a target business request, and determine a business type based on the target business request; a collection unit, used to acquire a business field set based on the business type, and based on the target business request, collect business field values corresponding to each business field in the business field set; a generation unit, used to generate a splicing address based on all the business field values and the target business request; and an identification unit, used to identify the splicing address to obtain a target transaction category of the target business request.
[0014] Furthermore, the identification device also includes: a first determination module, used to determine the service type corresponding to the request address when configuring the request address of the service request; and a first configuration module, used to configure the corresponding service field set for each service type.
[0015] Furthermore, the acquisition unit includes: a first acquisition module, used to acquire a request message of the target business request; a first construction module, used to construct a parameter acquisition function when the target business request is initiated by a first operating system terminal; a second acquisition module, used to replace the original function in the first operating system with the parameter acquisition function, and use the parameter acquisition function to obtain the business field value corresponding to each business field from the request message, wherein the first operating system is an operating system initiated by the first operating system terminal.
[0016] Furthermore, the collection unit also includes: a third acquisition module, used to obtain the request message of the target business request; a fourth acquisition module, used to obtain the business field value corresponding to each business field from the request message by using the dynamic proxy interface in the second operating system when the target business request is initiated by the second operating system terminal, wherein the second operating system is an operating system initiated by the second operating system terminal, and the second operating system is a different operating system from the first operating system.
[0017] Furthermore, the generation unit includes: a second determination module, used to determine the target request address of the target business request; a first splicing module, used to splice all the business fields and the business field values corresponding to the business fields to the target request address to obtain the spliced address.
[0018] Furthermore, the identification device also includes: a third determination module, used to determine multiple preset business field values corresponding to the transaction category and the preset logical relationship between the multiple preset business field values based on the transaction attribute information of each of the transaction categories, and represent the multiple preset business field values and the preset logical relationship as business field value information of the transaction category; a second construction module, used to construct a transaction category correspondence table based on the business field value information of all the transaction categories.
[0019] Further, the identification unit includes: a first identification module, used to identify the splicing address, obtain all the business field values and the logical relationship between all the business field values; a first matching module, used to match the business field value information from the transaction category corresponding table; a first judgment module, used to judge whether the preset logical relationship in the target business field value information matches the logical relationship between the matching business field values when each of the preset business field values in the target business field value information matches any of the business field values, wherein the matching business field value is the business field value that matches the preset business field value; a first acting module, used to use the transaction category corresponding to the target business field value information as the target transaction category of the target business request when the preset logical relationship in the target business field value information matches the logical relationship between the matching business field values.
[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned transaction category identification methods.
[0021] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned transaction category identification methods.
[0022] In the present invention, a target business request is obtained, and based on the target business request, a business type is determined, based on the business type, a business field set is obtained, and based on the target business request, business field values corresponding to each business field in the business field set are collected, based on all business field values and the target business request, a splicing address is generated, the splicing address is identified, and the target transaction category of the target business request is obtained.
[0023] In the present invention, a business field set that needs to be extracted can be determined according to the business type of the target business request, and then the business field values corresponding to each business field in the business field set can be collected, so as to generate a splicing address according to the collected business field values and the target business request. By identifying the splicing address, the target transaction category of the target business request can be obtained, and the transaction category of the business request can be effectively distinguished when the request addresses of the business requests are the same, thereby solving the technical problem in the related art that the transaction category of the business request cannot be effectively identified. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0025] Figure 1 is a flow chart of an optional transaction category identification method according to an embodiment of the present invention;
[0026] Figure 2 is an optional flow chart for identifying a spliced address according to an embodiment of the present invention;
[0027] Figure 3 is a schematic diagram of an optional transaction category identification device according to an embodiment of the present invention;
[0028] Figure 4 The present invention is a hardware structure block diagram of an electronic device (or mobile device) for a transaction category identification method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] It should be noted that the transaction category identification method and device thereof in the present invention can be used in the field of financial technology when identifying transaction categories, and can also be used in any field other than the field of financial technology when identifying transaction categories. The application field of the transaction category identification method and device thereof in the present invention is not limited.
[0032] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) collected and involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation entrances are provided for users to choose to authorize or refuse. For example, an interface is set between the system and the relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0033] In the present invention, for the case where the business requests with the same request address belong to different transaction categories, an effective method for distinguishing transaction categories according to business parameters is proposed, which can effectively solve the problem of being unable to distinguish transaction categories. The purpose of distinguishing different transaction categories is achieved by extracting the business-limited identifier (i.e., business field value) in the business parameters (e.g., header, get, post and other business parameters) in the business request. After extracting the business-limited identifier in the business request, it is spliced to the URL of the business request to identify the transaction category according to the generated spliced address. For example, assuming that the URL of the business request is http: / / www.b*d*.com, the extracted business-limited identifier is a=va l ue1, b=va l ue2, and after splicing, it is http: / / www.b*d*.com$a=va l ue1&b=va l ue2.
[0034] The present invention is described in detail below in conjunction with various embodiments.
[0035] Embodiment 1
[0036] According to an embodiment of the present invention, an embodiment of a method for identifying a transaction category is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0037] Figure 1 is a flow chart of an optional transaction category identification method according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0038] Step S101: Obtain a target service request, and determine a service type based on the target service request.
[0039] Step S102: acquiring a business field set based on the business type, and collecting a business field value corresponding to each business field in the business field set based on the target business request.
[0040] Step S103: Generate a concatenated address based on all service field values and the target service request.
[0041] Step S104, identifying the concatenated address to obtain the target transaction category of the target business request.
[0042] Through the above steps, the target business request can be obtained, and based on the target business request, the business type can be determined, based on the business type, the business field set can be obtained, and based on the target business request, the business field value corresponding to each business field in the business field set can be collected, and based on the target business request, a splicing address can be generated based on all business field values and the target business request, and the splicing address can be identified to obtain the target transaction category of the target business request. In an embodiment of the present invention, the business field set to be extracted can be determined according to the business type of the target business request, and then the business field value corresponding to each business field in the business field set can be collected, so as to generate a splicing address according to the collected business field value and the target business request, and the target transaction category of the target business request can be obtained by identifying the splicing address, and the transaction category of the business request can be effectively distinguished when the request addresses of the business requests are the same, thereby solving the technical problem that the transaction category of the business request cannot be effectively identified in the related art.
[0043] The embodiment of the present invention is described in detail below in combination with the above steps.
[0044] In an embodiment of the present invention, when configuring the request address URL of a business request initiated by a terminal, a business field set corresponding to the business request and a transaction category correspondence table (used to record the business field values corresponding to each transaction category and the logical relationship between the business field values, such as and, or, etc.) can be configured first according to the business scenario involved in the business request (for example, a shopping scenario, a transfer scenario, etc.), so as to facilitate the subsequent identification of the transaction category of the business request with the same request address URL.
[0045] In an optional embodiment, the identification method further includes: when configuring the request address of the service request, determining the service type corresponding to the request address; and configuring a corresponding service field set for each service type.
[0046] In the embodiment of the present invention, when configuring the request address of the service request, it is necessary to determine the service type corresponding to the request address according to the service scenario involved in the service request (for example, shopping scenario, transfer scenario, etc.), and configure the corresponding service field set for each service type. In addition, the corresponding relationship between the request address, service type and service field set can be recorded in the database.
[0047] For example, if a business request involves a shopping scenario, the business type corresponding to the request address of the business request is determined to be a shopping type, and based on the business type of the shopping type, the business field set (for example, name field, tag field, etc.) required for different transactions in the business (for example, adding to a shopping cart, payment, etc.) is determined.
[0048] Step S101: Obtain a target service request, and determine a service type based on the target service request.
[0049] In step S101, a target business request (for example, an H5 page network request) initiated by a terminal (which may be a terminal with a different operating system, such as an iOS terminal, an Andor id terminal, etc.) can be obtained, and based on a database that records the correspondence between the request address, the business type, and the business field set, the business type is determined according to the request address URL of the target business request, so as to subsequently extract the corresponding business field value according to the business type.
[0050] Step S102: acquiring a business field set based on the business type, and collecting a business field value corresponding to each business field in the business field set based on the target business request.
[0051] In step S102, based on a database recording the correspondence between request addresses, business types, and business field sets, a corresponding business field set may be obtained according to the business type corresponding to the target business request, and then, according to the target business request, a business field value corresponding to each business field in the business field set may be collected, so as to facilitate subsequent identification of the transaction category based on the collected business field values.
[0052] Optionally, based on the target business request, the step of collecting the business field value corresponding to each business field in the business field set includes: obtaining a request message of the target business request; when the target business request is initiated by a first operating system terminal, constructing a parameter acquisition function; using the parameter acquisition function to replace the original function in the first operating system, and using the parameter acquisition function to obtain the business field value corresponding to each business field from the request message, wherein the first operating system is an operating system initiated by the first operating system terminal.
[0053] In an embodiment of the present invention, for target service requests initiated by different operating system terminals, different collection methods are required to collect service field values. If the target service request is initiated by a first operating system terminal (i.e., a terminal using a first operating system, for example, the first operating system may be an iOS system), the request message of the target service request may be obtained first (for example, a request message such as a request header, a response header, a request body, and a response body of the service request may be obtained from a network backend using a developer tool). Based on the characteristics of the first operating system, it is necessary to rebuild the parameter acquisition function so as to replace the original function in the first operating system with the parameter acquisition function, and then the parameter acquisition function may be used to obtain the service field value corresponding to each service field from the request message.
[0054] For example, assuming that the first operating system is an iOS system, iOS can collect the URL parameters, Header parameters, and body parameters of the service request. If the URL of the service request is www.b*d*.com / test? name=username, the request message of the service request can be obtained:
[0055] POST / test? name=username HTTP / 1.1;
[0056] host:www.b*d*.com;
[0057] tag:testtag;
[0058] test0=va l ue0&test1=val ue1&page=login.
[0059] When the business field of the sent URL is name, the information name=username can be collected; when the business field of the sent Header is tag, the information tag=testtag can be collected; when the business field of the sent body is page, the information page=login can be collected.
[0060] The above business field values can be obtained by intercepting the loadRequest request (this method is used to load the web page content of the specified URL). Specifically, a new parameter acquisition function can be constructed to replace the original loadRequest request, and then the parameter acquisition function is used to obtain the business field values.
[0061] Optionally, based on the target business request, the step of collecting the business field value corresponding to each business field in the business field set also includes: obtaining a request message of the target business request; when the target business request is initiated by a second operating system terminal, using a dynamic proxy interface in the second operating system to obtain the business field value corresponding to each business field from the request message, wherein the second operating system is an operating system initiated by the second operating system terminal, and the second operating system and the first operating system are different operating systems.
[0062] In an embodiment of the present invention, if the target service request is initiated by a second operating system terminal (i.e., a terminal using a second operating system, for example, the second operating system may be an Andor id system), the request message of the target service request may be obtained first, and then the dynamic proxy interface in the second operating system (for example, the Invocat ionHand ler interface) may be used to obtain the service field value corresponding to each service field from the request message.
[0063] For example, assuming that the second operating system is an Android system, Android can collect URL parameters, Header parameters, and body parameters of the service request. If the URL of the service request is www.b*d*.com / test? name=username, the request message of the service request can be obtained:
[0064] POST / test? name=usernameHTTP / 1.1;
[0065] host:www.b*d*.com;
[0066] test0=va l ue0&test1=val ue1&page=login.
[0067] When the business field of the sent URL is name, the information of name=username can be collected; when the business field of the sent body is page, the information of page=login can be collected.
[0068] The business fields can be obtained by intercepting the postUrl(String, byte[]postData) interface (that is, using the dynamic proxy interfaceInvocationHandler).
[0069] Step S103: Generate a concatenated address based on all service field values and the target service request.
[0070] In step S103, all the service field values may be concatenated to the request address of the target service request to generate a concatenated address (ie, a concatenated address is generated based on all the service field values and the target service request).
[0071] Optionally, the step of generating a concatenated address based on all business field values and the target business request includes: determining a target request address of the target business request; and concatenating all business fields and business field values corresponding to the business fields to the target request address to obtain a concatenated address.
[0072] In the embodiment of the present invention, the target request address URL of the target service request may be determined first, and then all service fields and service field values corresponding to the service fields may be concatenated to the target request address to obtain a concatenated address.
[0073] For example, suppose the request URL of the business request is: www.b*d*.com / test? name=username, get tag=testtag from the Header, get page=login from the body, and concatenate the obtained business field values to the request URL. The concatenated address is:
[0074] http: / / www.b*d*.com / test? name=username$tag=testtag&page=login.
[0075] Step S104, identifying the concatenated address to obtain the target transaction category of the target business request.
[0076] In step S104, the concatenated address may be identified to obtain the target transaction category of the target business request, so that the performance of the target business request may be analyzed based on the target transaction category.
[0077] Optionally, the identification method also includes: based on the transaction attribute information of each transaction category, determining multiple preset business field values corresponding to the transaction category and the preset logical relationship between the multiple preset business field values, and representing the multiple preset business field values and the preset logical relationship as business field value information of the transaction category; based on the business field value information of all transaction categories, constructing a transaction category correspondence table.
[0078] In an embodiment of the present invention, when configuring the request address of the business request, a transaction category correspondence table can be pre-constructed to record the business field values corresponding to each transaction category and the logical relationship between the business field values. Specifically, based on the transaction attribute information of each transaction category, multiple preset business field values corresponding to the transaction category and the preset logical relationship between the multiple preset business field values can be determined (for example, in the case where the transaction category is a payment transaction, based on some transaction attribute information of the payment transaction, the business field values that need to be included in the request for the payment transaction and the logical relationship between the business field values are determined. For example, if two business field values must exist at the same time, then the logical relationship between the two business field values is an and relationship).
[0079] Optionally, the step of identifying the spliced address to obtain the target transaction category of the target business request includes: identifying the spliced address to obtain all business field values and the logical relationship between all business field values; matching the business field value information from the transaction category correspondence table; when each preset business field value in the target business field value information matches any business field value, determining whether the preset logical relationship in the target business field value information matches the logical relationship between the matching business field values, wherein the matching business field value is a business field value that matches the preset business field value; when the preset logical relationship in the target business field value information matches the logical relationship between the matching business field values, taking the transaction category corresponding to the target business field value information as the target transaction category of the target business request.
[0080] Figure 2 is an optional flow chart for identifying a spliced address according to an embodiment of the present invention, such as Figure 2 As shown, the following steps are included:
[0081] Step S201, identifying the spliced address, obtaining all business field values and the logical relationship between all business field values.
[0082] Step S202, matching business field value information from the transaction category correspondence table.
[0083] Step S203, when each preset business field value in the target business field value information matches any business field value, determine whether the preset logical relationship in the target business field value information matches the logical relationship between the matching business field value, wherein the matching business field value is a business field value that matches the preset business field value.
[0084] Step S204: When the preset logical relationship in the target business field value information matches the logical relationship between the matching business field values, the transaction category corresponding to the target business field value information is used as the target transaction category of the target business request.
[0085] In an embodiment of the present invention, the splicing address can be identified to obtain all business field values and the logical relationship between all business field values. Then the business field value information is matched from the transaction category corresponding table. If each preset business field value in the target business field value information matches any business field value (for example, the business field value required for the payment transaction can be matched in the splicing address), it is necessary to determine whether the logical relationship between the preset logical relationship in the target business field value information and the matching business field value (i.e., the business field value matching the preset business field value) matches. If the preset logical relationship in the target business field value information matches the logical relationship between the matching business field values (for example, the logical relationship between the business field values required for the payment transaction is consistent with the logical relationship between the corresponding business field values in the splicing address), it can be indicated that the match is successful, and the transaction category corresponding to the target business field value information is used as the target transaction category of the target business request.
[0086] In an embodiment of the present invention, for business requests with the same request address but belonging to different transaction categories, the purpose of distinguishing different transaction categories can be achieved by extracting the business field value in the business parameters in the business request. After extracting the business field value in the business request, it is spliced after the URL of the business request to identify the transaction category based on the generated spliced address, thereby effectively identifying the transaction category of the business requests with the same request address.
[0087] The following is a detailed description in conjunction with another embodiment.
[0088] Embodiment 2
[0089] A transaction category identification device provided in this embodiment includes multiple implementation units, each implementation unit corresponds to each implementation step in the above-mentioned embodiment 1.
[0090] Figure 3 is a schematic diagram of an optional transaction category identification device according to an embodiment of the present invention, such as Figure 3 As shown, the identification device may include: an acquisition unit 30 , a collection unit 31 , a generation unit 32 , and an identification unit 33 .
[0091] The acquisition unit 30 is used to acquire a target service request and determine a service type based on the target service request;
[0092] The collection unit 31 is used to obtain a business field set based on the business type, and collect a business field value corresponding to each business field in the business field set based on the target business request;
[0093] A generating unit 32, configured to generate a concatenated address based on all service field values and a target service request;
[0094] The identification unit 33 is used to identify the concatenated address and obtain the target transaction category of the target business request.
[0095] The above identification device can obtain the target business request through the acquisition unit 30, and determine the business type based on the target business request, obtain the business field set based on the business type through the collection unit 31, and collect the business field value corresponding to each business field in the business field set based on the target business request, generate the splicing address based on all business field values and the target business request through the generation unit 32, and identify the splicing address through the identification unit 33 to obtain the target transaction category of the target business request. In the embodiment of the present invention, the business field set to be extracted can be determined according to the business type of the target business request, and then the business field value corresponding to each business field in the business field set can be collected, so as to generate the splicing address according to the collected business field value and the target business request, and the target transaction category of the target business request can be obtained by identifying the splicing address, and the transaction category of the business request can be effectively distinguished when the request addresses of the business requests are the same, thereby solving the technical problem that the transaction category of the business request cannot be effectively identified in the related art.
[0096] Optionally, the identification device further includes: a first determination module, used to determine the service type corresponding to the request address when configuring the request address of the service request; and a first configuration module, used to configure a corresponding service field set for each service type.
[0097] Optionally, the collection unit includes: a first acquisition module, used to obtain a request message of a target business request; a first construction module, used to construct a parameter acquisition function when the target business request is initiated by a first operating system terminal; a second acquisition module, used to replace the original function in the first operating system with the parameter acquisition function, and use the parameter acquisition function to obtain the business field value corresponding to each business field from the request message, wherein the first operating system is an operating system initiated by the first operating system terminal.
[0098] Optionally, the collection unit also includes: a third acquisition module, used to obtain a request message of a target business request; a fourth acquisition module, used to, when the target business request is initiated by a second operating system terminal, use a dynamic proxy interface in the second operating system to obtain a business field value corresponding to each business field from the request message, wherein the second operating system is an operating system initiated by the second operating system terminal, and the second operating system and the first operating system are different operating systems.
[0099] Optionally, the generating unit includes: a second determining module, used to determine a target request address of a target business request; and a first splicing module, used to splice all business fields and business field values corresponding to the business fields to the target request address to obtain a spliced address.
[0100] Optionally, the identification device also includes: a third determination module, used to determine, based on the transaction attribute information of each transaction category, multiple preset business field values corresponding to the transaction category and the preset logical relationship between the multiple preset business field values, and represent the multiple preset business field values and the preset logical relationship as business field value information of the transaction category; a second construction module, used to construct a transaction category correspondence table based on the business field value information of all transaction categories.
[0101] Optionally, the identification unit includes: a first identification module, used to identify the spliced address, obtain all business field values and the logical relationship between all business field values; a first matching module, used to match business field value information from a transaction category corresponding table; a first judgment module, used to judge whether the preset logical relationship in the target business field value information matches the logical relationship between the matching business field value when each preset business field value in the target business field value information matches any business field value, wherein the matching business field value is a business field value that matches the preset business field value; a first acting module, used to use the transaction category corresponding to the target business field value information as the target transaction category of the target business request when the preset logical relationship in the target business field value information matches the logical relationship between the matching business field value.
[0102] The above-mentioned recognition device may also include a processor and a memory. The above-mentioned acquisition unit 30, collection unit 31, generation unit 32, recognition unit 33, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0103] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the splicing address can be identified by adjusting the kernel parameters to obtain the target transaction category of the target business request.
[0104] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (fl ash RAM), and the memory includes at least one storage chip.
[0105] The present invention also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: obtaining a target business request, and based on the target business request, determining a business type, based on the business type, obtaining a business field set, and based on the target business request, collecting business field values corresponding to each business field in the business field set, generating a splicing address based on all business field values and the target business request, identifying the splicing address, and obtaining a target transaction category of the target business request.
[0106] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned transaction category identification method.
[0107] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the above-mentioned transaction category identification method.
[0108] Figure 4 1 is a hardware structure block diagram of an electronic device (or mobile device) for a transaction category identification method according to an embodiment of the present invention. Figure 4 As shown, the electronic device may include one or more processors (e.g., Figure 4 The processor 402a, processor 402b, ..., processor 402n, etc., which may include but are not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 404 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown.
[0109] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0110] The embodiments or examples of the present disclosure are not exhaustive, but are only illustrative of some embodiments or examples, and are not intended to be specific limitations on the scope of protection of the present disclosure. In the absence of contradiction, each step in a certain embodiment or example can be implemented as an independent example, and the steps can be combined arbitrarily. For example, the scheme after removing some steps in a certain embodiment or example can also be implemented as an independent example, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional methods or optional examples in a certain embodiment or example can be combined arbitrarily; in addition, the various embodiments or examples can be combined arbitrarily, for example, some or all steps of different embodiments or examples can be combined arbitrarily, and a certain embodiment or example can be combined arbitrarily with the optional methods or optional examples of other embodiments or examples.
[0111] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0112] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0113] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0114] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0115] If 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 the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0116] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for identifying a transaction category, characterized in that: include: Obtaining a target service request, and determining a service type based on the target service request; Based on the business type, a business field set is acquired, and based on the target business request, a business field value corresponding to each business field in the business field set is collected; Generate a concatenated address based on all the service field values and the target service request; The concatenated address is identified to obtain a target transaction category of the target business request.
2. The identification method according to claim 1, characterized in that: The identification method further comprises: When configuring a request address of a service request, determining the service type corresponding to the request address; A corresponding business field set is configured for each business type.
3. The identification method according to claim 1, characterized in that: The step of collecting the business field value corresponding to each business field in the business field set based on the target business request includes: Obtaining a request message of the target service request; In the case where the target service request is initiated by the first operating system terminal, constructing a parameter acquisition function; The parameter acquisition function is used to replace the original function in the first operating system, and the parameter acquisition function is used to obtain the business field value corresponding to each business field from the request message, wherein the first operating system is an operating system initiated by the first operating system terminal.
4. The identification method according to claim 1, characterized in that: The step of collecting the business field value corresponding to each business field in the business field set based on the target business request also includes: Obtaining a request message of the target service request; In the case where the target service request is initiated by a second operating system terminal, the dynamic proxy interface in the second operating system is used to obtain the service field value corresponding to each service field from the request message, wherein the second operating system is an operating system initiated by the second operating system terminal, and the second operating system is a different operating system from the first operating system.
5. The identification method according to claim 1, characterized in that: The step of generating a concatenated address based on all the service field values and the target service request includes: Determine a target request address of the target service request; All the business fields and the business field values corresponding to the business fields are spliced to the target request address to obtain the spliced address.
6. The identification method according to claim 1, characterized in that: The identification method further comprises: Based on the transaction attribute information of each of the transaction categories, determine a plurality of preset business field values corresponding to the transaction category and a preset logical relationship between the plurality of preset business field values, and characterize the plurality of preset business field values and the preset logical relationship as business field value information of the transaction category; Based on the business field value information of all the transaction categories, a transaction category correspondence table is constructed.
7. The identification method according to claim 6, characterized in that: The step of identifying the concatenated address to obtain the target transaction category of the target business request includes: Identify the spliced address to obtain all the business field values and the logical relationship between all the business field values; Matching the business field value information from the transaction category corresponding table; In the case where each of the preset business field values in the target business field value information matches any of the business field values, determining whether the preset logical relationship in the target business field value information matches the logical relationship between the matching business field value, wherein the matching business field value is the business field value that matches the preset business field value; In a case where the preset logical relationship in the target business field value information matches the logical relationship between the matching business field values, the transaction category corresponding to the target business field value information is used as the target transaction category of the target business request.
8. A device for identifying transaction categories, characterized in that: include: An acquisition unit, configured to acquire a target service request and determine a service type based on the target service request; A collection unit, configured to obtain a business field set based on the business type, and collect a business field value corresponding to each business field in the business field set based on the target business request; A generating unit, configured to generate a concatenated address based on all the service field values and the target service request; The identification unit is used to identify the concatenated address to obtain the target transaction category of the target business request.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the transaction category identification method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: It comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the transaction category identification method described in any one of claims 1 to 7.