CN111930478A - Service calling method and device based on dynamic bytecode - Google Patents

Service calling method and device based on dynamic bytecode Download PDF

Info

Publication number
CN111930478A
CN111930478A CN202010514149.7A CN202010514149A CN111930478A CN 111930478 A CN111930478 A CN 111930478A CN 202010514149 A CN202010514149 A CN 202010514149A CN 111930478 A CN111930478 A CN 111930478A
Authority
CN
China
Prior art keywords
service
calling
dynamic
bytecode
instruction
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.)
Pending
Application number
CN202010514149.7A
Other languages
Chinese (zh)
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 Missfresh Ecommerce Co Ltd
Original Assignee
Beijing Missfresh Ecommerce 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 Missfresh Ecommerce Co Ltd filed Critical Beijing Missfresh Ecommerce Co Ltd
Priority to CN202010514149.7A priority Critical patent/CN111930478A/en
Publication of CN111930478A publication Critical patent/CN111930478A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Abstract

Embodiments of the present disclosure provide a dynamic bytecode-based service invocation method, apparatus, device, and computer-readable storage medium. The method comprises receiving a service invocation instruction; calling the service according to the service calling instruction; sequentially calling each method of the service based on the dynamic byte codes; and feeding back the execution result of the service to a sender of the service calling instruction. In this way, if a certain action of the service fails to be executed, an operator can intuitively find a problem and manually call the action which fails to be executed, the data corresponding to the action does not need to be operated in a way of directly operating a database, and the operation risk is low and the efficiency is high.

Description

Service calling method and device based on dynamic bytecode
Technical Field
Embodiments of the present disclosure relate generally to the field of computer technology, and more particularly, to a dynamic bytecode-based service invocation method, apparatus, device, and computer-readable storage medium.
Background
In existing operations, the methods may be exposed through an API interface. However, in many scenarios, an operator is required to manually handle a non-exposed method, for example, in a processing flow of an order cancellation service, a background order server receives an order cancellation request sent by a user, and may sequentially execute actions such as warehouse order cancellation, delivery order cancellation, refund notification, and the like; these actions need to be performed in sequence, and only if the previous action was successfully performed, the subsequent action can be performed. If a certain action fails to be executed, an operator can only cancel the order by directly operating the database, and the cancellation operation lacks a verification mechanism, so that the operation risk is high, and the efficiency is low.
Disclosure of Invention
According to an embodiment of the present disclosure, a service invocation scheme based on dynamic bytecode is provided.
In a first aspect of the disclosure, a dynamic bytecode-based service invocation method is provided. The method comprises the following steps: receiving a service calling instruction; calling the service according to the service calling instruction; sequentially calling each method of the service based on the dynamic byte codes; and feeding back the execution result of the service to a sender of the service calling instruction.
The above-described aspects and any possible implementation further provide an implementation in which methods of the service are loaded by a Java virtual machine and are sequentially invoked.
As described in the foregoing aspect and any possible implementation manner, there is further provided an implementation manner, where each method for sequentially invoking the service based on dynamic bytecode includes: producing each method of the service into a service which can be manually called based on dynamic byte codes; and sequentially calling the services produced by the dynamic byte codes.
The above-described aspect and any possible implementation manner further provide an implementation manner, wherein producing the methods of the service as the manually-invokable service based on the dynamic bytecode includes: for each method of the service loaded by the Java virtual machine, checking whether a previous line of a starting position of the method is annotated; if no flag is present, then the next method is checked; if the mark exists, the method is produced into a service which can be called manually through dynamic byte codes.
The above-described aspect and any possible implementation further provide an implementation, and sequentially invoking the service produced by the dynamic bytecode includes: sequentially calling the services produced by the dynamic byte codes; acquiring the called state of the service produced by the dynamic byte codes; if the called state is successful, continuing to call the next method; if the called state is failure, feeding back calling failure prompt information to prompt an operator to carry out manual calling; and receiving a manual calling instruction of an operator, and manually calling the service failed to be called.
The above-described aspect and any possible implementation manner further provide an implementation manner, where the call failure prompt information includes: the name and called status of the service produced by the dynamic bytecode.
The above-mentioned aspects and any possible implementation further provide an implementation, and sequentially invoking the service produced by dynamic bytecode further includes: judging whether the service produced by the dynamic bytecode does not exist or not; if yes, continuing to call; if not, the process is ended.
In a second aspect of the disclosure, a dynamic bytecode-based service invocation apparatus is provided. The device includes: the receiving module is used for receiving a service calling instruction; the service calling module is used for calling the service according to the service calling instruction; the method calling module is used for calling each method of the service in sequence based on the dynamic byte codes; and the feedback module is used for feeding back the execution result of the service to the sender of the service calling instruction.
In a third aspect of the disclosure, an electronic device is provided. The electronic device includes: a memory having a computer program stored thereon and a processor implementing the method as described above when executing the program.
In a fourth aspect of the present disclosure, a computer readable storage medium is provided, having stored thereon a computer program, which when executed by a processor, implements a method as in accordance with the first aspect of the present disclosure.
It should be understood that the statements herein reciting aspects are not intended to limit the critical or essential features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, like or similar reference characters designate like or similar elements, and wherein:
FIG. 1 illustrates a schematic diagram of an exemplary operating environment in which embodiments of the present disclosure can be implemented;
FIG. 2 illustrates a flow diagram of a dynamic bytecode-based service invocation method in accordance with an embodiment of the present disclosure;
FIG. 3 illustrates a flow diagram of methods for invoking services in turn based on dynamic bytecode according to embodiments of the disclosure;
FIG. 4 illustrates a flow diagram of a method of invoking methods of an order cancellation service in turn to cancel the order, according to an embodiment of the disclosure;
FIG. 5 illustrates a block diagram of a dynamic bytecode-based service invocation device, according to an embodiment of the disclosure;
FIG. 6 illustrates a block diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Java code is compiled into bytecode and then executed in a JVM, and the bytecode can be interpreted and executed once loaded into a virtual machine. The bytecode file (. class) is a general binary file, which is generated by a Java compiler. If the original byte code file is analyzed by a specific rule, the byte code file is modified or simply redefined, and the code line can be changed.
FIG. 1 illustrates a schematic diagram of an exemplary operating environment 100 in which embodiments of the present disclosure can be implemented. Included in the runtime environment 100 are a client 102, an order server 104.
FIG. 2 illustrates a flow diagram of a dynamic bytecode-based service invocation method 200 according to an embodiment of the disclosure. The method 200 may be performed by the order server 104 of FIG. 1. As shown in fig. 2, the method comprises the following steps:
at block 210, the order server 104 receives a service invocation instruction;
in some embodiments, the service invocation instruction is for invoking a service, the service including a plurality of methods invoked in sequence.
In block 220, the order server 104 invokes the service according to the service invocation instruction;
at block 230, the order server 104 calls methods of the service in turn based on the dynamic bytecode;
in some embodiments, for each method of the service loaded by the Java virtual machine, checking whether a previous line of a starting position of the method has an annotation which is marked in advance before the method needing to be manually called; if no flag is present, then the next method is checked; if the mark exists, the method is produced into a service which can be manually called through dynamic byte codes; sequentially calling the services produced by the dynamic byte codes; acquiring the called state of the service produced by the dynamic byte codes; if the called state is successful, continuing to call the next method; and if the called state is failure, feeding back calling failure prompt information through an API (application program interface) interface to prompt an operator to carry out manual calling. And receiving a manual calling instruction of an operator, and manually calling the service failed to be called. And repeatedly executing the steps until the services which are produced by the various methods of the services and can be manually called are called to finish. And if not, repeating the steps, and if so, ending the process.
In block 240, the order server 104 feeds back the execution result of the service to the sender of the service invocation instruction.
According to the embodiment of the disclosure, the following technical effects are achieved:
if a certain action of the service fails to be executed, an operator can visually find the problem and manually call the action which fails to be executed, the data corresponding to the action does not need to be operated in a mode of directly operating a database, the operation risk is low, and the efficiency is high.
Next, in an embodiment of the present disclosure, the service is taken as an example for further explanation.
FIG. 3 illustrates a flow diagram of a dynamic bytecode-based order cancellation service invocation method 300, according to an embodiment of the disclosure. The method 300 may be performed by the order server 104 of FIG. 1. As shown in fig. 3, the method comprises the following steps:
at block 310, the order server 104 receives an order cancellation instruction;
in some embodiments, the order cancellation instruction may be an instruction to cancel an order, including an order ID field; or an instruction to cancel a certain SKU in the order, including the order ID field, the SKUID field.
In some embodiments, the order cancellation instruction may be issued by the merchant or by the user.
The order server 104 receives the order cancellation instruction, extracts the order ID field name and the sked field name in the order cancellation instruction, and cancels the order.
At block 320, the order server 104 invokes an order cancellation service to cancel the order according to the order cancellation instruction;
in some embodiments, the order cancellation service includes different cancellation procedures for different order cancellation orders, depending on the entity they issue.
For example, an order cancellation command sent by a merchant, wherein order cancellation service of the order cancellation command comprises a plurality of methods called in sequence, such as order state judgment, order state modification, stock return and refund; the order cancellation service of the order cancellation instruction sent by the user comprises a plurality of methods which are called in sequence, namely, judging the order state, modifying the order state, returning to the stock, intercepting the logistics and refunding.
In the embodiment of the present disclosure, a description is given by taking as an example three methods, which are sequentially called, of order cancellation service including warehouse order cancellation, delivery order cancellation, and refund notification.
At block 330, methods of the order cancellation service are invoked in sequence based on the dynamic bytecode to cancel the order;
in some embodiments, the methods of the order cancellation service are loaded by the Java virtual machine.
In some embodiments, said invoking in turn the methods of the order cancellation service to cancel the order comprises the sub-steps of:
at block 410, for each method of the order cancellation service loaded by the Java virtual machine, checking whether a previous line of the starting position of the method has a comment, wherein the comment is marked in advance before the method needing to be manually called; if no flag is present, then the next method is checked;
in some embodiments, an Annotation (Annotation), also called metadata, is a code level description, which is subject to the Java programming language. The annotation is a characteristic introduced by JDK1.5 and later versions, and is in the same level with class, interface and enumeration; declarations may precede packets, classes, fields, methods, local variables, method parameters, etc. to illustrate, annotate, etc. these elements.
In the embodiment of the present disclosure, when it is required to determine whether the method needs to be produced as a service that can be manually called on the function code corresponding to each method that is called in sequence for the order cancellation service, the annotation may be marked on the function, that is, the annotation is marked in advance before the method that needs to be manually called.
In some embodiments, the annotations are intercepted using the dynamic bytecode technique of jdk, enabling traversal and inspection of each method that the Java virtual machine has loaded.
At block 420, if the flag is present, the method is produced as a manually invokable service by dynamic bytecode;
in some embodiments, the method automatically generates a manually executable Http service based on dynamic bytecode technology.
In some embodiments, during runtime, after the target class of the method is loaded, a bytecode file is dynamically constructed to generate a subclass of the target class; producing the method as a service that can be manually invoked;
in block 430, the services produced by the dynamic bytecode are invoked in sequence; acquiring the called state of the service produced by the dynamic byte codes; if the called state is successful, execute block 440 to continue calling the next method; if the called state is failure, the execution block 450 is executed to feed back calling failure prompt information through the API interface, and prompt the operator to perform manual calling.
In some embodiments, the call failure prompt message is returned to the order server 104 through a state return interface, and the order server 104 stores the call failure prompt message in a log and displays the log to an operator; the calling failure prompt message comprises an order ID field name, a SKUID field name, a name of the service produced by the dynamic byte code and a called state.
In some embodiments, the call success information is transmitted back to the order server 104 through the status transmission interface, and is stored in the log by the order server 104; the calling success prompt message comprises an order ID field name, a SKUID field name, a name of the service produced by the dynamic byte code and a called state.
At block 440, the next service produced by the dynamic bytecode is invoked;
at block 450, call failure prompt information is fed back through the API interface to prompt an operator to make a manual call;
at block 460, a manual call instruction of the operator is received, the service failed to be called is manually called, and block 430 is executed again.
In some embodiments, according to the preset system permission, if the called status is failure, the order server 104 directly calls the service that is failed to be called, and re-executes block 430; the operator does not need to be informed to manually call, so that the execution speed of order cancellation service is improved; meanwhile, the order server 104 stores the operation in a log for later query by the operator.
In some embodiments, the above steps are repeated until each method call of the order cancellation service ends. And judging whether methods are not traversed or not, if so, repeating the steps, and if not, ending the process.
At block 340, the result of the execution of the order cancellation service is fed back to the sender of the order cancellation instruction.
For example, actions such as a warehouse order cancellation method, a delivery order cancellation method, a refund notification method, and the like in order cancellation service are sequentially called and executed, and annotations are respectively marked on a front line of the initial positions of the warehouse order cancellation method, the delivery order cancellation method, and the refund notification method; the warehouse order canceling method, the delivery order canceling method and the refund notification method are produced into warehouse order canceling service, delivery order canceling service and refund notification service which can be manually called through dynamic byte codes; if the warehouse order cancellation service and the delivery order cancellation service are successfully executed and the refund notification service is failed to execute, feeding back refund notification service call failure prompt information through the API interface to prompt an operator to manually call the refund notification service; receiving a manual calling instruction of an operator, and manually calling the refund notification service; and after the warehouse order cancellation service, the delivery order cancellation service and the refund notification service are successfully executed, feeding back the execution result of the order cancellation service (including the execution result of the warehouse order cancellation service, the delivery order cancellation service and the refund notification service) to a sender of an order cancellation instruction.
It is first explained that the above method mainly aims at processing object code applied in JVM, JVM is an abbreviation of Java Virtual Machine, JVM is a specification for computing equipment, it is an imaginary computer, and it is realized by simulating various computer functions on an actual computer. After the Java language virtual machine is introduced, the Java language does not need to be recompiled when running on different platforms. The Java language masks information related to a specific platform using a Java virtual machine, so that a Java language compiler can be executed on a variety of platforms without modification by only generating object codes (bytecodes) to be executed on the Java virtual machine.
Secondly, class bytecode operation function means Instrumentation, i.e. java, lang, instrument is a new feature of JavaSE 5, and by using Instrumentation, a developer can construct an Agent (Agent) independent of an application program to monitor and assist programs running on the JVM, and even replace and modify definitions of certain classes. Java Byte code (Byte-code) is a virtual instruction format executed by a Java virtual machine.
In addition, the introduction of the Premain () function, which as the name implies represents that it will run before the main method of the main program, can be used to perform a series of preparation work before the main program is executed.
According to the embodiment of the disclosure, the following technical effects are achieved:
if the execution of a certain action of the order cancellation service fails, an operator can visually find the problem and manually call the problem, the order cancellation operation is not required to be performed in a mode of directly operating a database, the operation risk is low, and the efficiency is high.
It is noted that while for simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present disclosure is not limited by the order of acts, as some steps may, in accordance with the present disclosure, occur in other orders and concurrently. Further, those skilled in the art should also appreciate that the embodiments described in the specification are exemplary embodiments and that acts and modules referred to are not necessarily required by the disclosure.
The above is a description of embodiments of the method, and the embodiments of the apparatus are further described below.
Fig. 5 shows a block diagram of a dynamic bytecode-based order cancellation service invocation mechanism 500 according to an embodiment of the disclosure. The apparatus 500 may be included in the order server 104 of fig. 1 or implemented as the order server 104. As shown in fig. 5, the apparatus 500 includes:
a receiving module 510, configured to receive a service calling instruction;
a service calling module 520, configured to call the service according to the service calling instruction;
a method calling module 530, configured to sequentially call methods of the service based on the dynamic bytecode;
a feedback module 540, configured to feed back the execution result of the service to the sender of the service invocation instruction.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the described module may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
FIG. 6 illustrates a schematic block diagram of an electronic device 600 that may be used to implement embodiments of the present disclosure. Device 600 may be used to implement at least one of message system 104 and message arrival rate determination system 106 of fig. 1. As shown, device 600 includes a Central Processing Unit (CPU)601 that may perform various appropriate actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM)602 or loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the device 600 can also be stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processing unit 601 performs the various methods and processes described above, such as the methods 200, 300. For example, in some embodiments, the methods 200, 300, 400 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the CPU 601, one or more steps of the methods 200, 300, 400 described above may be performed. Alternatively, in other embodiments, the CPU 601 may be configured to perform the methods 200, 300, 400 by any other suitable means (e.g., by way of firmware).
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a load programmable logic device (CPLD), and the like.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A service calling method based on dynamic byte codes is characterized by comprising the following steps:
receiving a service calling instruction;
calling the service according to the service calling instruction;
sequentially calling each method of the service based on the dynamic byte codes;
and feeding back the execution result of the service to a sender of the service calling instruction.
2. The method of claim 1, wherein the methods of the service are loaded by a Java virtual machine and are invoked sequentially.
3. The method of claim 1, wherein invoking respective methods of the service in turn based on dynamic bytecode comprises:
producing each method of the service into a service which can be manually called based on dynamic byte codes; and sequentially calling the services produced by the dynamic byte codes.
4. The method of claim 3, wherein producing methods of the service as manually invokable services based on dynamic bytecode comprises:
for each method of the service loaded by the Java virtual machine, checking whether a previous line of a starting position of the method is annotated; if no flag is present, then the next method is checked; if the mark exists, the method is produced into a service which can be called manually through dynamic byte codes.
5. The method of claim 4, wherein invoking the services produced by dynamic bytecode in sequence comprises:
sequentially calling the services produced by the dynamic byte codes; acquiring the called state of the service produced by the dynamic byte codes; if the called state is successful, continuing to call the next method; if the called state is failure, feeding back calling failure prompt information to prompt an operator to carry out manual calling; and receiving a manual calling instruction of an operator, and manually calling the service failed to be called.
6. The method of claim 1, wherein the call failure prompt message comprises: the name and called status of the service produced by the dynamic bytecode.
7. The method of claim 1, wherein invoking the services produced by dynamic bytecode in sequence further comprises:
judging whether the service produced by the dynamic bytecode does not exist or not; if yes, continuing to call; if not, the process is ended.
8. A dynamic bytecode-based service invocation apparatus, comprising:
the receiving module is used for receiving a service calling instruction;
the service calling module is used for calling the service according to the service calling instruction;
the method calling module is used for calling each method of the service in sequence based on the dynamic byte codes;
and the feedback module is used for feeding back the execution result of the service to the sender of the service calling instruction.
9. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the processor, when executing the program, implements the method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202010514149.7A 2020-06-08 2020-06-08 Service calling method and device based on dynamic bytecode Pending CN111930478A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010514149.7A CN111930478A (en) 2020-06-08 2020-06-08 Service calling method and device based on dynamic bytecode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010514149.7A CN111930478A (en) 2020-06-08 2020-06-08 Service calling method and device based on dynamic bytecode

Publications (1)

Publication Number Publication Date
CN111930478A true CN111930478A (en) 2020-11-13

Family

ID=73317155

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010514149.7A Pending CN111930478A (en) 2020-06-08 2020-06-08 Service calling method and device based on dynamic bytecode

Country Status (1)

Country Link
CN (1) CN111930478A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114723532A (en) * 2022-04-12 2022-07-08 广州有信科技有限公司 Order operation limiting method, device, equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101035110A (en) * 2007-02-28 2007-09-12 华为技术有限公司 Service transferring method, system and unit
CN103077111A (en) * 2011-10-26 2013-05-01 阿里巴巴集团控股有限公司 Method and system for locating continuous integration failed case
CN104756086A (en) * 2012-10-30 2015-07-01 甲骨文国际公司 System and method for debugging domain specific languages
CN106502769A (en) * 2016-09-30 2017-03-15 华为技术有限公司 Distributed transaction processing method, apparatus and system
CN107133090A (en) * 2017-05-04 2017-09-05 山东浪潮通软信息科技有限公司 A kind of method for processing business and device
CN108549577A (en) * 2018-04-23 2018-09-18 昆山融捷信息技术有限公司 Intelligent scheduling business data processing method
CN109144534A (en) * 2017-06-28 2019-01-04 北京京东尚科信息技术有限公司 Service module dynamic updating method, device and electronic equipment
CN110008224A (en) * 2019-03-08 2019-07-12 阿里巴巴集团控股有限公司 A kind of db transaction processing method and processing device
CN110045952A (en) * 2019-04-19 2019-07-23 京东数字科技控股有限公司 Code call method and device
CN110245030A (en) * 2019-05-29 2019-09-17 北京字节跳动网络技术有限公司 A kind of data service providing method, device, medium and electronic equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101035110A (en) * 2007-02-28 2007-09-12 华为技术有限公司 Service transferring method, system and unit
CN103077111A (en) * 2011-10-26 2013-05-01 阿里巴巴集团控股有限公司 Method and system for locating continuous integration failed case
CN104756086A (en) * 2012-10-30 2015-07-01 甲骨文国际公司 System and method for debugging domain specific languages
CN106502769A (en) * 2016-09-30 2017-03-15 华为技术有限公司 Distributed transaction processing method, apparatus and system
CN107133090A (en) * 2017-05-04 2017-09-05 山东浪潮通软信息科技有限公司 A kind of method for processing business and device
CN109144534A (en) * 2017-06-28 2019-01-04 北京京东尚科信息技术有限公司 Service module dynamic updating method, device and electronic equipment
CN108549577A (en) * 2018-04-23 2018-09-18 昆山融捷信息技术有限公司 Intelligent scheduling business data processing method
CN110008224A (en) * 2019-03-08 2019-07-12 阿里巴巴集团控股有限公司 A kind of db transaction processing method and processing device
CN110045952A (en) * 2019-04-19 2019-07-23 京东数字科技控股有限公司 Code call method and device
CN110245030A (en) * 2019-05-29 2019-09-17 北京字节跳动网络技术有限公司 A kind of data service providing method, device, medium and electronic equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
李苏;刘建勋;: "Web服务的绑定与调用方法研究", 计算机技术与发展, no. 06 *
王伟峰;刘晓东;刘国荣;王颖;: "使用Java字节码实现动态组件", 微电子学与计算机, no. 03 *
程旭;巨克真;郭伟;: "性能监控框架Jwebap的研究与改进", 计算技术与自动化, no. 04 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114723532A (en) * 2022-04-12 2022-07-08 广州有信科技有限公司 Order operation limiting method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110096338B (en) Intelligent contract execution method, device, equipment and medium
CN106815031B (en) Kernel module loading method and device
US11550599B2 (en) Method and apparatus for running applet
US9766865B2 (en) Maintaining consistency amongst data structures that are referenced within different programs
CN106055368B (en) application updating method and device
CN110865889B (en) Method and device for transmitting event between components
US8464230B2 (en) Methods and systems to implement non-ABI conforming features across unseen interfaces
EP1752873A2 (en) Method and apparatus for providing support for introspection for local and anonymous classes
CN111797020A (en) Mock data method and device based on dynamic bytecode
CN111061489B (en) Multi-platform compiling detection method, device, equipment and medium
CN111831365A (en) Interface route forwarding method, system, computer equipment and readable storage medium
CN113641354A (en) Service data processing method and device, electronic equipment and storage medium
CN111930478A (en) Service calling method and device based on dynamic bytecode
CN111736817B (en) Method and device for determining function execution time consumption, terminal equipment and storage medium
CN111105289B (en) Method and device for judging cancellation of client order based on aop mode
CN110045952B (en) Code calling method and device
CN112445706A (en) Program abnormal code acquisition method and device, electronic equipment and storage medium
CN112364109A (en) Event service association method, system, device, electronic equipment and storage medium
CN111625225A (en) Program specified data output method and device
US11429358B2 (en) Representing asynchronous state machine in intermediate code
US20040015876A1 (en) Method and structure of implementing a safe pointer
CN115022312A (en) Method and device for realizing multiple intelligent contract engines, electronic equipment and storage medium
CN108920219B (en) Service processing method and device based on open platform
CN113282487A (en) Programming language debugging method and device and terminal equipment
WO2012079818A1 (en) A method for validating run-time references

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