CN109783562B - Service processing method and device - Google Patents

Service processing method and device Download PDF

Info

Publication number
CN109783562B
CN109783562B CN201910043576.9A CN201910043576A CN109783562B CN 109783562 B CN109783562 B CN 109783562B CN 201910043576 A CN201910043576 A CN 201910043576A CN 109783562 B CN109783562 B CN 109783562B
Authority
CN
China
Prior art keywords
service
request
logic function
service logic
business
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910043576.9A
Other languages
Chinese (zh)
Other versions
CN109783562A (en
Inventor
汪艺珂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Wodong Tianjun Information Technology Co Ltd
Priority to CN201910043576.9A priority Critical patent/CN109783562B/en
Publication of CN109783562A publication Critical patent/CN109783562A/en
Application granted granted Critical
Publication of CN109783562B publication Critical patent/CN109783562B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a business processing method and device, and relates to the technical field of computers. One embodiment of the method comprises the following steps: receiving a network request transmitted by a client, and determining a service logic function for processing the network request according to a request path and a request method in the network request; and calling the service logic function, inputting the service data in the network request into the service logic function, and receiving a processing result fed back by the service logic function to return to the client. The implementation mode unifies the organization structure of the service module and the realization mode of the service logic function, so that the code structure is clear, the unified management of the system architecture is convenient when a plurality of people develop the service system, and the maintenance cost is reduced; and the non-business frames can be directly multiplexed, so that the interaction between the business modules and the non-business frames is facilitated, and the development efficiency is further improved.

Description

Service processing method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a service processing method and apparatus.
Background
Js is a platform established based on chrome. Javascript runtime, and is used for conveniently building network application with fast response speed and easy expansion. And node. Js is a technical scheme of full stack development, and has rich and mature server end frameworks, such as an express framework based on asynchronous callback, a koa framework based on asynchronous function and the like. The method is characterized in that after the middleware of a developed or open source business module or a non-business module is loaded, the operation service of a certain port is monitored.
The business module contains a number of different business logics, each of which involves a series of interactions with a database or external interface. And non-business modules (connection of databases, authentication, authority control, journals, collection of journals, garbage cleaning, exception handling, concurrency control, etc.) are indispensable and identical in functions in different systems.
In carrying out the present invention, the inventors have found that at least the following problems exist in the prior art:
when a business system is developed by using basic interfaces (such as loading middleware, routing, monitoring, etc.) provided by frames such as express, koa, etc., non-business modules and business modules are mixed together, so that:
1) The business module has no fixed organization structure and implementation form, and each developer has respective development habit, so that error repair or later maintenance is difficult;
2) The non-business modules can not be directly multiplexed to other business systems, and development efficiency and code multiplexing capability are reduced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a service processing method and apparatus, which at least can solve the problem that in the prior art, a service module does not have a fixed organization structure and an implementation form, and a non-service module does not have reusability.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a service processing method, including:
receiving a network request transmitted by a client, and determining a service logic function for processing the network request according to a request path and a request method in the network request;
and calling the service logic function, inputting the service data in the network request into the service logic function, and receiving a processing result fed back by the service logic function to return to the client.
Optionally, before the receiving the network request transmitted by the client, the method further includes:
the method comprises the steps of receiving a tree structure transmitted by a service module, determining a root node and a child node in the tree structure, and determining a path traversing from the root node to the child node as a request path;
and according to the request name and the service logic function contained in the child node, combining the determined request path, and establishing a corresponding relation among the request path, the request name and the service logic function.
Optionally, the inputting the service data in the network request into the service logic function further includes: analyzing the service type of the service data and determining a single-instance object corresponding to the service data; and obtaining the address information of the single object, and inputting the address information into the service logic function.
Optionally, the request name includes one of acquisition, new creation, deletion, and modification.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a service processing apparatus including:
the request receiving module is used for receiving a network request transmitted by a client, and determining a service logic function for processing the network request according to a request path and a request device in the network request;
and the service processing module is used for calling the service logic function, inputting the service data in the network request into the service logic function, and receiving the processing result fed back by the service logic function to return to the client.
Optionally, the method further comprises a relationship establishing module for:
the method comprises the steps of receiving a tree structure transmitted by a service module, determining a root node and a child node in the tree structure, and determining a path traversing from the root node to the child node as a request path;
and according to the request name and the service logic function contained in the child node, combining the determined request path, and establishing a corresponding relation among the request path, the request name and the service logic function.
Optionally, the service processing module is further configured to: analyzing the service type of the service data and determining a single-instance object corresponding to the service data; and obtaining the address information of the single object, and inputting the address information into the service logic function.
Optionally, the request name includes one of acquisition, new creation, deletion, and modification.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a service processing electronic device.
The electronic equipment of the embodiment of the invention comprises: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the service processing method.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements any of the above-described service processing methods.
According to the solution provided by the present invention, one embodiment of the above invention has the following advantages or beneficial effects: the code structure is clear and the maintenance cost is reduced by fixing the organization structure and the implementation form in the service module; and the non-business frames can be directly multiplexed, so that the interaction between the business modules and the non-business frames is facilitated, and the development efficiency is further improved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic flow diagram of a service processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a business module organization containing four business logics;
FIG. 3 is a pseudo-code schematic of an exemplary business logic function;
FIG. 4 is a schematic flow diagram of an alternative business processing method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the overall implementation of the present invention;
fig. 6 is a schematic flow chart of a service processing device according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 8 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments of the present invention are applicable to general Web service systems, such as advertisement delivery service systems.
The invention is mainly used for describing the node. Js language:
first, node. Js is based on high concurrency of event loops, which does not itself have the concept of multithreading, so this architecture, which appears to be a synchronous task, is actually able to handle high concurrency requests, but other languages cannot. Second, the objects in the node are of a dynamic type, which also provides convenience for the business logic tree structure.
The event cycle here is: the asynchronous tasks are triggered on the main thread in sequence, and the main thread does not wait for the completion result of the tasks; a task queue exists besides the main thread; placing an event in the task queue as long as the asynchronous task has an operation result; once the main thread has no task to be triggered, the system reads the task queue, and puts the events in the queue into the main thread to be sequentially executed; the main thread reads events from the task queue and this process loops around.
The words related to the present invention are explained as follows:
javascript: a high-level, interpreted programming language.
HTTP: the hypertext transfer protocol is an application layer protocol for distributed, collaborative, and hypermedia information systems.
Express is a compact and flexible node. Js Web application framework that provides a series of powerful features that help create a variety of Web applications and rich HTTP tools. A fully functional website can be quickly built using Express.
Koa is a Web development framework similar to Express, and is mainly characterized by using the Generator function of ES6 to redesign the framework. That is, the principle and internal structure of Koa are much like Express, but syntax and internal structure are upgraded.
Service code: code for implementing the user's needs. For example, if the user needs to query a certain data, the user directly queries the database and returns the result, namely the service code.
Non-business code: the auxiliary service code can be generally separated from the service, such as a code which exists when a user inquires certain data, chinese messy codes possibly appear when receiving user input, and the code for solving the Chinese messy codes is not directly contained in the purpose of the user, can be separated from the current service and applied to other services, and is a non-service code.
Referring to fig. 1, a main flowchart of a service processing method provided by an embodiment of the present invention is shown, including the following steps:
s101: receiving a network request transmitted by a client, and determining a service logic function for processing the network request according to a request path and a request method in the network request;
s102: and calling the service logic function, inputting the service data in the network request into the service logic function, and receiving a processing result fed back by the service logic function to return to the client.
In the above embodiment, for step S101, the non-business framework includes a plurality of non-business modules. The invention is mainly described in terms of a non-business framework.
Network requests are typically diverse, e.g., HTTP requests, HTTPs requests, and the present invention is primarily described in terms of HTTP requests.
When the server receives a certain HTTP request transmitted by a requester (e.g., a client), the non-service framework first parses a path of a uniform resource locator (referred to as a request path) in the request and a request method.
The service module comprises an organization structure, wherein the organization structure comprises a service logic function, a request name and a request path, and the whole structure forms a tree structure. The non-business framework forms HTTP request paths+HTTP verbs by traversing the tree structure from the root node of the tree to the path of the business function (leaf node). All leaf nodes are traversed, and a dictionary (which can be understood as a corresponding relation) of path + file name- > file content (business function) is established.
The request method mainly comprises get, post, delete, put, and the corresponding meanings are acquisition, new creation, deletion and modification respectively, and specifically refer to fig. 2, which shows a service module organization structure containing four service logics.
It should be noted that the number of request methods in the organization structure is not limited in the present invention, and the method shown in fig. 2 is only a simple example.
Therefore, when an HTTP request is received, the subsequent non-business framework can be positioned on the correct business logic function according to the request path and the request method in the network request, so that the subsequent call is convenient. Assuming that a request method is an HTTP request with POST and path of/api/adv, the non-business framework searches the dictionary for a business logic function with key of/api/adv/@ POST.
For step S102, after determining the service logic function, the service logic function may be called, for example, a service logic function of a new creation of the/api/adv/@ POST is called, and service data (for example, a user needs to query a certain data) in the current request is input to the service logic function, and a function execution result is waited and returned to the current requester.
However, if the business logic function is abnormal in the execution process, the non-business framework captures the abnormality and performs the abnormality processing in a centralized manner.
It should be noted that, the anomaly detection and the anomaly processing are mature technologies in the field, and a special anomaly processing mechanism exists in the non-business framework, so that anomalies are divided into two types, namely, capturable anomalies and uncapturable anomalies. If the business logic function is in error due to some parameter verification and the like, the business logic function can directly throw out the abnormality through throw; it is generally known that there is no processing result for a long time, which is a timeout exception, and is also handled automatically by a non-business framework, and business functions are not concerned.
For centralized processing of exceptions, the exception information is typically returned to the requestor or logged and the service restarted after alerting. In addition, the restart of the service is also part of the non-business framework.
In addition to the service data, the non-service framework may also input address information of an instance or a single instance object in the non-service module to the service logic function to perform request processing.
Non-business module singleton objects are explained here: a singleton object is the only one instantiated non-business module in the system operating environment.
Object-oriented programming is now commonly used, where an object is a module (including member data and member methods) that can implement a single independent function, such as a logging object, garbage collection object, database connection pool object, and so forth. The collection of various functional objects and the invocation of these objects constitute a non-business framework. Each object occupies a certain storage space in the computer memory, and a single object is to ensure that the object has only one and only one in the current running environment.
At service start-up, the non-business framework instantiates all non-business modules in memory to create these singleton objects. Once an HTTP request comes, the non-service framework finds a corresponding service logic function according to the request path+the request method and calls the function, and the two parameters are transferred to the function, wherein the first parameter is service data, and the second parameter is the address of the single object in the memory (also regarded as a pointer, and the reference of the single object is convenient to understand).
Based on the addresses of the singleton objects, the business logic function can find the singleton objects in memory. Compared with a non-business framework, the method extracts the single-case object and transmits the single-case object to the business logic function, and improves the acquisition speed of the business logic function on the single-case object.
And processing the service data of the HTTP request by using the member data and the member methods in the single-instance objects, some data methods in the function and the like, and finally returning a processing result. Referring to fig. 3, pseudocode for a typical business logic function is shown.
The number of single-case objects is large, so that for the single-case objects, only the service type which is associated with the service data and is based on the service data can be acquired. For example, the logger may automatically record data of the service function, and the non-service framework may also transmit a reference (i.e., address information) of the logging object to the service function, which may be convenient for custom recording of the required log information.
In addition, the address information of all single-instance objects in the non-business framework can be acquired, so that business logic functions can call all single-instance objects from the memory according to the address information; furthermore, the single-instance objects can be obtained and directly/selectively used, so that the need of obtaining the single-instance objects from a memory when some functions are used later is avoided.
It should be noted that, when the service is started, the non-service framework links the database, and when the service logic function is called, the linked database object is transferred to the non-service framework together with the request to be processed.
In summary, the service logic function further includes an implementation form thereof: and inputting references of single-instance objects of service data and non-service modules, namely calling the same object each time, returning a processing result of the data, and directly throwing out errors if abnormality occurs.
The method provided by the embodiment provides a business system architecture based on node. Js, wherein the business system architecture is separated from a non-business module, and the code structure is clear by fixing the organization structure and the implementation form in the business module, so that the maintenance cost is reduced; and the non-business frames can be directly reused, so that interaction between the business modules and the non-business frames is facilitated, development cost is reduced, and development efficiency is improved.
Referring to fig. 4, a main flowchart of an alternative service processing method provided by an embodiment of the present invention is shown, including the following steps:
s401: the method comprises the steps of receiving a tree structure transmitted by a service module, determining a root node and a child node in the tree structure, and determining a path traversing from the root node to the child node as a request path;
s402: according to the request name and the service logic function contained in the child node, combining the determined request path, and establishing a corresponding relation among the request path, the request name and the service logic function;
s403: receiving a network request transmitted by a client, and determining a service logic function for processing the network request according to a request path and a request method in the network request;
s404: and calling the service logic function, inputting the service data in the network request into the service logic function, and receiving a processing result fed back by the service logic function to return to the client.
In the above embodiment, for the steps S403 and S404, reference may be made to the descriptions of the steps S101 and S102 shown in fig. 1, and the descriptions are omitted here.
In the above embodiment, for steps S401 and S402, the service module includes an organization structure, in which, for convenience of management and subsequent query, each service logic is encapsulated into a Javascript function, and all the service logic functions are organized into a multi-tree structure (Javascript object).
In the tree structure, each tree node (non-leaf node) represents the name of a path, similar to a folder in a computer. Each service logic function is a leaf node on the tree structure, the name of the leaf node is "@ + HTTP request method", and the content is the service function (similar to the file name and the file content in a computer). For "@" here, other forms are possible, such as #, and #, as long as they function to distinguish between paths and request methods.
In the starting process of the server, the service module transmits the root node of the multi-tree structure to a non-service framework, and the non-service framework is actually the overall structure of the system, is similar to the framework of animals in different shapes, is irrelevant to service and can be reused.
After the non-business framework knows the root node of the tree, all business logic functions can be traversed, a path and HTTP verbs are respectively established in a dictionary of the business logic functions, or the corresponding relation of the path, the HTTP verbs and the business logic functions can be established.
The traversal method here may be depth-first traversal (Depth First Search) or breadth-first traversal (Breadth First Search):
1) For depth-first traversal, nodes of the tree are traversed along the depth of the tree to search branches of the tree as deep as possible;
2) For breadth-first traversal, also known as breadth-first or lateral-first search, a breadth-first traversal along the tree starts from the root node.
The two traversal methods are not identical, but the results are consistent, typically using a depth-first traversal method.
The business functions are organized together by a tree structure, forming HTTP request paths+HTTP verbs in the paths from the root nodes of the tree to the business functions (leaf nodes). The method is convenient to understand, can be regarded as a folder, and the folders nested layer by layer form a path; the name of the file in the folder is @ +http request method, the content in the file is a business function, and the folder at the outermost layer is the root node (described before). Traversing all files in the folder, and establishing a dictionary of path + file name- > file content (business function), wherein the whole structure is specifically shown in fig. 5.
In the mode, when a plurality of persons cooperate and develop, the organization structure and the realization form based on the service module are unified, and unified management of the system architecture can be realized. For example, the log records a single instance object log, and interfaces such as log, etc. are provided for the service logic function to use. The developer only needs to pay attention to the interfaces of other modules.
The method provided by the embodiment unifies the organization structure of the service module and the realization form of the service logic function, so that the code structure is clear, the unified management of the system architecture is convenient when a plurality of people develop the service system, and the maintenance cost is reduced.
Referring to fig. 6, a schematic diagram of main modules of a service processing apparatus 600 provided by an embodiment of the present invention is shown, including:
a request receiving module 601, configured to receive a network request transmitted by a client, and determine a service logic function for processing the network request according to a request path and a request device in the network request;
and the service processing module 602 is configured to call the service logic function, input service data in the network request to the service logic function, and receive a processing result fed back by the service logic function to return to the client.
The implementation device of the present invention further includes a relationship establishing module 603 (not shown in the figure) for:
the method comprises the steps of receiving a tree structure transmitted by a service module, determining a root node and a child node in the tree structure, and determining a path traversing from the root node to the child node as a request path;
and according to the request name and the service logic function contained in the child node, combining the determined request path, and establishing a corresponding relation among the request path, the request name and the service logic function.
The service processing module 602 is further configured to: analyzing the service type of the service data and determining a single-instance object corresponding to the service data; and obtaining the address information of the single object, and inputting the address information into the service logic function.
In the implementation device of the invention, the request name comprises one of acquisition, new construction, deletion and modification.
In addition, the specific implementation of the service processing apparatus according to the embodiment of the present invention is already described in detail in the service processing method described above, and thus the description thereof will not be repeated here.
Fig. 7 illustrates an exemplary system architecture 700 to which a business processing method or business processing apparatus of embodiments of the present invention may be applied.
As shown in fig. 7, a system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705 (by way of example only). The network 704 is the medium used to provide communication links between the terminal devices 701, 702, 703 and the server 705. The network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 705 via the network 704 using the terminal devices 701, 702, 703 to receive or send messages or the like. Various communication client applications can be installed on the terminal devices 701, 702, 703.
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using the terminal devices 701, 702, 703. The background management server can analyze and other data of the received product information inquiry request and feed back the processing result to the terminal equipment.
It should be noted that, the service processing method provided in the embodiment of the present invention is generally executed by the server 705, and accordingly, the service processing apparatus is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, there is illustrated a schematic diagram of a computer system 800 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU) 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 801.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor comprises a request receiving module and a service processing module. The names of these modules do not constitute a limitation on the module itself in some cases, and for example, the request receiving module may also be described as "a module that receives a network request".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include:
receiving a network request transmitted by a client, and determining a service logic function for processing the network request according to a request path and a request method in the network request;
and calling the service logic function, inputting the service data in the network request into the service logic function, and receiving a processing result fed back by the service logic function to return to the client.
According to the technical scheme of the embodiment of the invention, the organization structure of the service module and the realization form of the service logic function are unified, so that the code structure is clear, the unified management of the system architecture is facilitated when a plurality of people develop the service system, and the maintenance cost is reduced; and the non-business frames can be directly reused, so that interaction between the business modules and the non-business frames is facilitated, development cost is reduced, and development efficiency is improved.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (8)

1. A business processing method, wherein an execution body is a non-business framework, comprising:
the method comprises the steps of receiving a tree structure transmitted by a service module, determining a root node and a child node in the tree structure, and determining a path traversing from the root node to the child node as a request path;
according to the request name and the service logic function contained in the child node, combining the determined request path, and establishing a corresponding relation among the request path, the request name and the service logic function;
receiving a network request transmitted by a client, and determining a service logic function for processing the network request according to a request path and a request method in the network request;
and calling the service logic function, inputting the service data in the network request into the service logic function, and receiving a processing result fed back by the service logic function to return to the client.
2. The method of claim 1, wherein said inputting service data in said network request into said service logic function further comprises:
analyzing the service type of the service data and determining a single-instance object corresponding to the service data;
and obtaining the address information of the single object, and inputting the address information into the service logic function.
3. The method of claim 1, wherein the request name comprises one of get, create, delete, modify.
4. A service processing apparatus, comprising:
the relation building module is used for receiving the tree structure transmitted by the service module by the non-service framework, determining a root node and a child node in the tree structure, and determining a path traversing from the root node to the child node as a request path; according to the request name and the service logic function contained in the child node, combining the determined request path, and establishing a corresponding relation among the request path, the request name and the service logic function;
the request receiving module is used for receiving a network request transmitted by a client by a non-service framework, and determining a service logic function for processing the network request according to a request path and a request device in the network request;
and the service processing module is used for calling the service logic function by a non-service framework, inputting service data in the network request into the service logic function, and receiving a processing result fed back by the service logic function to return to the client.
5. The apparatus of claim 4, wherein the traffic processing module is further configured to:
analyzing the service type of the service data and determining a single-instance object corresponding to the service data; and obtaining the address information of the single object, and inputting the address information into the service logic function.
6. The apparatus of claim 4, wherein the request name comprises one of get, create, delete, modify.
7. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-3.
8. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-3.
CN201910043576.9A 2019-01-17 2019-01-17 Service processing method and device Active CN109783562B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910043576.9A CN109783562B (en) 2019-01-17 2019-01-17 Service processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910043576.9A CN109783562B (en) 2019-01-17 2019-01-17 Service processing method and device

Publications (2)

Publication Number Publication Date
CN109783562A CN109783562A (en) 2019-05-21
CN109783562B true CN109783562B (en) 2024-03-01

Family

ID=66500947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910043576.9A Active CN109783562B (en) 2019-01-17 2019-01-17 Service processing method and device

Country Status (1)

Country Link
CN (1) CN109783562B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110879756B (en) * 2019-10-31 2023-10-17 深圳市泰洲科技有限公司 Collaborative process exception handling method, collaborative process exception handling device, computer equipment and storage medium
CN111143828A (en) * 2019-12-11 2020-05-12 中盈优创资讯科技有限公司 Safety control method and device for Web page and service
CN111966334B (en) * 2020-08-17 2023-06-27 支付宝(杭州)信息技术有限公司 Service processing method, device and equipment
CN114157535B (en) * 2021-10-15 2024-03-12 北京国电通网络技术有限公司 Double-responsibility chain micro-service gateway system and processing method thereof
CN116846752A (en) * 2023-07-28 2023-10-03 钛信(上海)信息科技有限公司 Multi-cloud resource management method and system based on business scene

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630472A (en) * 2014-11-03 2016-06-01 中国科学院沈阳自动化研究所 Quick client development frame for manufacturing execution system and software development method for frame
CN105989153A (en) * 2015-03-02 2016-10-05 阿里巴巴集团控股有限公司 Interaction method and device of database
CN108132880A (en) * 2017-12-21 2018-06-08 武汉斑马快跑科技有限公司 A kind of parameter verification method and device
CN108255802A (en) * 2016-12-29 2018-07-06 北京国双科技有限公司 Generic text Analytical framework and the method and apparatus based on framework parsing text

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8874640B2 (en) * 2011-03-01 2014-10-28 Infosys Limited Method and system for reducing service overhead in service oriented architectures
US20160364277A1 (en) * 2014-02-11 2016-12-15 Evado Holdings Pty Ltd A method for using user session data to provide middle-ware

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630472A (en) * 2014-11-03 2016-06-01 中国科学院沈阳自动化研究所 Quick client development frame for manufacturing execution system and software development method for frame
CN105989153A (en) * 2015-03-02 2016-10-05 阿里巴巴集团控股有限公司 Interaction method and device of database
CN108255802A (en) * 2016-12-29 2018-07-06 北京国双科技有限公司 Generic text Analytical framework and the method and apparatus based on framework parsing text
CN108132880A (en) * 2017-12-21 2018-06-08 武汉斑马快跑科技有限公司 A kind of parameter verification method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
国土资源测绘管理系统架构研究与设计;徐鸣;孙德忠;;信息与电脑(理论版)(01);全文 *

Also Published As

Publication number Publication date
CN109783562A (en) 2019-05-21

Similar Documents

Publication Publication Date Title
CN109783562B (en) Service processing method and device
US11921672B2 (en) Query execution at a remote heterogeneous data store of a data fabric service
US11586692B2 (en) Streaming data processing
US11989194B2 (en) Addressing memory limits for partition tracking among worker nodes
US11615087B2 (en) Search time estimate in a data intake and query system
US11586627B2 (en) Partitioning and reducing records at ingest of a worker node
US11580107B2 (en) Bucket data distribution for exporting data to worker nodes
US11599541B2 (en) Determining records generated by a processing task of a query
CN109086409B (en) Microservice data processing method and device, electronic equipment and computer readable medium
US11461334B2 (en) Data conditioning for dataset destination
US11281706B2 (en) Multi-layer partition allocation for query execution
US11163758B2 (en) External dataset capability compensation
US10726009B2 (en) Query processing using query-resource usage and node utilization data
US11416528B2 (en) Query acceleration data store
US10698900B2 (en) Generating a distributed execution model with untrusted commands
CN110310034B (en) Service arrangement and business flow processing method and device applied to SaaS
US10698897B2 (en) Executing a distributed execution model with untrusted commands
JP2016194947A (en) System, method and graphical user interface for workflow generation, deployment and/or execution
US8433782B2 (en) Simplifying determination of dependencies among SOA services
US10915378B1 (en) Open discovery service
CN111966692A (en) Data processing method, medium, device and computing equipment for data warehouse
CN109039817A (en) A kind of information processing method and device for traffic monitoring
Rogers et al. Bundle and pool architecture for multi-language, robust, scalable workflow executions
CN107391528B (en) Front-end component dependent information searching method and equipment
CN110457132B (en) Method and device for creating functional object and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant