Service processing method and device

Through the templated business processing method, using business demand information to match business objects and update the business routing template, the problem of lack of unified business processing rules in the existing technology is solved, and code universality and development efficiency are improved.

CN119718273APending Publication Date: 2025-03-28JINGDONG TECH HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411864242.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing business processing methods lack unified business processing rules, resulting in inconsistent code style and poor universality, which increases development costs and reduces development efficiency.

Method used

By providing a templated business processing method, using business demand information to match business objects from the business routing instance list, call and update the business routing template to unify business processing rules.

Benefits of technology

It improves code universality, reduces development costs, improves development efficiency, and realizes unified business processing rules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718273A_ABST
    Figure CN119718273A_ABST
Patent Text Reader

Abstract

The invention discloses a business processing method and device, and relates to the technical field of big data. A specific embodiment of the method comprises the following steps: acquiring service demand information from a received service processing request; matching a service object corresponding to the service demand information from a service routing instance list based on the service demand information; and calling a service routing template according to the service object, updating the service routing template according to the service demand information, and performing service processing by using the updated service routing template. According to the embodiment, the unified business processing rule can be provided in a template mode, the code universality is improved, the development cost is reduced, and the development efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data technology, and in particular, to a method and device for business processing. Background Art

[0002] The existing business processing method is to develop business logic according to different business needs, call the business logic in sequence from the application programming interface, and complete the implementation of business processing needs.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the related art:

[0004] When faced with different business processing requirements, there are no unified business processing rules, and the code styles are not unified and the versatility is poor, resulting in high development costs and low development efficiency. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a method and apparatus for business processing, which can provide unified business processing rules in a templated manner, improve code versatility, reduce development costs, and improve development efficiency.

[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a service processing method is provided, including:

[0007] Obtaining business requirement information from received business processing requests;

[0008] Based on the business requirement information, match the business object corresponding to the business requirement information from the business routing instance list;

[0009] The business routing template is called according to the business object, and the business routing template is updated according to the business demand information, and the business processing is performed using the updated business routing template.

[0010] Optionally, matching a business object corresponding to the business demand information from the business routing instance list based on the business demand information includes:

[0011] Obtain the weight strategy corresponding to the business demand information; wherein the weight strategy includes a basic weight value and a custom weight value;

[0012] Calculate the priority of the business object in the business routing instance list based on the basic weight value and the custom weight value;

[0013] Sort the business objects according to their priorities, and match the business objects corresponding to the business requirement information based on the sorting results.

[0014] Optionally, before obtaining the weight strategy corresponding to the business requirement information, the following steps are also included:

[0015] Configure the weight strategy by defining annotations.

[0016] Optionally, before dynamically matching a business object corresponding to the business demand information from the business routing instance list based on the business demand information, the method further includes:

[0017] A matching method is determined based on the business demand information to match the business object corresponding to the business demand information from the business routing instance list according to the matching method; wherein the matching method includes business type matching, business field matching, business class name matching or business specified matching.

[0018] Optionally, after calling the business routing template according to the business object, it also includes:

[0019] In response to the call return result being a failure, an abnormal business field in the business object is queried and the abnormal business field is filtered.

[0020] Optionally, before using the updated service routing template to perform service processing, the method further includes:

[0021] The updated business routing template is subjected to business verification, and the business verification includes at least one of the following: basic field verification, data compliance verification, and permission verification.

[0022] Optionally, after performing service processing using the updated service routing template, the following steps are further included:

[0023] Generate business processing results to optimize business routing templates based on the business processing results.

[0024] According to a second aspect of an embodiment of the present invention, a service processing device is provided, including:

[0025] An acquisition module, used to acquire business demand information from a received business processing request;

[0026] A matching module, used to dynamically match the business object corresponding to the business demand information from the business routing instance list based on the business demand information and the weight strategy;

[0027] The processing module is used to call the business routing template according to the business object, update the business routing template according to the business demand information, and use the updated business routing template to perform business processing.

[0028] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, including:

[0029] one or more processors;

[0030] a memory for storing one or more programs,

[0031] When one or more programs are executed by one or more processors, the one or more processors are enabled to implement the method of any of the above embodiments.

[0032] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method of any of the above embodiments is implemented.

[0033] According to a fifth aspect of an embodiment of the present invention, there is provided a computer program product, including a computer program, which implements the method of any of the above embodiments when the computer program is executed by a processor.

[0034] An embodiment of the above invention has the following advantages or beneficial effects: by obtaining business requirement information from a received business processing request; matching the business object corresponding to the business requirement information from a business routing instance list based on the business requirement information; calling the business routing template according to the business object, and updating the business routing template according to the business requirement information, and performing business processing using the updated business routing template; thereby providing unified business processing rules in a templated manner, improving code versatility, reducing development costs, and improving development efficiency.

[0035] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0037] Figure 1 is a schematic diagram of the main flow of the service processing method according to an embodiment of the present invention;

[0038] Figure 2 It is a schematic diagram of the main flow of a method for business processing according to a reference embodiment of the present invention;

[0039] Figure 3 is a schematic diagram of the main flow of a method for business processing according to a preferred embodiment of the present invention;

[0040] Figure 4 is a schematic diagram of main modules of a device for service processing according to an embodiment of the present invention;

[0041] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0042] Figure 6 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0044] It should be noted that the acquisition, storage and application of personal information etc. involved in the embodiments of the present invention are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0045] The existing business processing method is to develop business logic according to different business needs, and call the business logic from the application programming interface in sequence to complete the implementation of business processing needs. When facing different business processing needs, there is no unified business processing rule, and the code style is not unified and the versatility is poor, resulting in high development costs and low development efficiency.

[0046] In view of this, according to one aspect of an embodiment of the present invention, a service processing method is provided.

[0047] Figure 1 FIG. 1 is a schematic diagram of the main flow of the method for business processing according to an embodiment of the present invention. Figure 1 As shown, the service processing method according to the embodiment of the present invention includes the following steps S101 to S103.

[0048] Step S101, obtaining business requirement information from a received business processing request.

[0049] Among them, the business processing request refers to the relevant processing request received by the system during operation, including the specific business requirements processed by the system. The business processing request can come from user operations, calls from other systems, or timed task triggers. The specific content includes various parameters, instructions, and data. For example, a business processing request of an e-commerce platform can be a user order request, a payment request, or a product query request, etc. Business demand information refers to the information required for the specific business logic extracted from the business processing request. It can be the data and instructions that determine how the system executes the business logic during the business processing process. The business demand information may include user ID (IDentity, identifier), product ID, quantity, payment method, timestamp, etc. In different business scenarios, the specific content of the business demand information is different, and the embodiments of the present invention do not make specific limitations.

[0050] Specifically, the business requirement information can be obtained from the received business processing request by parsing the data of the business processing request. The data format of the business processing request data can be JSON (JavaScript Object Notation), XML (eXtensible Markup Language), form data, etc. First, the business processing request data is parsed to extract the key fields in the business processing request data, and then the key fields are converted into business requirement information. For example, for an order request in JSON format, the JSON data can be parsed to extract fields such as user ID, product ID and quantity, and a business requirement information object can be constructed.

[0051] Step S102: matching a business object corresponding to the business demand information from a business routing instance list based on the business demand information.

[0052] Among them, the business routing instance list is a collection of all available business processing instances in the system. Business processing instances are used to process different business logics, and each business processing instance corresponds to a specific business implementation class. The business routing instance list can be pre-configured or dynamically loaded when the system starts. Business processing instances are initialized according to different business requirements and called according to specific business requirements at runtime. Business objects are instances of specific business processing classes, including methods and properties that implement specific business logic. When a business processing request is received, it is necessary to query the appropriate business object to process the request. The business object can be an order processing class, a payment processing class, a user management class, etc., which are responsible for processing different types of business requirements.

[0053] Specifically, the system matches the appropriate business object in the business routing instance list according to the business processing requirement information. The matching process can be based on multiple strategies, such as business type, priority, weight, etc. For example, the system can filter business objects by business type and find the instance that matches the requirement information from the business routing instance list. If multiple instances meet the conditions, the system can further select the business object with the highest priority according to the weight or other strategies. It is also possible to query the business object that matches the business requirement information in the business routing instance list through a predefined mapping relationship or search method. For example, the key fields in the business requirement information can be associated with the business routing instance through a mapping table. The mapping table can be in the form of a key-value pair, where the key is the key field in the business requirement information (such as business type, operation type, etc.), and the value is the corresponding business routing instance. The system can extract the business type field to find the corresponding business object in the mapping table. If multiple business objects that meet the conditions are found, they can also be further filtered and sorted based on strategies such as weight or priority, and finally the most appropriate business object is selected for processing.

[0054] Step S103: calling the service routing template according to the service object, updating the service routing template according to the service demand information, and performing service processing using the updated service routing template.

[0055] Among them, the business routing template can be a predefined framework or structure for unifying the methods and processes for processing different business logics. The business routing template can contain basic functions such as general business logic, parameter processing, and data validation, while the specific business processing logic is implemented by specific business objects. The business routing template can provide a standardized interface so that different business objects can be called and managed in the same way, thereby simplifying the business processing process and improving the versatility, reusability, and maintainability of the code.

[0056] Specifically, an abstract business routing template class can be defined, which contains common business processing methods and process frameworks. Specific business processing classes need to inherit this template class and implement its abstract methods. The business routing template class can contain some common methods, such as parameter validation, logging, etc., and provide an abstract process method for specific business processing classes to implement their specific business logic. The route method of the business routing template is called through the business object. The route method first performs some common business processing, such as parameter validation and logging, and then calls the process method of the business object to execute specific business logic. In the process of calling the business routing template, the parameters and configurations in the business routing template can be dynamically updated according to the business demand information to adapt to different business scenarios. For example, different processing parameters can be set according to the business demand information, the log level can be adjusted, or different verification strategies can be selected. The updated business routing template will be used to execute specific business processing logic to ensure that business requests are processed correctly.

[0057] The embodiment of the present invention obtains business demand information from a received business processing request; matches the business object corresponding to the business demand information from a business routing instance list based on the business demand information; calls a business routing template according to the business object, updates the business routing template according to the business demand information, and uses the updated business routing template to perform business processing; thereby providing unified business processing rules in a templated manner, improving code versatility, reducing development costs, and improving development efficiency.

[0058] Optionally, Figure 2 FIG. 1 is a schematic diagram of the main flow of a method for business processing according to a reference embodiment of the present invention. Figure 2As shown, matching the business object corresponding to the business demand information from the business routing instance list based on the business demand information includes steps S201 to S203.

[0059] Step S201, obtaining a weight strategy corresponding to the business demand information; wherein the weight strategy includes a basic weight value and a custom weight value.

[0060] Step S202: Calculate the priority of the service object in the service routing instance list based on the basic weight value and the custom weight value.

[0061] Step S203: sort the business objects according to the priorities, and match the business objects corresponding to the business demand information based on the sorting results.

[0062] Specifically, the weight strategy corresponding to the business requirement information can be obtained from the configuration or database. The weight strategy includes a basic weight value and a custom weight value. The basic weight value is a predefined default weight that can be configured when the system is initialized to set the basic weight for different types of business requirements. The custom weight value can be configured according to specific business scenarios and requirements and stored in the configuration file or database, and the corresponding custom weight value is found according to the key fields in the business requirement information. Specifically, the business requirement information is parsed and the key fields are extracted; the corresponding basic weight value and custom weight value are found in the configuration or database according to the key fields; the basic weight value and the custom weight value are combined to form the final weight strategy, which can flexibly and dynamically adjust the weight strategy according to different business needs and scenarios to improve the efficiency of business processing.

[0063] After obtaining the weight strategy, the priority of each business object in the business routing instance list is calculated based on the weight strategy. The priority can be calculated by weighting the basic weight value and the custom weight value, or by comparing the weights based on the difference between the basic weight value and the custom weight value to generate a comprehensive weight value. The comprehensive weight value represents the relative importance and priority of each business object in the current business scenario.

[0064] By sorting the business objects in the business routing instance list according to the calculated comprehensive weight value, the business objects can be arranged from high to low priority, so that the business object with the highest priority can match and process the business demand information first. Try to match the business demand information one by one according to the sorting results. When a business object with the highest priority that can handle the current business demand is found, the matching process is completed and the business object is used for actual business processing. In this way, business demands can be processed by the most appropriate and highest priority business object first, which improves the efficiency and accuracy of business processing, flexibly responds to different business demands, and optimizes processing according to dynamically changing weight strategies.

[0065] Optionally, before obtaining the weight strategy corresponding to the business requirement information, the method further includes: configuring the weight strategy by defining annotations.

[0066] Specifically, an annotation can be defined to mark the weight value of a business processing class or method. The annotation can contain two attributes: a basic weight value and a custom weight value, so that the priority of different business processes can be flexibly configured. The above attributes can be defined using annotation metadata, and the annotation can be applied to the corresponding business processing class or method. When a business processing request arrives at the system, the business processing class or method annotated with the annotation is scanned through the reflection mechanism to extract the weight value in the annotation; after parsing the business requirement information, the system matches the specific business processing class or method according to the key fields in the business requirement information, and reads its weight annotation information.

[0067] By defining annotation configuration, you can directly define weight strategies on business processing classes or methods, making the code structure clearer and the configuration more intuitive. It is easy to define and adjust weight strategies in the code without frequently modifying configuration files or databases. This improves the readability and maintainability of the code, making the definition and use of weight strategies more flexible and dynamic.

[0068] In the specific implementation process, the business processing class or method declares its own weight strategy in the form of annotations. When the system loads these classes or methods, it uses the reflection mechanism to parse the annotation information, obtain the corresponding basic weight value and custom weight value, and use these weight values ​​for subsequent business object priority calculation and matching. This annotation-based configuration method effectively combines the definition of weight strategy with business processing logic, simplifies system configuration management, and improves the efficiency and flexibility of business processing.

[0069] Optionally, the weight strategy is configured through a configuration file. The weight strategy is stored in the configuration file in the form of a key-value pair. The system loads the configuration file at startup and reads the weight strategy therein into the memory. When a business processing request arrives, the corresponding weight strategy is searched from the memory according to the key fields in the business demand information to obtain the basic weight value and the custom weight value. Optionally, the weight strategy is configured through a database. The weight strategy is stored in a table in the database, and each record corresponds to a weight strategy for a business type or operation type. When the system is running, it obtains the corresponding weight strategy through a database query. When the weight strategy needs to be updated, only the database table record needs to be updated without modifying the code or configuration file. The weight strategy can be configured in a suitable manner according to specific business needs and system architecture, and the embodiments of the present invention do not make specific limitations.

[0070] Optionally, before dynamically matching the business object corresponding to the business requirement information from the business routing instance list based on the business requirement information, it also includes: determining a matching method based on the business requirement information, so as to match the business object corresponding to the business requirement information from the business routing instance list according to the matching method; wherein the matching method includes business type matching, business field matching, business class name matching or business specified matching.

[0071] Specifically, a matching strategy or a set of rules can be defined to determine which matching method to use. The matching strategy can be determined based on the fields in the business demand information. For example, if the business demand information contains a business type field, the system can give priority to business type matching; if it contains a business field field, business field matching is selected. The definition of the matching strategy can be a static configuration or a dynamic logical judgment. Among them, the matching method can be dynamically determined by a matching strategy selector. The matching strategy selector dynamically selects a suitable matching method according to the fields and contents in the business demand information. The order of the matching methods can also be determined by priority sorting so that the most suitable strategy is applied first. For example, the business type matching can be set to the highest priority. When the business demand information contains a business type field, the business type matching method is preferred. When the matching method is determined, the corresponding business object is searched from the business routing instance list according to the selected matching method. For example, if the business type matching method is selected, the system will traverse the business routing instance list to find the business object whose business type is consistent with the business type field in the business demand information. In this way, the most suitable matching method can be determined flexibly and dynamically, which improves the flexibility and adaptability of business processing.

[0072] Among them, in the business type matching, the business type field in the business requirement information can be compared with the business type of each instance in the business routing instance list, and only business objects with the same business type will be regarded as matching objects. In the business domain matching, matching is performed according to the business domain field in the business requirement information. The business domain refers to a collection of a certain type of business, such as finance, e-commerce, etc.; the business domain in the business requirement information is compared with the business domain in the business routing instance list, and business objects belonging to the same business domain are matched. In the business class name matching, matching is performed according to the business class name field in the business requirement information. The business class name refers to the name or identifier of a specific business processing class. It is compared with the class name in the business routing instance list to match business objects with the same name. In the business specified matching, matching is performed according to the specific business identifier in the business requirement information. The business identifier can be a user ID, order number or other unique identifier. It is compared with the business identifier in the business routing instance list to find a completely matching business object.

[0073] Optionally, after calling the business routing template according to the business object, the method further includes: in response to the call return result being failure, querying abnormal business fields in the business object and filtering the abnormal business fields.

[0074] Specifically, when calling a business routing template or method (such as a route method) of a business object, monitor the call return result of the method. If the call return result indicates that the operation failed, the exception handling process can be started. At this time, the abnormal business field defined in the business object can be queried. The abnormal business field is a field used to record and describe problems in the business execution process, such as error code, error message, exception type, etc. Through reflection or predefined method interfaces, access the abnormal business field in the business object. The abnormal business field can be defined and stored through annotations, configuration files, or special methods inside the business object. By accessing the abnormal business field, detailed abnormal information can be collected. After collecting the abnormal business field, filter the abnormal business field. The filtering process can delete duplicate abnormal information and clean invalid or incorrectly formatted data; the abnormal information can also be classified and graded according to different categories and severity levels, so that the system can quickly identify and prioritize serious problems; pattern matching algorithms or rule engines can also be used to analyze abnormal information to find the root cause and solution of the problem.

[0075] Optionally, before using the updated business routing template for business processing, it also includes: performing business verification on the updated business routing template, and the business verification includes at least one of the following: basic field verification, data compliance verification and authority verification.

[0076] Among them, basic field verification is to verify whether the basic fields in the business routing template meet specific formats and requirements, including non-empty verification of fields, data type verification and field length verification, etc. For example, check whether certain key fields are empty, whether numeric fields are valid numbers, and whether the length of string fields is within the allowed range. Data compliance verification is to verify whether the data in the business routing template complies with business rules and specifications. For example, some business rules require that the value of a specific field must be within a certain range, or that a certain relationship must be satisfied between field values ​​(such as the order of dates); a set of business rules can be predefined to verify the updated business routing template through the rule engine or verification logic. If the data is found to be non-compliant, the system can record error information and trigger corresponding processing mechanisms, such as rollback operations or prompt users to make corrections. Permission verification is to verify whether the current user or operation has the authority to perform the corresponding business, including checking user roles, permission levels and specific operation permissions; permission verification can be implemented through access control lists, role permission mappings or permission management modules. When performing permission verification, check whether the current user has the authority to access or modify specific data in the business routing template or perform specific operations. If the permission verification fails, the operation is blocked and a prompt message of insufficient permissions is returned. By verifying the updated business routing template, the correctness and security of the business routing template can be improved, and potential business risks and data errors can be effectively prevented, thereby ensuring the smooth progress of the business processing flow.

[0077] Optionally, after performing service processing using the updated service routing template, the method further includes: generating a service processing result, so as to perform service routing template optimization processing based on the service processing result.

[0078] Among them, the business processing results include detailed information of the business processing. Specifically, the required execution information is obtained in each key step of the business processing, such as the processing status (success or failure), processing time, return data and error information, etc. After the business processing is completed, this information is integrated into a unified result object, which can be a structured data format or an unstructured data format; the result object is recorded in a log file or a database. After the business processing results are generated, the bottlenecks and problems that may exist in the processing process are identified by analyzing the business processing results. For example, the system can count the processing success rate, average processing time, and the frequency and type of errors. Based on these data, it is determined which business routing templates perform well and which need to be improved. This can be achieved by using a feedback mechanism. The feedback mechanism takes the business processing results as input and automatically adjusts the configuration and logic of the business routing template. The optimization processing can adjust the weight strategy, optimize the business logic and parameter configuration, and improve the exception handling mechanism, etc., which can quickly respond to changing business needs and maintain an efficient and stable operating state.

[0079] Figure 3 It is a schematic diagram of the main process of the method for business processing according to the preferred embodiment of the present invention. A preferred embodiment of the present invention is based on the idea of ​​dynamic proxy, dynamically loads subclass instances inherited from the abstract routing class, dynamically completes the creation of the routing implementation class instance encapsulated by the component, and the routing implementation class loads all configured business class instances through the sorting strategy class, and obtains the weight value configured by the business through annotation from the business implementation class, and sorts the business instances in descending order according to the weight value (the weight value is from large to small), and can be weighted according to the call volume of different businesses or the importance of business links. The higher the call volume or the more core the business link, the larger the weight value configuration, which can speed up the acquisition of business instance objects. When the business is in use, it directly obtains the routing implementation class instance object provided by the component, and calls route(), validate(), and doProcces() methods in sequence according to the use requirements to complete business routing, basic verification and business processing.

[0080] Specifically, the abstract routing class implements the business and provides the basic capabilities of the business through templates, including business routing strategies, basic verification and business logic processing, etc. At the same time, it provides business class weight configuration annotations to provide sorting capabilities for business implementation classes. Components load business instances in priority according to weight values ​​and flexibly configure data caches according to the size of weight values. Use dynamic proxy and reflection to dynamically load the created business routing instance objects. When creating routing implementation class objects through configuration files, use the weightList (weight list) attribute for injection to obtain all routing instances of the business. The provided routing implementation class implements routing matching based on routing sorting strategies (weight ideas and reflection ideas). The routing implementation class provides a route() method. The method takes in the Route Comparison Domain (route comparison domain) to provide multiple types of matching methods, such as business type, business field (such as goods, orders, inventory) and business class name. The route() method internally obtains the business routing implementation class instance through the business-defined business type or business field dictionary value, or through reflection, according to the matching method specified by the business (enumeration), and returns a specific business class to the business. The business completes the subsequent logic according to actual needs.

[0081] The weight strategy class provides a method for calculating weights. The default weight value is 1. The weight value is defined according to the weight annotation used by the business routing implementation class. The difference between the default weight value and the business-defined weight value is used for weight comparison. It is used to calculate the priority ratio of multiple business classes and sort the calculation results. At the same time, in the routing implementation class, the sorted business routing objects are obtained from the weightList first, and the objects are cached to improve the retrieval speed of business routing objects and the coordination of hot and cold resources.

[0082] The abstract routing class inherits the abstract strategy class, and the abstract strategy class inherits the weight strategy to implement the basic routing interface. The basic routing interface provides business routing route(), basic validation validate(), and business processing doProcess() template methods. After the business inherits the abstract routing, the relevant methods are updated according to specific business needs. The route() method returns a boolean type result. The route() method can be further judged by the business. After entering the current business routing class, it is filtered according to the business-specific fields to determine whether the next logical processing is required; validate() is a method for business validation, including basic field validation, data compliance validation, and permission validation. After the validation passes, it enters doProcess(), which performs business logic processing and returns a success or failure code and business data.

[0083] The routing implementation class extends the routing sorting strategy, dynamically loads the business routing instance, injects the business routing instance through IOC (Inversion of Control), and returns the corresponding business object matched from the weightList according to the routing strategy of the business configuration.

[0084] The access of the business system relies on the component jar (Java Archive, archive file) of the present invention. It only needs to write a specific business class according to the actual business system requirements, inherit from the abstract routing class provided by the component, rewrite the relevant methods, instantiate the business class object, use the weight annotation on the business class to define the weight value of the current business class, and obtain the business object based on the weight value in the routing implementation class. When the business is used, the routing implementation class object is directly created and the route() method is called. The routing implementation class implements the business inside the component.

[0085] The embodiment of the present invention realizes business capability template based on the weight configuration, routing strategy and dynamic proxy of business implementation. The components of the business system accessing the embodiment of the present invention only need to implement the abstract routing class of the component according to their own business characteristics, rewrite the business routing method route(), the basic verification method validate() and the business processing method doProcces(), and the business implementation can complete the routing forwarding of the business implementation class with zero code intrusion. There is no need for repeated coding in general, and the access system does not need to pay attention to the underlying implementation, which is simple and efficient.

[0086] According to a second aspect of the embodiment of the present invention, Figure 4 As shown, a service processing device 400 is provided, including:

[0087] The acquisition module 401 is used to acquire the business demand information from the received business processing request;

[0088] A matching module 402, configured to dynamically match a business object corresponding to the business demand information from a business routing instance list based on the business demand information and a weight strategy;

[0089] The processing module 403 is used to call the business routing template according to the business object, update the business routing template according to the business demand information, and use the updated business routing template to perform business processing.

[0090] Optionally, the matching module 402 is further configured to:

[0091] Obtain the weight strategy corresponding to the business demand information; wherein the weight strategy includes a basic weight value and a custom weight value;

[0092] Calculate the priority of the business object in the business routing instance list based on the basic weight value and the custom weight value;

[0093] Sort the business objects according to their priorities, and match the business objects corresponding to the business requirement information based on the sorting results.

[0094] Optionally, the service processing device 400 further includes a configuration module, and the configuration module is used to:

[0095] Configure the weight strategy by defining annotations.

[0096] Optionally, the service processing device 400 further includes a determination module, and the determination module is used to:

[0097] A matching method is determined based on the business demand information to match the business object corresponding to the business demand information from the business routing instance list according to the matching method; wherein the matching method includes business type matching, business field matching, business class name matching or business specified matching.

[0098] Optionally, the service processing device 400 further includes a filtering module, and the filtering module is used to:

[0099] In response to the call return result being a failure, an abnormal business field in the business object is queried and the abnormal business field is filtered.

[0100] Optionally, the service processing device 400 further includes a verification module, and the verification module is used to:

[0101] The updated business routing template is subjected to business verification, and the business verification includes at least one of the following: basic field verification, data compliance verification, and permission verification.

[0102] Optionally, the service processing device 400 further includes an optimization module, and the optimization module is used to:

[0103] Generate business processing results to optimize business routing templates based on the business processing results.

[0104] It should be noted that the specific implementation content of the device for business processing in the present invention has been described in detail in the above business processing method, so the repeated content will not be described again here.

[0105] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors; a storage device for storing 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 method provided by the first aspect of the embodiment of the present invention.

[0106] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention is implemented.

[0107] According to a fifth aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention is implemented.

[0108] Figure 5 An exemplary system architecture 500 is shown to which the business processing method or business processing apparatus according to the embodiments of the present application can be applied.

[0109] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0110] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0111] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0112] The server 505 may be a server that provides various services, such as a background management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 501, 502, and 503. The background management server may analyze and process the received data such as software startup requests, and feed back the processing results (such as business processing results - only an example) to the terminal device.

[0113] It should be noted that the business processing method provided in the embodiment of the present application is generally executed by the server 505 , and accordingly, the business processing device is generally set in the server 505 .

[0114] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0115] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present application. Figure 6 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0116] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0117] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0118] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present application are executed.

[0119] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. Computer-readable storage media may include, for example, but are not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0120] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0121] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes an acquisition module, a processing module and a matching module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the acquisition module may also be described as "a module for obtaining business demand information from a received business processing request".

[0122] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining business demand information from a received business processing request; matching a business object corresponding to the business demand information from a business routing instance list based on the business demand information; calling a business routing template according to the business object, and updating the business routing template according to the business demand information, and using the updated business routing template to perform business processing.

[0123] The computer program product provided by the embodiment of the present invention includes a computer program. When the computer program is executed by a processor, the service processing method in the embodiment of the present invention is implemented.

[0124] The technical solution according to the embodiment of the present invention has the following advantages or beneficial effects: by obtaining business requirement information from the received business processing request; matching the business object corresponding to the business requirement information from the business routing instance list based on the business requirement information; calling the business routing template according to the business object, and updating the business routing template according to the business requirement information, and using the updated business routing template to perform business processing; thereby providing unified business processing rules in a templated manner, improving the versatility of the code, reducing development costs, and improving development efficiency.

[0125] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

[0126] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

Claims

1. A business processing method, characterized in that: include: Obtaining business requirement information from received business processing requests; Based on the business demand information, matching the business object corresponding to the business demand information from the business routing instance list; The business routing template is called according to the business object, and the business routing template is updated according to the business demand information, and the business processing is performed using the updated business routing template.

2. The method according to claim 1, characterized in that: Matching a business object corresponding to the business demand information from a business routing instance list based on the business demand information includes: Obtaining a weight strategy corresponding to the business demand information; wherein the weight strategy includes a basic weight value and a custom weight value; Calculate the priority of the service object in the service routing instance list based on the basic weight value and the custom weight value; The business objects are sorted according to the priorities, and the business objects corresponding to the business demand information are matched based on the sorting results.

3. The method according to claim 2, characterized in that Before obtaining the weight strategy corresponding to the business demand information, the method further includes: The weight strategy is configured by defining annotations.

4. The method according to claim 1, characterized in that: Before dynamically matching the business object corresponding to the business demand information from the business routing instance list based on the business demand information, the method further includes: A matching method is determined based on the business demand information to match the business object corresponding to the business demand information from the business routing instance list according to the matching method; wherein the matching method includes business type matching, business field matching, business class name matching or business specified matching.

5. The method according to claim 1, characterized in that After calling the business routing template according to the business object, it also includes: In response to the call returning a failure result, querying the abnormal business field in the business object, and filtering the abnormal business field.

6. The method according to claim 1, characterized in that Before using the updated business routing template to process business, it also includes: The updated business routing template is subjected to business verification, wherein the business verification includes at least one of the following: basic field verification, data compliance verification, and authority verification.

7. The method according to claim 1, characterized in that After using the updated business routing template for business processing, it also includes: Generate a service processing result to perform service routing template optimization processing based on the service processing result.

8. A device for business processing, characterized in that: include: An acquisition module, used to acquire business demand information from a received business processing request; A matching module, used for dynamically matching a business object corresponding to the business demand information from a business routing instance list based on the business demand information and a weight strategy; The processing module is used to call the business routing template according to the business object, update the business routing template according to the business demand information, and use the updated business routing template to perform business processing.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.