CN108920219B - Service processing method and device based on open platform - Google Patents
Service processing method and device based on open platform Download PDFInfo
- Publication number
- CN108920219B CN108920219B CN201810555012.9A CN201810555012A CN108920219B CN 108920219 B CN108920219 B CN 108920219B CN 201810555012 A CN201810555012 A CN 201810555012A CN 108920219 B CN108920219 B CN 108920219B
- Authority
- CN
- China
- Prior art keywords
- service
- compiling
- definition file
- open platform
- ecbl
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 20
- 238000012545 processing Methods 0.000 claims abstract description 74
- 238000000034 method Methods 0.000 claims abstract description 41
- 230000005540 biological transmission Effects 0.000 claims abstract description 26
- 230000008569 process Effects 0.000 claims description 26
- 238000004458 analytical method Methods 0.000 claims description 20
- 238000005457 optimization Methods 0.000 claims description 11
- 238000007689 inspection Methods 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 claims description 5
- 238000013507 mapping Methods 0.000 claims description 5
- 238000011161 development Methods 0.000 claims description 4
- 239000008186 active pharmaceutical agent Substances 0.000 description 8
- 230000000694 effects Effects 0.000 description 8
- 230000003993 interaction Effects 0.000 description 8
- 230000009471 action Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000001737 promoting effect Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4482—Procedural
- G06F9/4484—Executing subprograms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
The invention provides a service processing method and a device based on an open platform, wherein the method comprises the following steps: creating a compilation toolkit on the open platform; receiving a service definition file from an external third-party service end through a provided service end API; compiling the service definition file through the compiling toolkit to obtain a corresponding service processing program; receiving at least one service request from at least one external user terminal through the provided user side API; and processing each service request respectively through the service processing program. The device includes: the system comprises a creating unit, a service end transmission unit, a compiling unit, a user end transmission unit and a service processing unit. The scheme can improve the stability of the third-party service end for realizing the service by utilizing the open platform.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a service processing method and device based on an open platform.
Background
The open platform refers to a software system that makes an external program increase functions of the software system or use resources of the software system by exposing an Application Programming Interface (API) or a function (function) of the software system without changing a source code of the software system. The third-party service end can utilize the resources of the open platform to realize corresponding services through the API provided by the open platform.
Currently, when a third-party service end uses an open platform to implement a service, the third-party service end performs data interaction with the open platform through a plurality of APIs provided by the open platform to implement processing of a corresponding service.
Aiming at the method for realizing the service by the third-party service end by utilizing the open platform at present, the main processing logic for processing the corresponding service is positioned at the third-party service end, so that the open platform needs to provide a large amount of API for the third-party service end so as to meet the requirement of frequent data interaction between the third-party service end and the open platform in the service processing process. Because the number of the APIs provided by the open platform is large, and the number of times each API is called is large, if one API call fails, the service processing fails, and therefore, the stability of the service implemented by the existing third-party service end using the open platform is low.
Disclosure of Invention
The embodiment of the invention provides a service processing method and device based on an open platform, which can improve the stability of a third-party service end for realizing a service by using the open platform.
In a first aspect, an embodiment of the present invention provides a service processing method based on an open platform, which is applied to the open platform, and includes:
creating a compilation toolkit on the open platform;
receiving a service definition file from an external third-party service end through a provided service end API;
compiling the service definition file through the compiling toolkit to obtain a corresponding service processing program;
receiving at least one service request from at least one external user terminal through the provided user side API;
and processing each service request respectively through the service processing program.
Alternatively,
the compiling the service definition file through the compiling toolkit to obtain the corresponding service processing program comprises the following steps:
acquiring at least one ECBL (Enterprise development language) definition file included in the service definition file;
compiling each ECBL definition file through the compiling toolkit to obtain corresponding JVM byte codes;
and associating each obtained JVM bytecode to obtain the service processing program.
Alternatively,
each of the ECBL definition files includes: any one or more of variable type, attribute, entity, set, mapping, score determination, loop, procedure call, scientific calculation, and task.
Alternatively,
the compiling each ECBL definition file through the compiling toolkit to obtain a corresponding JVM bytecode, including:
and for each ECBL definition file, sequentially performing grammar check, syntax analysis, semantic analysis, security check, intermediate code generation and code optimization on the ECBL definition file through the compiling tool package to obtain JVM byte codes corresponding to the ECBL definition file.
Alternatively,
after the processing each service request by the service processing program, further includes:
and aiming at each service request, acquiring service end data obtained by processing the service request by the service processing program, and sending the service end data to the third-party service end through the service end API.
Alternatively,
after the processing each service request by the service processing program, further includes:
and for each service request, acquiring user data obtained by processing the service request by the service processing program, and sending the user data to the corresponding user terminal through the user API.
In a second aspect, an embodiment of the present invention further provides an open platform-based service processing apparatus, which is applied to an open platform, and includes: the system comprises a creating unit, a service end transmission unit, a compiling unit, a user end transmission unit and a service processing unit;
the creating unit is used for creating a compiling tool package on the open platform;
the service end transmission unit is used for receiving a service definition file from an external third-party service end through a service end API provided by the open platform;
the compiling unit is configured to compile the service definition file received by the service end transmission unit through the compiling toolkit created by the creating unit to obtain a corresponding service processing program;
the client transmission unit is used for receiving at least one service request from at least one external client through a client API provided by the open platform;
the service processing unit is configured to process each service request received by the user-side transmission unit through the service processing program obtained by the compiling unit.
Alternatively,
the compiling unit is configured to obtain at least one industry-specific language ECBL definition file included in the service definition file, compile each ECBL definition file through the compiling tool to obtain a corresponding JVM bytecode, and associate each obtained JVM bytecode to obtain the service handler.
Alternatively,
the compiling unit is configured to, after executing the compiling on each ECBL definition file by the compiling tool, respectively compile to obtain a corresponding JVM bytecode, specifically:
and for each ECBL definition file, sequentially performing grammar check, syntax analysis, semantic analysis, security check, intermediate code generation and code optimization on the ECBL definition file through the compiling tool package to obtain JVM byte codes corresponding to the ECBL definition file.
Alternatively,
the service end transmission unit is further configured to, for each service request, obtain service end data obtained by the service processing unit processing the service request through the service processing program, and send the service end data to the third-party service end through the service end API.
Alternatively,
the user end transmission unit is further configured to, for each service request, obtain user end data obtained by the service processing unit processing the service request through the service processing program, and send the user end data to the corresponding user terminal through the user end API.
In the service processing method and apparatus based on the open platform provided by the embodiments of the present invention, after the compiling toolkit is created on the open platform, the third-party service end may send the service definition file to the open platform through the service end API provided by the open platform, the open platform may compile the received service definition file through the compiling toolkit to obtain the corresponding service processing program, then each user terminal may send a service request to the open platform through the user end API provided by the open platform, and the open platform may process each received service request through the obtained service processing program. Therefore, the third-party service end can deploy the service processing program on the open platform by sending the service definition file, so that frequent data interaction between the open platform and the third-party service end is not required in the service processing process, the times of calling the API in the service processing process can be reduced, the probability of service processing failure events caused by API calling failure is reduced, and the stability of the third-party service end for realizing the service by utilizing the open platform can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a service processing method based on an open platform according to an embodiment of the present invention;
fig. 2 is a flowchart of another service processing method based on an open platform according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a device in which a service processing apparatus based on an open platform is located according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a service processing apparatus based on an open platform according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a service processing method based on an open platform, which is applied to the open platform, and the method may include the following steps:
step 101: creating a compilation toolkit on the open platform;
step 102: receiving a service definition file from an external third-party service end through a provided service end API;
step 103: compiling the service definition file through a compiling toolkit to obtain a corresponding service processing program;
step 104: receiving at least one service request from at least one external user terminal through the provided user side API;
step 105: and processing each service request respectively through the service processing program.
The embodiment of the invention provides a service processing method based on an open platform, after a compiling toolkit is established on the open platform, a third-party service end can send a service definition file to the open platform through a service end API provided by the open platform, the open platform can compile the received service definition file through the compiling toolkit to obtain a corresponding service processing program, then each user terminal can send a service request to the open platform through a user end API provided by the open platform, and the open platform can process each received service request through the obtained service processing program. Therefore, the third-party service end can deploy the service processing program on the open platform by sending the service definition file, so that frequent data interaction between the open platform and the third-party service end is not required in the service processing process, the times of calling the API in the service processing process can be reduced, the probability of service processing failure events caused by API calling failure is reduced, and the stability of the third-party service end for realizing the service by utilizing the open platform can be improved.
Optionally, as shown in fig. 1, step 103 compiles the service definition file through a compilation toolkit to obtain a corresponding service processing program, and when executing this step, the following steps may be specifically performed:
acquiring at least one ECBL (industry-specific language) definition file included in the service definition file;
compiling each ECBL definition file through a compiling tool package to obtain corresponding JVM (Java virtual machine) byte codes;
and associating the obtained JVM bytecodes to obtain a service processing program.
In the embodiment of the invention, the ECBL is a set of definition domain language (DSL) describing a third-party service logic flow, and the language is usually realized by technologies such as XML and DTD, and has the characteristics of normativity, expansibility and self-descriptiveness. The one or more ECBL definition files may form an ECBL project, which is a service definition file for defining service logic, wherein the service logic is executed from a main ECBL definition file included in the ECBL project.
By creating the compiling toolkit on the open platform, after the third-party service end sends the service definition file comprising one or more ECBL definition files to the open platform, the open platform can compile each received ECBL definition file in real time through the compiling toolkit to obtain the JVM bytecode which can be operated, so that the third party does not need to wait for a long time when releasing the service, the service can be released in real time, and the use satisfaction of the service releasing party can be improved.
In addition, after the compiling toolkit created on the open platform carries out the just-in-time compiling on the ECBL definition file, the JVM bytecode obtained by the compiling can be made to take effect immediately, and the distributed nodes included in the open platform do not need to be restarted one by one, so that the operating efficiency of the open platform can be improved, and the using satisfaction of users and service issuers is further improved.
Optionally, each ECBL definition file sent by the third-party service end to the open platform includes any one or more of variable type, attribute, entity, set, mapping, score judgment, loop, procedure call, scientific calculation, and task.
The ECBL definition file comprises a plurality of parameters such as variable types, attributes, entities, sets, mappings, score judgment, circulation, process calling, scientific calculation and tasks and the like, and can comprehensively define the logic of the service, so that each API on the open platform does not need to be specifically defined to realize the service logic, each API on the open platform can be suitable for different services, the open platform can realize different services only by providing a few APIs, and the open platform is ensured to have higher operation stability.
Optionally, when the ECBL definition file is compiled by the compiling toolkit to obtain the corresponding JVM bytecode, the compiling toolkit may sequentially perform grammar check, syntax analysis, semantic analysis, security check, intermediate code generation, and code optimization on the ECBL definition file, so as to finally obtain the JVM bytecode corresponding to the ECBL definition file.
The syntax check, the syntax analysis, the semantic analysis, the safety check, the intermediate code generation and the code optimization are sequentially carried out on the ECBL definition file through the compiling toolkit, so that the JVM byte codes generated by compiling have correct syntax, grammar and semantics, and the JVM byte codes are ensured to have no content which can threaten the safety of an open platform, thereby ensuring that a service processing program formed by all the JVM byte codes can normally process service requests, and further ensuring the stability of service processing.
Optionally, as shown in fig. 1, after each service request is processed by the service processing program in step 105, for each processed service request, if a processing result of processing the service request by the service processing program includes service end data, the open platform may send the service end data included in the processing result to the third-party service end through the service end API.
After the open platform processes the service request by using the service processing program, if the processing result includes the service end data which needs to be sent to the third-party service end, the open platform can send the service end data to the third-party service end through the corresponding service end API, so that the service processing method can be suitable for the service which needs to perform data interaction between the open platform and the third-party service end in the service processing process, and the applicability of the service processing method is improved.
Alternatively, as shown in fig. 1, after each service request is processed by the service processing program in step 105, for each processed service request, if the processing result of processing the service request by the service processing program includes user data, the open platform may send the user data included in the processing result to the corresponding user terminal through the user API.
After the service request is processed by the service processing program, if the processing result includes the user side data to be sent to the user terminal, the open platform can send the user side data to the corresponding user terminal through the corresponding user side API, so that the service processing method can be suitable for the service which needs the open platform to perform data interaction with the user terminal in the service processing process, and the applicability of the service processing method is further improved.
The following takes an open platform of the e-commerce industry as an example to further describe in detail the service processing method based on the open platform provided by the embodiment of the present invention, as shown in fig. 2, the method may include the following steps:
step 201: a compilation toolkit is created on an open platform.
In the embodiment of the invention, aiming at each service to be issued by each third-party service end, a corresponding compiling toolkit is established for the service on the open platform.
For example, merchant a needs to publish a promotional activity B on an open platform X for e-commerce, and then needs to create a compilation toolkit on open platform X against the promotional activity B. Jar is created, for example, in open platform X, as a compilation toolkit ebl-server.
Step 202: and receiving each ECBL definition file sent by the third-party service end through the service end API.
In the embodiment of the present invention, the open platform is provided with one or more service side APIs, and the third-party service side may send the plurality of ECBL definition files included in the service definition file to the open platform through the service side APIs. The file format of the ECBL definition file sent by the third-party service end may be an XML format.
For example, the merchant a sends each ECBL definition file corresponding to the promotional activity B to the open platform X through a service API provided by the open platform X by using the third-party service end a, where each ECBL definition file sent by the third-party service end a is ECBL-sample01.xml, ECBL-sample02.xml, ECBL-sample03.xml, and the like.
Step 203: and compiling each ECBL definition file through a compiling tool package to obtain corresponding JVM byte codes.
In the embodiment of the present invention, after receiving each ECBL definition file sent by the third-party service end, the open platform compiles each ECBL definition file through the compiling toolkit created in step 201, and obtains the corresponding JVM bytecode. When the open platform compiles the ECBL definition file through the compilation toolkit, grammar inspection, syntax analysis, semantic analysis, safety inspection, intermediate code generation and code optimization are sequentially performed on the ECBL definition file, and finally JVM byte codes subjected to code optimization are obtained.
For example, the open platform X sequentially performs grammar check, syntax analysis, semantic analysis, security check, intermediate Code generation and Code optimization on the ECBL definition file ebl-sample01. xml through a compiling tool package ebl-server.
Step 204: and associating each JVM bytecode to obtain a corresponding service processing program.
In the embodiment of the invention, after compiling each ECBL definition file into the corresponding JVM bytecode through the compiling toolkit, the open platform associates each JVM bytecode according to the processing logic of the corresponding service, and takes each associated JVM bytecode as the service processing program of the corresponding service.
For example, according to the participation rule of the promotion activity B, a plurality of JVM bytecodes such as JVM Code01, JVM Code02 and JVM Code03 corresponding to ECBL-sample01.xml, ECBL-sample02.xml, ECBL-sample03.xml and the like definition files are associated to obtain the service handler B corresponding to the promotion activity B.
Step 205: and receiving a service request sent by a user terminal through a user side API.
In the embodiment of the present invention, the open platform is provided with one or more user side APIs, and the user terminal may send the service request to the open platform through the user side APIs.
For example, user C wants to participate in a sales promotion activity B, and triggers user C, which sends a service request C to the open platform X through a user API provided by the open platform X.
Step 206: and processing the service request through a service processing program.
In the embodiment of the invention, after receiving the service request sent by the user terminal, the open platform processes the received service request through the corresponding service processing program.
For example, after receiving the service request C, the open platform X processes the service request C through the service processing program B to determine whether the user C meets the condition for participating in the sales promotion activity B.
Step 207: and the open platform sends result data to the third-party service end and/or the user terminal.
In the embodiment of the present invention, according to the logic of the service issued by the third-party service end, after the service request is processed by the service processing program, the service end data included in the processing result can be sent to the corresponding third-party service end, and the user end data included in the processing result can also be sent to the corresponding user terminal.
For example, after processing the service request C through the service processing program B, the open platform X determines that the user C meets the condition for participating in the sales promotion activity B, then sends the service end data a to the third-party service end a through the service end API to indicate that the user C meets the condition for participating in the sales promotion activity B, and sends the user end data C to the user terminal C through the user end API to inform the user C that the user C successfully participates in the sales promotion activity B.
As shown in fig. 3 and 4, an embodiment of the present invention provides a service processing apparatus based on an open platform. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. From a hardware level, as shown in fig. 3, a hardware structure diagram of a device in which an open platform-based service processing apparatus provided in the embodiment of the present invention is located is shown, where in addition to the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 3, the device in which the apparatus is located in the embodiment may also include other hardware, such as a forwarding chip responsible for processing a packet, in general. Taking a software implementation as an example, as shown in fig. 4, as a logical apparatus, the apparatus is formed by reading a corresponding computer program instruction in a non-volatile memory into a memory by a CPU of a device in which the apparatus is located and running the computer program instruction. The service processing apparatus based on the open platform provided in this embodiment includes: a creating unit 401, a service end transmission unit 402, a compiling unit 403, a user end transmission unit 404 and a service processing unit 405;
a creating unit 401, configured to create a compiling tool package on an open platform;
a service end transmission unit 402, configured to receive a service definition file from an external third-party service end through a service end API provided by the open platform;
a compiling unit 403, configured to compile the service definition file received by the service end transmission unit 402 through the compiling toolkit created by the creating unit 401, to obtain a corresponding service processing program;
a client transmission unit 404, configured to receive at least one service request from at least one external client through a client API provided by the open platform;
the service processing unit 405 is configured to process each service request received by the user side transmission unit 404 through the service processing program obtained by the compiling unit 403.
Alternatively, on the basis of the open platform-based service processing device shown in fig. 4,
the compiling unit 403 is configured to obtain at least one specific industry language ECBL definition file included in the service definition file, compile each ECBL definition file through a compiling tool to obtain a corresponding JVM bytecode, and associate each obtained JVM bytecode to obtain a service handler.
Alternatively, on the basis of the open platform-based service processing device shown in fig. 4,
the compiling unit 403, after executing the compiling on each ECBL definition file by the compiling tool, obtains a corresponding JVM bytecode, specifically configured to:
and for each ECBL definition file, sequentially performing grammar check, syntax analysis, semantic analysis, security check, intermediate code generation and code optimization on the ECBL definition file through a compiling tool package to obtain JVM byte codes corresponding to the ECBL definition file.
Alternatively, on the basis of the open platform-based service processing device shown in fig. 4,
the service end transmission unit 402 is further configured to, for each service request, obtain service end data obtained by the service processing unit processing the service request through the service processing program, and send the service end data to the third-party service end through the service end API.
Alternatively, on the basis of the open platform-based service processing device shown in fig. 4,
the user end transmission unit 404 is further configured to, for each service request, obtain user end data obtained by the service processing unit processing the service request through the service processing program, and send the user end data to the corresponding user terminal through the user end API.
It should be noted that, because the contents of information interaction, execution process, and the like between the units in the apparatus are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
The embodiment of the present invention further provides a readable medium, which includes an execution instruction, and when a processor of a storage controller executes the execution instruction, the storage controller executes the service processing method based on the open platform provided in each of the above embodiments.
An embodiment of the present invention further provides a storage controller, including: a processor, a memory, and a bus;
the memory is used for storing an execution instruction, the processor is connected with the memory through the bus, and when the storage controller runs, the processor executes the execution instruction stored in the memory, so that the storage controller executes the service processing method based on the open platform provided in the above embodiments.
In summary, the service processing method and device based on the open platform provided by the embodiments of the present invention at least have the following beneficial effects:
1. in the embodiment of the present invention, after the compiling toolkit is created on the open platform, the third-party service end may send the service definition file to the open platform through the service end API provided by the open platform, the open platform may compile the received service definition file through the compiling toolkit to obtain the corresponding service processing program, then each user terminal may send the service request to the open platform through the user end API provided by the open platform, and the open platform may process each received service request through the obtained service processing program. Therefore, the third-party service end can deploy the service processing program on the open platform by sending the service definition file, so that frequent data interaction between the open platform and the third-party service end is not required in the service processing process, the times of calling the API in the service processing process can be reduced, the probability of service processing failure events caused by API calling failure is reduced, and the stability of the third-party service end for realizing the service by utilizing the open platform can be improved.
2. In the embodiment of the invention, the compiling toolkit is established on the open platform, and after the third-party service end sends the service definition file comprising one or more ECBL definition files to the open platform, the open platform can compile the received ECBL definition files in real time through the compiling toolkit to obtain the JVM byte codes which can be operated, so that the third party does not need to wait for a long time when releasing the service, the service can be released in real time, and the use satisfaction of the service releasing party can be improved.
3. In the embodiment of the invention, after the compiling toolkit created on the open platform carries out the just-in-time compiling on the ECBL definition file, the JVM bytecode obtained by the compiling can be immediately effective, and the distributed nodes included in the open platform do not need to be restarted one by one, so that the operating efficiency of the open platform can be improved, and the use satisfaction of users and service issuers is further improved.
4. In the embodiment of the invention, the ECBL definition file comprising a plurality of parameters such as variable types, attributes, entities, sets, mappings, score judgment, circulation, process calling, scientific calculation, tasks and the like can comprehensively define the logic of the service, so that the service logic is realized without specifically defining each API on the open platform, each API on the open platform can be suitable for different services, the open platform can realize different services only by providing a few APIs, and the open platform is ensured to have higher operation stability.
5. In the embodiment of the invention, the compiling toolkit is used for sequentially carrying out grammar check, syntax analysis, semantic analysis, security check, intermediate code generation and code optimization on the ECBL definition file, so that the JVM bytecode generated by compiling has correct grammar, grammar and semantics, and the JVM bytecode is ensured to have no content which can threaten the security of an open platform, thereby ensuring that a service processing program consisting of all JVM bytecodes can normally process service requests, and further ensuring the stability of service processing.
6. In the embodiment of the invention, the compiling tool package arranged on the open platform can compile the ECBL definition file in time, thereby facilitating the release and modification of the service and improving the program operation efficiency under the condition of complex service logic.
7. In the embodiment of the invention, the third-party service end releases the service by sending the ECBL definition file without carrying out frequency upgrade on the development interface provided by the open platform, thereby avoiding frequent change of the open platform rule caused by the upgrade of the development interface and ensuring the normalization of the open platform.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (2)
1. A service processing method based on an open platform is applied to the open platform, and is characterized in that a compiling toolkit is created on the open platform, and the method further comprises the following steps:
receiving a service definition file from an external third-party service end through a provided service end API;
compiling the service definition file through the compiling toolkit to obtain a corresponding service processing program;
receiving at least one service request from at least one external user terminal through the provided user side API;
processing each service request respectively through the service processing program;
the compiling the service definition file through the compiling toolkit to obtain the corresponding service processing program comprises the following steps:
acquiring at least one ECBL (Enterprise development language) definition file included in the service definition file;
compiling each ECBL definition file through the compiling toolkit to obtain corresponding JVM byte codes;
associating each obtained JVM bytecode to obtain the service processing program;
each of the ECBL definition files includes: any one or more of variable type, attribute, entity, set, mapping, score judgment, cycle, procedure call, scientific calculation and task;
the compiling each ECBL definition file through the compiling toolkit to obtain a corresponding JVM bytecode, including:
for each ECBL definition file, sequentially performing grammar inspection, syntax analysis, semantic analysis, security inspection, intermediate code generation and code optimization on the ECBL definition file through the compiling tool package to obtain JVM byte codes corresponding to the ECBL definition file;
after the processing each service request by the service processing program, further includes:
for each service request, acquiring service end data obtained by processing the service request by the service processing program, and sending the service end data to the third-party service end through the service end API;
after the processing each service request by the service processing program, further includes:
and for each service request, acquiring user data obtained by processing the service request by the service processing program, and sending the user data to the corresponding user terminal through the user API.
2. An open platform-based service processing device applied to the open platform is characterized by comprising: the system comprises a creating unit, a service end transmission unit, a compiling unit, a user end transmission unit and a service processing unit;
the creating unit is used for creating a compiling tool package on the open platform;
the service end transmission unit is used for receiving a service definition file from an external third-party service end through a service end API provided by the open platform;
the compiling unit is configured to compile the service definition file received by the service end transmission unit through the compiling toolkit created by the creating unit to obtain a corresponding service processing program;
the user side transmission unit is used for receiving at least one service request from at least one external user terminal through a user side API provided by the open platform;
the service processing unit is configured to process each service request received by the user side transmission unit through the service processing program obtained by the compiling unit;
the compiling unit is configured to obtain at least one industry-specific language ECBL definition file included in the service definition file, compile each ECBL definition file through the compiling tool to obtain a corresponding JVM bytecode, and associate each obtained JVM bytecode to obtain the service handler;
the compiling unit is configured to, after executing the compiling on each ECBL definition file by the compiling tool, respectively compile to obtain a corresponding JVM bytecode, specifically:
for each ECBL definition file, sequentially performing grammar inspection, syntax analysis, semantic analysis, security inspection, intermediate code generation and code optimization on the ECBL definition file through the compiling tool package to obtain JVM byte codes corresponding to the ECBL definition file;
the service end transmission unit is further configured to, for each service request, obtain service end data obtained by the service processing unit processing the service request through the service processing program, and send the service end data to the third-party service end through the service end API;
and/or the presence of a gas in the gas,
the user end transmission unit is further configured to, for each service request, obtain user end data obtained by the service processing unit processing the service request through the service processing program, and send the user end data to the corresponding user terminal through the user end API.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810555012.9A CN108920219B (en) | 2018-06-01 | 2018-06-01 | Service processing method and device based on open platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810555012.9A CN108920219B (en) | 2018-06-01 | 2018-06-01 | Service processing method and device based on open platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108920219A CN108920219A (en) | 2018-11-30 |
CN108920219B true CN108920219B (en) | 2021-09-07 |
Family
ID=64409684
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810555012.9A Active CN108920219B (en) | 2018-06-01 | 2018-06-01 | Service processing method and device based on open platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108920219B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109857377B (en) * | 2019-01-07 | 2023-08-25 | 平安科技(深圳)有限公司 | API (application program interface) arrangement method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102750469A (en) * | 2012-05-18 | 2012-10-24 | 北京邮电大学 | Security detection system based on open platform and detection method thereof |
CN103685193A (en) * | 2012-09-20 | 2014-03-26 | 腾讯科技(深圳)有限公司 | Method for third party application to access open platform and open platform access system |
CN105912468A (en) * | 2016-04-11 | 2016-08-31 | 华为软件技术有限公司 | Method of operating scripts by open platform and open platform system |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101132560B1 (en) * | 2010-06-09 | 2012-04-03 | 강원대학교산학협력단 | System and method for automatic interface testing based on simulation for robot software components |
US20150026044A1 (en) * | 2013-07-07 | 2015-01-22 | Gaonic Ltd. | Method, protocol and system for universal sensor communication |
CN106971099A (en) * | 2016-11-09 | 2017-07-21 | 阿里巴巴集团控股有限公司 | A kind of control method and device of program interface call authority |
CN107222524B (en) * | 2017-05-08 | 2020-07-31 | 广州智淘信息科技有限公司 | Open type application service integration framework |
-
2018
- 2018-06-01 CN CN201810555012.9A patent/CN108920219B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102750469A (en) * | 2012-05-18 | 2012-10-24 | 北京邮电大学 | Security detection system based on open platform and detection method thereof |
CN103685193A (en) * | 2012-09-20 | 2014-03-26 | 腾讯科技(深圳)有限公司 | Method for third party application to access open platform and open platform access system |
CN105912468A (en) * | 2016-04-11 | 2016-08-31 | 华为软件技术有限公司 | Method of operating scripts by open platform and open platform system |
Also Published As
Publication number | Publication date |
---|---|
CN108920219A (en) | 2018-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5897816B2 (en) | Dependency graph parameter scoping | |
US8635595B2 (en) | Method and system for managing non-compliant objects | |
US8112765B2 (en) | Mechanism that provides more efficient event handler processing | |
CN111770206A (en) | Method for deploying intelligent contract, block chain node and storage medium | |
US20110179402A1 (en) | Method and system for compiling a dynamically-typed method invocation in a statically-typed programming language | |
US20050246692A1 (en) | Asynchronous compilation | |
CN109408232B (en) | Transaction flow-based componentized bus calling execution system | |
CN111770205B (en) | Method, block chain node, system and storage medium for executing intelligent contract | |
CN111768187A (en) | Method for deploying intelligent contract, block chain node and storage medium | |
CN111768200A (en) | Method for deploying intelligent contract, block chain node and storage medium | |
CN111815330A (en) | Method for deploying intelligent contract, block chain node and storage medium | |
CN113220326B (en) | Intelligent contract upgrading method and block chain system | |
CN108920219B (en) | Service processing method and device based on open platform | |
CN112445706A (en) | Program abnormal code acquisition method and device, electronic equipment and storage medium | |
CN111400135A (en) | Method and device for extracting service data | |
CN116578282A (en) | Code generation method, device, electronic equipment and medium | |
US9183001B2 (en) | Simulation of static members and parameterized constructors on an interface-based API | |
US11435989B2 (en) | Thread-local return structure for asynchronous state machine | |
CN111538491B (en) | Data event processing method, device, equipment and storage medium | |
US7673051B2 (en) | Resource usage conflict identifier | |
WO2022035476A1 (en) | Representing asynchronous state machine in intermediate code | |
US7908375B2 (en) | Transparently externalizing plug-in computation to cluster | |
CN111930478A (en) | Service calling method and device based on dynamic bytecode | |
CN111273897A (en) | Block chain resource consumption method and device, storage medium and electronic equipment | |
Kim et al. | Static dalvik bytecode optimization for Android applications |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 271000 Langchao science and Technology Park, 527 Dongyue street, Tai'an City, Shandong Province Applicant after: INSPUR SOFTWARE Co.,Ltd. Address before: No. 1036, Shandong high tech Zone wave road, Ji'nan, Shandong Applicant before: INSPUR SOFTWARE Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |