Business data processing method, device and storage medium
By establishing a pre-defined correspondence and a load-sharing mechanism, the resource allocation problem caused by the independence of different business systems was solved, and efficient and secure business data processing was achieved.
Patent Information
- Application Number
- CN202310566703.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-18
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2043-05-18
AI Technical Summary
The independent development of different business systems makes it difficult to allocate resources reasonably to handle user request traffic, resulting in poor business operation efficiency.
Establish a preset correspondence, determine the correspondence between the target service type, transmission line and service backend, quickly forward traffic data to the target service backend, and perform load splitting and security verification when under high load.
It improves the efficiency and stability of business data processing, ensures the reliability and security of data transmission, and adapts to the flexibility of business expansion.
Smart Images

Figure CN116760776B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet, and particularly relates to a business data processing method, a business data processing device and a storage medium. BACKGROUND
[0002] With the development of Internet technology, more and more enterprises configure their businesses on the Internet platform for management, and develop corresponding systems and backgrounds for different business services to support increasingly diverse businesses of enterprises.
[0003] However, at present, different business systems or backgrounds are independently developed, and with the expansion of enterprise business and the application of micro-service architecture, the corresponding business systems gradually increase and become complex and bloated, which is difficult to manage. When receiving the traffic of user requests for specific business services, it is difficult to allocate reasonable resources for processing, resulting in poor business operation efficiency. SUMMARY
[0004] The main purpose of the present application is to provide a business data processing method, a business data processing device and a storage medium, which aims to improve the efficiency of business data processing.
[0005] To achieve the above purpose, the present application provides a business data processing method, which comprises the following steps:
[0006] Receiving target traffic data and determining the target business type corresponding to the target traffic data;
[0007] According to the preset correspondence relationship, the target transmission line and the target business background corresponding to the target business type are determined;
[0008] Based on the target transmission line, the target traffic data is sent to the target business background;
[0009] The preset correspondence relationship includes the correspondence relationship among the target business type, the target transmission line and the target business background.
[0010] Optionally, the business data processing method further comprises:
[0011] When there is a new business background, the business type and the transmission line corresponding to the new business background are determined;
[0012] The business type, the transmission line and the background address of the new business background are associated and stored in the preset correspondence relationship.
[0013] Optionally, each business background has a corresponding relationship with at least one transmission line, and the step of determining the business type and the transmission line corresponding to the new business background comprises:
[0014] determining a service type of the new service background;
[0015] determining a traffic level of the new service background according to the service type, and determining a corresponding number of transmission lines according to the traffic level.
[0016] Optionally, after the step of sending the target traffic data to the target service background based on the target transmission line, the method further comprises:
[0017] receiving service processing data fed back by the target service background from the target transmission line;
[0018] sending the service processing data to a corresponding terminal of the target traffic data.
[0019] Optionally, the step of receiving target traffic data comprises:
[0020] when receiving traffic data, performing legality verification and / or permission verification on the traffic data;
[0021] determining the traffic data that passes the verification as the target traffic data.
[0022] Optionally, the step of performing legality verification and / or permission verification on the traffic data comprises:
[0023] verifying request legality of the traffic data and a user state of a corresponding user; and / or,
[0024] verifying whether permission information of the corresponding user of the traffic data satisfies a preset permission condition.
[0025] Optionally, before the step of performing legality verification and / or permission verification on the traffic data, the method further comprises:
[0026] when receiving the traffic data, distributing the traffic data to a plurality of data processing threads.
[0027] Optionally, the step of sending the target traffic data to the target service background based on the target transmission line comprises:
[0028] determining a current load proportion of the target transmission line;
[0029] when the current load proportion of the target transmission line is greater than a preset threshold, sending the target traffic data to the target service background based on the target transmission line and a pre-device line.
[0030] In addition, in order to achieve the above object, the application further provides a service data processing device, which comprises a memory, a processor and a service data processing program stored in the memory and executable on the processor, and the service data processing program is configured to implement the steps of the service data processing method according to any one of the above.
[0031] In addition, in order to achieve the above object, the application further provides a storage medium, which stores a service data processing program, and the service data processing program implements the steps of the service data processing method according to any one of the above when executed by a processor.
[0032] The application provides a service data processing method, which comprises the following steps: receiving target traffic data; determining a target service type corresponding to the target traffic data; determining a target transmission line and a target service background corresponding to the target service type according to a preset correspondence relationship, wherein the preset correspondence relationship comprises a correspondence relationship among the target service type, the target transmission line and the target service background; and sending the target traffic data to the target service background based on the target transmission line. Compared with the prior art in which service systems of different services are independent of each other and it is difficult to determine how to process traffic data of services, the application associates the service type, the transmission line and the service background of each service by establishing the preset correspondence relationship, so that the corresponding target transmission line and the target service background can be determined according to the preset correspondence relationship after the traffic data is received, and the traffic data can be sent to the service background, the traffic data is forwarded, and the service data processing efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 A hardware structure diagram related to an embodiment of the service data processing device of the application;
[0034] Figure 2 A flowchart of an embodiment of the service data processing method of the application;
[0035] Figure 3 A flowchart of another embodiment of the service data processing method of the application;
[0036] Figure 4 A flowchart of still another embodiment of the service data processing method of the application.
[0037] The object, functional features and advantages of the application will be further illustrated with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0038] It should be understood that the specific embodiments described herein are only used to explain the application, and are not used to limit the application.
[0039] An embodiment of the present application provides a service data processing device. As shown in Figure 1 The service data processing device can include a processor 1001, for example, a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication among the components. The user interface 1003 can include a display, an input unit such as a keyboard, and can further include a standard wired interface and a wireless interface. The network interface 1004 can optionally include a standard wired interface and a wireless interface (for example, a WIreless-FIdelity (WI-FI) interface). The memory 1005 can be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM) such as a disk memory. The memory 1005 can also be a storage device independent of the processor 1001.
[0040] Those skilled in the art can understand that the structure shown in Figure 1 does not constitute a limitation on the service data processing device, and the service data processing device can further include more or fewer components than those shown in the figure, or combine some components, or different component arrangements.
[0041] As shown in Figure 1 , the service data processing program can be included in the memory 1005 as a storage medium. In Figure 1 , the network interface 1004 of the service data processing device is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; and the processor 1001 can be used to call the service data processing program stored in the memory 1005 and execute the steps of the service data processing method provided by the embodiment of the present application.
[0042] An embodiment of the present application further provides a service data processing method. Referring to Figure 2 , an embodiment of the service data processing method of the present application is provided. In this embodiment, the preset correspondence includes the correspondence among the target service type, the target transmission line, and the target service background. The service data processing method includes the following steps.
[0043] In step S10, target traffic data is received, and a target service type corresponding to the target traffic data is determined.
[0044] The target traffic data is traffic data sent by a user when requesting a service, which should be sent to a corresponding service background, and the service background provides corresponding service and feeds back service processing result data to the user, thus completing the process of the user requesting a specific service and obtaining the feedback result provided by the service.
[0045] On the other hand, the service has multiple service types, and each service type has a corresponding service background. In this embodiment, the traffic data of different users requesting services or the traffic data of the same user requesting services of multiple service types are all processed uniformly. For ease of description, the target traffic data is taken as traffic data of a user requesting a service of a service type, and the method of this embodiment can also be used in the case of multiple users requesting multiple services.
[0046] Optionally, the user sends a request for a service of a target service type on a front-end page, and the service data processing device of this embodiment receives corresponding target traffic data, which includes identification information for representing the service type. The target service type is determined according to the identification information, so as to determine the target service type requested by the user according to the received target traffic data. In addition, different front-end pages can be provided for different service types, and the entry address of the request sent by the user can be different. In this embodiment, the target traffic data is obtained from the corresponding page of each service type.
[0047] In step S20, the target service type is determined according to a preset correspondence relationship, and the target transmission line and the target service background corresponding to the target service type are determined.
[0048] The preset correspondence relationship includes the association relationship among the service type, the transmission line and the service background, and can be stored in the local in the form of a routing table. The service type, the transmission line and the background address of the service background are recorded in the routing table. In addition, a new routing table is requested from the communication management center at a preset time interval, so as to update the preset correspondence relationship recorded in the local in a timely manner.
[0049] Optionally, after the target service type of the target traffic data is determined, the target transmission line and the target service background corresponding to the target service type are searched according to the preset correspondence relationship. The preset correspondence relationship is used to quickly determine the target transmission line and the background address of the target service background corresponding to the target service type, so as to determine the forwarding target of the traffic data, even when the service background is numerous.
[0050] In step S30, the target traffic data is sent to the target service background based on the target transmission line.
[0051] Further, the target transmission line is based on a TCP connection, so that the connection between the service data processing device and the service background is stable and reliable. Meanwhile, the association between the target transmission line and the target service background is that the target transmission line points to the background address of the target service background, so that the target traffic data based on the target transmission line can reach the target service background. On the target service background, a service service of the target service type is configured, and when the target service background receives the target traffic data, the service service configured based on the target service background is processed, for example, a vehicle model database is queried, a vehicle sales activity is queried, and the like.
[0052] The service data processing method provided in the embodiment of the present application receives target traffic data, determines a target service type corresponding to the target traffic data, determines a target transmission line and a target service background corresponding to the target service type according to a preset correspondence relationship, and sends the target traffic data to the target service background based on the target transmission line. Compared with the current service systems of different services being independent of each other and being difficult to determine how to process the traffic data of the services, the preset correspondence relationship is established in the present application, so that the service type, the transmission line and the service background of each service are associated, the corresponding target transmission line and the target service background can be quickly determined according to the preset correspondence relationship after the traffic data is received, the traffic data is sent to the service background, the forwarding of the traffic data is completed, and the service data processing efficiency is improved.
[0053] Further, in the embodiment, after the step of sending the target traffic data to the target service background based on the target transmission line, the method further includes:
[0054] receiving service processing data fed back by the target service background from the target transmission line;
[0055] sending the service processing data to a corresponding terminal of the target traffic data.
[0056] On the target service background, the service background processes the traffic data according to the service service configured by the service background, and provides corresponding feedback data, that is, the service processing data. For example, when the service service provided by the target service background is to query a vehicle model, the service processing data may include a vehicle model, a vehicle configuration parameter and a price, and the like. When the service service provided by the target service background is to query a vehicle sales activity, the service processing data may include related information of a current sales activity. The service processing data fed back by the target service background is still transmitted through the target transmission line, and when the service processing data is received, the service processing data is forwarded to a corresponding terminal of the target traffic data, so that the service service result is fed back to a user.
[0057] The user can obtain the service result, and a complete service experience is provided. Since the target service background feedback service processing data is also transmitted through the target transmission line, the data transmission connection during service data processing is kept fast, reliable and stable, and the service data processing efficiency is improved.
[0058] Further, in the embodiment, the step of transmitting the target traffic data to the target service background based on the target transmission line comprises:
[0059] determining the current load proportion of the target transmission line;
[0060] when the current load proportion of the target transmission line is greater than a preset threshold, transmitting the target traffic data to the target service background based on the target transmission line and a pre-device line.
[0061] Since in the embodiment, the target traffic data that needs to be transmitted to the target service background is transmitted through the target transmission line, when the traffic concurrent pressure is too large, the target transmission line may be congested, and the target traffic data cannot be transmitted through the target transmission line in time. Therefore, before transmitting the target traffic data, the current load proportion of the target transmission line can be determined first. When the current load proportion is greater than a preset threshold, for example, greater than 80%, it can be judged that the load of the current target transmission line is large, and the communication management center managing the transmission line is requested to use the pre-device line. The target traffic data is transmitted in combination with the target transmission line and the pre-device line, the traffic is shunted, and the pressure of the target transmission line is reduced.
[0062] The preset working rule can be used between the target transmission line and the pre-device line. The traffic data is preferentially transmitted through the target transmission line. Only when the current load proportion of the target transmission line is greater than the preset threshold, the traffic data is transmitted through the pre-device line. When the communication management center is requested to use the pre-device line, the pre-device line is added to the preset corresponding relationship of the target service type, that is, the background address of the target service background, within a preset time length. After the preset time length ends, whether the current load proportion of the target transmission line is greater than the preset threshold is determined again. If yes, the pre-device line is kept to be used, and the preset time length is restarted. If no, the communication management center is notified to release the pre-device line from the target service type, and the pre-device line is removed from the preset corresponding relationship of the target service type.
[0063] By determining the current load proportion of the target transmission line, and calling the pre-device line combined with the transmission flow data when it is determined that the load pressure of the target transmission line is large, the load pressure of the target transmission line in the flow peak period can be reduced, the smoothness of business data processing is ensured, and the stability is improved.
[0064] Further, based on the above embodiment, another embodiment of the business data processing method is provided.
[0065] In the embodiment, referring to Figure 3 , the business data processing method further comprises:
[0066] Step S40, when there is a new business background, determining the business type and the transmission line corresponding to the new business background;
[0067] With the expansion of business services, business backgrounds corresponding to business services will be continuously developed. In order to enable the new business background to be included in the method of the embodiment and accept business requests, it is necessary to establish the preset corresponding relationship corresponding to the new business background. The new business background can be a newly developed business background or an old business background that needs to be included in the method of the embodiment for management. After the staff performs the operation of adding the new business background, it is determined that there is a new business background to be added. According to the background information of the new business background or the manually input information, the business type is determined. At the same time, all the transmission lines are currently allocated and managed by the communication management center. The communication management center is notified to allocate the corresponding transmission line for the new business background. The communication management center determines the allocated transmission line from the transmission lines that have not been allocated at present. The transmission line will be used as the dedicated transmission line of the new business background.
[0068] In addition, the development of the new business background can use the framework scaffold. By using the scaffold command codegen, a sub-background with a basic framework is generated. On this basis, the staff develops according to the specific business type, so as to obtain new business backgrounds of various business types. By using the framework scaffold, the development workload of the staff for the new business background can be reduced, and the business expansion speed can be improved.
[0069] Step S50, storing the business type, the transmission line and the background address of the new business background in the preset corresponding relationship.
[0070] Further, the preset corresponding relationship of the business type, the transmission line and the background address of the new business background is established, and the routing table of the communication management center is notified to add the preset corresponding relationship corresponding to the new business background. In this way, when the preset corresponding relationship recorded locally is updated regularly, the preset corresponding relationship of the new business background can be updated to the local, and the registration of the new business background is completed.
[0071] By establishing and saving preset correspondence of the newly-added service background, the registration of the newly-added service background is realized, so that the newly-added service background can be quickly integrated into the method after development to start processing of service request, the speed of converting the newly-added service development into practicality is improved, and the flexibility of service data processing is improved.
[0072] Further, in the embodiment, each service background has a correspondence with at least one transmission line, and the step of determining the service type and the transmission line corresponding to the newly-added service background comprises:
[0073] determining the service type of the newly-added service background;
[0074] determining the traffic level of the newly-added service background according to the service type, and determining the corresponding number of transmission lines according to the traffic level.
[0075] For the service background of each service type, since the traffic data received by the service background is transmitted based on the corresponding transmission line, according to the difference of the service type, there are service types with greater traffic pressure and more commonly used by users in multiple service types, and therefore, the transmission lines used by each service type can be further distinguished according to the service type to adapt to the traffic pressure demand of different service types.
[0076] Specifically, when the newly-added service background is allocated with the corresponding transmission line, the traffic level of the newly-added service background is determined according to the service type of the newly-added service background, the traffic level can be specified by the staff during development of the newly-added service background, or determined according to a preset mapping table between the service type and the traffic level, for example, the traffic level is divided into three levels of A, B and C from large to small according to the traffic demand, and the traffic level of the query type service is set as A level. Meanwhile, the corresponding number of transmission lines is also set according to different traffic levels, which is equivalent to allocating the number of transmission lines corresponding to the traffic demand of the service with different traffic levels, when the newly-added service background is registered and allocated with the corresponding transmission line, the corresponding number of transmission lines is allocated according to the number of transmission lines corresponding to the traffic level, and the preset correspondence is established between the service type and the background address of the service background.
[0077] In addition, in other embodiments, methods other than adjusting the number of transmission lines can also be used to adapt to different traffic demands, for example, transmission lines with different bandwidths are used.
[0078] By allocating the transmission line corresponding to the number of traffic levels according to the traffic level corresponding to the newly added background service type, the appropriate transmission line is allocated to the traffic demand of different types of services. When the newly added background service belongs to a service with low traffic demand, transmission line resources can be saved. When the newly added background service belongs to a service with high traffic demand, the traffic concurrency pressure of the service can be reduced.
[0079] Further, based on the above embodiment, another embodiment of the business data processing method is provided.
[0080] In this embodiment, referring to Figure 4 , the step of receiving target traffic data includes:
[0081] Step S11, when receiving the traffic data, performing legality verification and / or permission verification on the traffic data;
[0082] In order to improve the security of processing business data, after receiving the traffic data, legality verification and permission verification of the corresponding user are required. In other embodiments, other verification methods can also be combined, for example, for services with security requirements, a key verification is added.
[0083] Step S12, determining the traffic data that passes the verification as the target traffic data.
[0084] All traffic data received by the traffic data receiving interface needs to be verified for legality and / or permission. Only when the traffic data passes the verification can it be determined as target traffic data, and the subsequent business data processing steps can be executed. For traffic data that does not pass the verification, in addition to sending a prompt message to the corresponding user's terminal that the verification does not pass, a corresponding warning message is also sent to the staff to prompt the staff that there is an illegal request.
[0085] By performing legality verification and / or permission verification on the traffic data, it is ensured that the business request is initiated by a normal user and the requested business service matches the user's permission, preventing data leakage and other problems caused by processing illegal requests, and improving the security of business data processing.
[0086] Further, in this embodiment, the step of performing legality verification and / or permission verification on the traffic data includes:
[0087] Verifying the request legality of the traffic data and the user state of the corresponding user; and / or,
[0088] Verifying whether the permission information of the traffic data corresponding to the user meets the preset permission condition.
[0089] Specifically, the checking step includes authentication checking and / or permission checking. The authentication checking includes request legitimacy checking, Token checking (corresponding to user account authentication), and user state checking (corresponding to whether the user belongs to an abandoned account, etc.). The permission checking includes network state checking and user permission information checking. The network state checking can determine whether the user is a robot according to the network state of the corresponding user. The user permission information checking can determine whether the user permission information matches the preset permission condition. The preset permission condition is determined according to the service type of the traffic data request, and whether the user has the permission to use the service is determined, thereby avoiding situations such as a general visitor requesting to use a more core service. In addition, the authentication checking and the permission checking can be combined or only one of them can be selected. The order of the authentication checking and the permission checking is not limited, and the authentication checking or the permission checking can be added according to actual needs.
[0090] By checking the request legitimacy of the traffic data, the user state of the corresponding user, and the permission information, it is ensured that the accepted service request is not an illegal request, and security problems such as data leakage caused by processing illegal requests are avoided, and the security of service data processing is improved.
[0091] Further, in the embodiment, before the step of checking the legitimacy and / or permission of the traffic data, the method further includes:
[0092] When the traffic data is received, the traffic data is distributed to a plurality of data processing threads.
[0093] In the embodiment, a traffic thread pool is also provided, which includes a plurality of data processing threads. When traffic data sent by a plurality of users is received, it is determined by polling whether each data processing thread in the traffic thread pool is currently idle, and an idle thread is determined. The corresponding data processing thread is allocated to the traffic data of each user from the idle thread. In the allocation of the corresponding data processing thread, the thread can receive the traffic data of the user based on the thread, and the acceptance of the service request of the user is realized. At the same time, the received traffic data is also executed by the data processing thread for subsequent traffic data processing steps, such as the above-mentioned legitimacy checking and / or permission checking of the traffic data, and the step of sending the traffic data to the service background through the corresponding transmission line. After the traffic data is sent to the corresponding service background, the corresponding data processing thread is released and belongs to the idle thread again.
[0094] Since in the embodiment, the traffic data of different users requesting service or the traffic data of the same user requesting service of multiple service types are processed uniformly, when the service requests at the same time are too much, the concurrent pressure of the traffic receiving interface is huge, the traffic data of the user cannot be received to accept the service request, the traffic data is distributed to the data processing thread in the traffic thread pool for processing, thereby reducing the concurrent pressure of the traffic receiving interface, the traffic receiving interface can receive the service request of large traffic, the service request of the user cannot be responded in time when the concurrent pressure is large is avoided, and the stability of the service data processing is improved.
[0095] In addition, the embodiment of the application further provides a storage medium, the storage medium stores a service data processing program, and the service data processing program realizes the related steps of any one of the above service data processing methods when executed by a processor.
[0096] It should be noted that in this paper, the term "including", "containing" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or system. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or system including the element.
[0097] The above-mentioned embodiment numbers of the application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0098] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and necessary general hardware platform, of course, they can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server or network device) execute the method described in each embodiment of the application.
[0099] The above is only the preferred embodiment of the application, and does not limit the patent scope of the application, any equivalent structure or equivalent flow transformation made by using the content of the specification and drawings of the application, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the application.
Claims
1. A service data processing method characterized by, The business data processing method comprises the following steps: Receiving target traffic data and determining a target business type corresponding to the target traffic data, wherein, when receiving traffic data, performing legality verification and / or permission verification on the traffic data; determining the traffic data that passes the verification as the target traffic data; when receiving traffic data, distributing the traffic data to multiple data processing threads; Determining a target transmission line and a target business background corresponding to the target business type according to a preset correspondence relationship; Sending the target traffic data to the target business background based on the target transmission line, wherein the step of sending the target traffic data to the target business background based on the target transmission line comprises: determining a current load proportion of the target transmission line; when the current load proportion of the target transmission line is greater than a preset threshold, sending the target traffic data to the target business background based on the target transmission line and a pre-device line; The preset correspondence relationship comprises a correspondence relationship among the target business type, the target transmission line, and the target business background; In addition, the business data processing method further comprises: When there is a new business background, determining a business type and a transmission line corresponding to the new business background, the transmission line being a dedicated transmission line for the new business background, wherein each business background has a correspondence relationship with at least one transmission line, the business type of the new business background is determined; the traffic level of the new business background is determined according to the business type, and the corresponding number of transmission lines is determined according to the traffic level; The business type, the transmission line, and the background address of the new business background are associated and stored in the preset correspondence relationship.
2. The service data processing method of claim 1, wherein After the step of sending the target traffic data to the target business background based on the target transmission line, the method further comprises: Receiving business processing data fed back by the target business background from the target transmission line; Sending the business processing data to a terminal corresponding to the target traffic data.
3. The service data processing method of claim 1, wherein The step of performing legality verification and / or permission verification on the traffic data comprises: Verifying the request legality of the traffic data and the user state of the corresponding user; and / or, Verifying whether the permission information of the user corresponding to the traffic data meets a preset permission condition.
4. A service data processing apparatus characterized by comprising: The business data processing device comprises a memory, a processor, and a business data processing program stored on the memory and executable on the processor, the business data processing program being configured to implement the steps of the business data processing method according to any one of claims 1 to 3.
5. A storage medium, characterized by The storage medium stores a business data processing program, and the business data processing program is executed by the processor to implement the steps of the business data processing method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Method and system for classifying service flow
CN101635684A