CN111061623A - Method, device, middle platform server, storage medium and system for debugging program - Google Patents

Method, device, middle platform server, storage medium and system for debugging program Download PDF

Info

Publication number
CN111061623A
CN111061623A CN201910631678.2A CN201910631678A CN111061623A CN 111061623 A CN111061623 A CN 111061623A CN 201910631678 A CN201910631678 A CN 201910631678A CN 111061623 A CN111061623 A CN 111061623A
Authority
CN
China
Prior art keywords
program
program segment
target
client
result
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.)
Granted
Application number
CN201910631678.2A
Other languages
Chinese (zh)
Other versions
CN111061623B (en
Inventor
杨浩
姚帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huakong Tsingjiao Information Technology Beijing Co Ltd
Original Assignee
Huakong Tsingjiao Information Technology Beijing 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 Huakong Tsingjiao Information Technology Beijing Co Ltd filed Critical Huakong Tsingjiao Information Technology Beijing Co Ltd
Priority to CN201910631678.2A priority Critical patent/CN111061623B/en
Publication of CN111061623A publication Critical patent/CN111061623A/en
Application granted granted Critical
Publication of CN111061623B publication Critical patent/CN111061623B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application provides a method, a device, a middle station server, a storage medium and a system for debugging a program, and aims to more accurately locate an abnormal position in the program when writing the program based on a secret text. The method is applied to a middle server in a program debugging system, and comprises the following steps: receiving a program segment execution request sent by the client, wherein the program segment execution request carries a target program segment in a program to be debugged; sending the target program segment to a background server; obtaining a program segment execution result from the background server, wherein the program segment execution result is a plaintext result obtained after the background server executes a part of program and a result display function in sequence under the condition that the target program segment comprises the part of program and the result display function; and sending the plaintext result to the client.

Description

Method, device, middle platform server, storage medium and system for debugging program
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method, a device, a middle station server, a storage medium and a system for debugging a program.
Background
In the context of writing a ciphertext-based program, variables in the program are encrypted. When a developer writes a program by using programming software, the developer usually debugs a section of program after writing the program. The specific debugging method comprises the following steps: and determining whether the section of program is abnormal or not by executing the section of program and observing a plaintext result of a ciphertext variable output after the program is executed. If the program has an exception, the developer needs to look at the code line by line so as to locate the exception position.
In the case of a shorter program, the developer may be able to locate the exception location from a small number of lines of code with less effort. However, in general, the length of the program is long, and the number of code lines in the program is huge. Therefore, in general, a developer needs to pay more labor to locate an abnormal position from a huge number of code lines, which causes low debugging efficiency, affects programming efficiency, and is difficult to ensure the correctness of codes in a program.
Disclosure of Invention
The embodiment of the application provides a method, a device, a middle station server, a storage medium and a system for debugging a program, and aims to more accurately and more quickly locate an abnormal position in the program when writing the program based on a secret text.
A first aspect of an embodiment of the present application provides a method for debugging a program, which is applied to a middle server in a program debugging system, where the program debugging system further includes a client and a background server, the client is in communication connection with the middle server, and the middle server is in communication connection with the background server; the method comprises the following steps:
receiving a program segment execution request sent by the client, wherein the program segment execution request carries a target program segment in a program to be debugged, and the target program segment is any one of a plurality of program segments obtained after the client splits the program to be debugged according to the received breakpoint setting information;
responding to the program segment execution request, and sending the target program segment to a background server;
obtaining a program segment execution result from the background server, wherein the program segment execution result is a plaintext result obtained after the background server executes a part of program and a result display function in sequence under the condition that the target program segment comprises the part of program and the result display function, a ciphertext variable value is obtained by executing the part of program, and the plaintext result is obtained by converting the ciphertext variable value by executing the result display function;
and sending the plaintext result to the client.
Optionally, the background server comprises a plurality of computing nodes and a plurality of data nodes; the method further comprises the following steps:
distributing target computing nodes for the program to be debugged from the plurality of computing nodes;
distributing target data nodes for the program to be debugged from the plurality of data nodes;
wherein, responding to the program segment execution request, sending the target program segment to a background server, and the method comprises the following steps:
sending the target program segment to the target computing node in response to the program segment execution request;
obtaining a program segment execution result from the background server, including:
receiving value-taking prompt information sent by the target computing node;
responding to the value-taking prompt message, and sending a value-taking request to the target data node;
and obtaining the program segment execution result stored by the target data node, wherein the program segment execution result is stored after the target data node responds to the value taking request and obtains the program segment execution result from the target computing node.
Optionally, the method further comprises:
configuring a first identifier for the program to be debugged, and sending the first identifier to the client;
receiving a program segment execution request sent by the client, including:
receiving a program segment execution request which is sent by the client and carries the first identifier and a target program segment;
wherein, responding to the program segment execution request, sending the target program segment to a background server, and the method comprises the following steps:
responding to the program segment execution request, sending the first identifier and the target program segment to the background server, so that the background server returns a program segment execution result carrying the first identifier after the target program segment is executed;
obtaining a program segment execution result from the background server, including:
obtaining a program segment execution result carrying the first identifier from the background server;
wherein sending the plaintext result to the client comprises:
and determining a client corresponding to the first identifier, and sending the program segment execution result to the determined client.
Optionally, the background server comprises a plurality of computing nodes and a plurality of data nodes; the method further comprises the following steps:
allocating a target computing node corresponding to the first identifier from the plurality of computing nodes, and allocating a target data node corresponding to the first identifier from the plurality of data nodes;
responding to the program segment execution request, and sending the first identifier and the target program segment to the background server, wherein the method comprises the following steps:
responding to the program segment execution request, and determining a target computing node and a target data node corresponding to the first identification;
and sending the first identifier and the target program segment to the target computing node, so that the target computing node finishes executing the target program segment, and the target data node stores a program segment execution result carrying the first identifier.
Optionally, sending the plaintext result to the client includes:
obtaining a state result representing the running state of the background server;
combining the plaintext result with the state result to obtain a calculation result;
and sending the calculation result comprising the plaintext result to the client.
Optionally, the method further comprises:
under the condition that a data set query request sent by the client is received, sending a data set list to the client, wherein the data set list comprises a plurality of data sets and a second identifier corresponding to each data set;
and binding a target data set corresponding to a second identifier with a ciphertext variable in the program to be debugged according to the second identifier carried by the data set binding request under the condition of receiving the data set binding request sent by the client, so as to initialize the value of the ciphertext variable by using the target data set through the background server.
Optionally, the method further comprises:
and setting a storage area for storing the plaintext result aiming at the program to be debugged, wherein the storage area is not overlapped with the storage area for storing the plaintext results corresponding to other programs to be debugged.
Optionally, the method further comprises:
under the condition that the target program segment is a calculation program, obtaining a null value result obtained by executing the calculation program from the background server, and sending the null value result to the client;
and under the condition that the target program segment is an exit program, obtaining a null value result obtained by executing the exit program from the background server, and sending the null value result to the client.
A second aspect of the embodiments of the present application provides a device for debugging a program, which is applied to a middle server in a program debugging system, where the program debugging system further includes a client and a background server, the client is in communication connection with the middle server, and the middle server is in communication connection with the background server; the device comprises:
the system comprises a receiving module and a debugging module, wherein the receiving module is used for receiving a program segment execution request sent by the client, the program segment execution request carries a target program segment in a program to be debugged, and the target program segment is any one of a plurality of program segments obtained after the client splits the program to be debugged according to received breakpoint setting information;
the first sending module is used for responding to the program segment execution request and sending the target program segment to a background server;
the obtaining module is used for obtaining a program segment execution result from the background server, wherein the program segment execution result is a plaintext result obtained after the background server executes a part of program and a result display function in sequence under the condition that the target program segment comprises the part of program and the result display function, a ciphertext variable value is obtained by executing the part of program, and the plaintext result is obtained by converting the ciphertext variable value by executing the result display function; and the number of the first and second groups,
and the second sending module is used for sending the plaintext result to the client.
Optionally, the background server comprises a plurality of computing nodes and a plurality of data nodes; the device further comprises:
the first distribution module is used for distributing target computing nodes for the program to be debugged from the plurality of computing nodes;
the second distribution module is used for distributing target data nodes for the program to be debugged from the plurality of data nodes;
wherein the first transmitting module comprises:
a first sending submodule, configured to send the target program segment to the target computing node in response to the program segment execution request;
wherein the acquisition module comprises:
the first receiving submodule is used for receiving the value-taking prompt information sent by the target computing node;
the second sending submodule is used for responding to the value-taking prompt message and sending a value-taking request to the target data node;
and the first obtaining sub-module is used for obtaining the program segment execution result stored by the target data node, wherein the program segment execution result is stored after the target data node responds to the value taking request and obtains the program segment execution result from the target computing node.
Optionally, the apparatus further comprises:
the identification configuration module is used for configuring a first identification for the program to be debugged and sending the first identification to the client;
wherein the receiving module comprises:
the second receiving submodule is used for receiving a program segment execution request which is sent by the client and carries the first identifier and the target program segment;
wherein the first transmitting module comprises:
the second sending submodule is used for responding to the program segment execution request, sending the first identifier and the target program segment to the background server, so that the background server returns a program segment execution result carrying the first identifier after the target program segment is executed;
wherein the acquisition module comprises:
the second obtaining submodule is used for obtaining a program segment execution result carrying the first identifier from the background server;
wherein the second sending module comprises:
and the first determining submodule is used for determining the client corresponding to the first identifier and sending the program segment execution result to the determined client.
Optionally, the background server comprises a plurality of computing nodes and a plurality of data nodes; the device further comprises:
a third allocating module, configured to allocate a target computing node corresponding to the first identifier from the plurality of computing nodes, and allocate a target data node corresponding to the first identifier from the plurality of data nodes;
wherein the first transmitting module comprises:
the second determining submodule is used for responding to the program segment execution request and determining a target computing node and a target data node corresponding to the first identification;
and the third sending submodule is used for sending the first identifier and the target program segment to the target computing node so that the target computing node finishes executing the target program segment and the target data node stores a program segment execution result carrying the first identifier.
Optionally, the second sending module includes:
the third obtaining submodule is used for obtaining a state result representing the running state of the background server;
the combining submodule is used for combining the plaintext result with the state result to obtain a calculation result;
and the fourth sending submodule is used for sending the calculation result comprising the plaintext result to the client.
Optionally, the apparatus further comprises:
a third sending module, configured to send a data set list to the client when receiving a data set query request sent by the client, where the data set list includes multiple data sets and a second identifier corresponding to each data set;
and the data set binding module is used for binding a target data set corresponding to a second identifier with a ciphertext variable in the program to be debugged according to the second identifier carried by the data set binding request under the condition of receiving the data set binding request sent by the client, so that the value of the ciphertext variable is initialized by using the target data set through the background server.
Optionally, the apparatus further comprises:
and the storage area setting module is used for setting a storage area for storing the plaintext result aiming at the program to be debugged, and the storage area is not overlapped with the storage area for storing the plaintext results corresponding to other programs to be debugged.
Optionally, the apparatus further comprises:
a fourth sending module, configured to, when the target program segment is a computing program, obtain, from the backend server, a null result obtained by executing the computing program, and send the null result to the client;
and a fifth sending module, configured to, when the target program segment is an exit program, obtain, from the background server, a null result obtained by executing the exit program, and send the null result to the client.
A third aspect of embodiments of the present application provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps in the method according to the first aspect of the present application.
A fourth aspect of the embodiments of the present application provides a middlebox server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the method according to the first aspect of the present application.
A fifth aspect of an embodiment of the present application provides a program debugging system, including: the system comprises a client, a middle server and a background server, wherein the client is in communication connection with the middle server, and the middle server is in communication connection with the background server; the middlebox server is configured to perform the steps of the method according to the first aspect of the present application.
By adopting the method for debugging the program, the middle platform server receives the target program segment in the multiple program segments of the program to be debugged sent by the client, and then sends the target program segment to the background server for execution. And under the condition that the target program segment comprises a result display function, the background server successively executes a part of programs and the result display function to obtain the value of the ciphertext variable and convert the value of the ciphertext variable into a plaintext result, and the middle server obtains the plaintext result from the background server and transfers the plaintext result to the client.
In a program scene based on cipher text, by executing the method for debugging the program provided by the embodiment of the application, each program segment in a plurality of program segments of the program to be debugged can be tested independently, and a plaintext result after the program segment is executed can be obtained under the condition that the program segment includes a result display function, a middle server obtains the plaintext result from a background server and transfers the plaintext result to a client, and a program developer can judge the correctness of the small segment of the program segment according to the plaintext result. Therefore, the method provided by the embodiment of the application is beneficial to positioning the abnormal position from the whole program to be debugged more quickly and accurately, so that the programming efficiency is improved, and the code correctness in the program is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a flow chart of a method for debugging a program according to an embodiment of the present application;
FIG. 2 is a diagram of a program debugging system according to an embodiment of the present application;
FIG. 3 is an example of a program to be debugged according to an embodiment of the present application;
FIG. 4 is a diagram of a program debugging system according to another embodiment of the present application;
FIG. 5 is a flow chart of a method for debugging a program according to another embodiment of the present application;
FIG. 6 is a flow chart of a method for debugging a program according to another embodiment of the present application;
FIG. 7 is a diagram of a program debugging system according to another embodiment of the present application;
fig. 8 is a schematic diagram of an apparatus for debugging a program according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the embodiments described below are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The applicant found that in the related art, in the context of writing a ciphertext-based program, variables in the program are typically encrypted by an encryption function. When a developer debugs a program, the plaintext result calculated in the last step in the program can be obtained only after the whole program is completely executed, that is, the plaintext data of the ciphertext variable can be checked only after the whole program is completely executed. If an exception exists in the program, developers are difficult to accurately and quickly locate the exception position in the program, the programming efficiency is influenced, and the correctness of codes in the program is difficult to ensure.
Based on the above findings, the applicant has proposed some solutions to the above problems, and aims to more accurately and quickly locate an abnormal position in a program when writing a ciphertext-based program.
Referring to fig. 1, fig. 1 is a flowchart of a method for debugging a program according to an embodiment of the present application. The method is applied to a middle server in a program debugging system, and referring to fig. 2, fig. 2 is a schematic diagram of the program debugging system according to an embodiment of the present application. As shown in fig. 2, the program debugging system includes a client, a middle server and a background server. The number of the clients can be one or more, each client is in communication connection with the middle server, and the middle server is in communication connection with the background server.
As shown in fig. 1 and 2, the method comprises the steps of:
step S11: and receiving a program segment execution request sent by the client, wherein the program segment execution request carries a target program segment in the program to be debugged, and the target program segment is any one of a plurality of program segments obtained after the client segments the program to be debugged according to the received breakpoint setting information.
In this embodiment, the client refers to software that can interact with a user, and can segment a program to be debugged into multiple program segments according to breakpoint setting information input by the user. For example, the client may be a jupyter notebook, Ipython, or other programming software.
In this embodiment, the target program segment received by the middle station server may be a program segment that is sequentially sent to the middle station server by the client according to the front-back sequence of the plurality of program segments.
Referring to fig. 3, fig. 3 is an example of a program to be debugged according to an embodiment of the present application. Taking the program shown in fig. 3 as an example, a developer writes the program in a ciphertext-based scenario by using a client, so that variables a1, a2, a3, a4, and a5 in the program are encrypted. As shown in fig. 3, the developer encrypts the variables using encryption functions such as pp.sint (), pp.iarr (), and the like. The developer inputs breakpoint setting information to the client, and the client divides the program into a plurality of program segments according to the breakpoint setting information. As shown in FIG. 3, for example, the program is divided into five program segments, i.e., in [5], in [6], in [7], in [8] and in [9], where in [5], in [6], etc. are displayed as one UI element on the screen of the client, so that the user can more quickly distinguish the position of each breakpoint. It should be understood that the encryption functions shown in fig. 3, such as pp.sint (), pp.iarr (), etc., are merely exemplary of a variety of alternative encryption functions and are not intended to limit the present application.
When debugging the program to be debugged shown in fig. 3, the middle server receives the program segments in [5], in [6], in [7], in [8] and in [9] sent by the client in sequence. Specifically, the middle station server firstly receives the in [5] program segment sent by the client, and then receives the in [6] program segment sent by the client after the in [5] program segment is debugged, so as to start debugging the in [6] program segment.
Step S12: and responding to the program segment execution request, and sending the target program segment to a background server.
Taking the program to be debugged shown in fig. 3 as an example, assuming that the program segment execution request carries the in [6] program segment, the middle server sends the in [6] program segment to the background server for execution.
Step S13: and obtaining a program segment execution result from the background server, wherein the program segment execution result is a plaintext result obtained after the background server executes the partial program and the result display function in sequence under the condition that the target program segment comprises the partial program and the result display function, a ciphertext variable value is obtained by executing the partial program, and the plaintext result is obtained by executing the result display function and converting the ciphertext variable value.
In this embodiment, a part of the program is used to calculate the ciphertext variable, thereby obtaining the value of the ciphertext variable; the result display function is used for converting the value of the ciphertext variable into a plaintext result.
Taking the in [6] program segment in the program to be debugged shown in fig. 3 as an example, where res, a1, and a2 are all ciphertext variables, the background server calculates the value of the ciphertext variable res by executing the code "res ═ a1 × a 2", and then converts the value of the ciphertext variable res into a plaintext result by executing the code "pp. It should be understood that the debug _ recent () function shown in fig. 3 is only one example of a variety of optional result presentation functions and is not intended to limit the present application.
Step S14: and sending the plaintext result to the client.
In the method including steps S11 to S14, the information interaction between the middle station server and the client may be performed based on an HTTP Protocol, and the information interaction between the middle station server and the background server may be performed based on a GRPC Protocol (Google Remote procedure call Protocol). It should be understood that the information interaction protocol used among the client, the middle server and the background server is not limited to the above examples, and the above examples should not be construed as limiting the present application.
Under the program scene based on the ciphertext, by executing the method comprising the steps S11 to S14, each program segment in a plurality of program segments of the program to be debugged can be tested independently, and in the case that the program segment comprises a result display function, a plaintext result after the program segment is executed can be obtained, the middle server obtains the plaintext result from the background server and transfers the plaintext result to the client, and the program developer can judge the correctness of the small segment of program segment according to the plaintext result. Therefore, the method provided by the embodiment of the application is beneficial to positioning the abnormal position from the whole program to be debugged more quickly and accurately, so that the programming efficiency is improved, and the code correctness in the program is ensured.
Referring to fig. 4, fig. 4 is a schematic diagram of a program debugging system according to another embodiment of the present application. The background server of the program debugging system may include a plurality of computing nodes and a plurality of data nodes, and for simplifying the drawing, only one computing node (taking the computing node as a target computing node for example) and one data node (taking the data node as a target data node for example) are schematically shown in fig. 4.
The target computing node is used for executing codes of the target program segment, and the target data node is used for temporarily storing program segment execution results of the target computing node, such as plaintext results. The plurality of computing nodes may be distributed among a plurality of computers, and the plurality of data nodes may be distributed among a plurality of computers. The same computer may include at least one computing node, and may also include at least one data node. In the above case, the background server may be understood as a sum of a plurality of computers.
In the case where the background server includes a plurality of computing nodes and a plurality of data nodes, referring to fig. 5, fig. 5 is a flowchart of a method for debugging a program according to another embodiment of the present application.
As shown in fig. 4 and 5, the method includes the steps of:
step S51: and distributing target computing nodes for the program to be debugged from the plurality of computing nodes.
Considering that the middle server may simultaneously face multiple clients and perform parallel processing on respective programs to be debugged of the multiple clients, by executing step S51, a target computing node is allocated to each program to be debugged, which not only can implement parallel computing and improve debugging efficiency, but also can ensure the operating stability inside the background server.
In this embodiment, the middlebox server selects at least one computing node in an available state from the plurality of computing nodes, and determines the selected computing node as a target computing node to be allocated to the program to be debugged. The available state refers to a computing node which is not in a shutdown or downtime state.
The middle server can periodically receive and store heartbeat information sent by each computing node, and the heartbeat information represents the state of the computing node. For example, in a case where the middle server does not receive heartbeat information of a certain computing node for a plurality of times, the state of the computing node may be updated from the available state to the unavailable state, and when a computing node is allocated to a subsequent program to be debugged, the computing node in the unavailable state is not allocated to the program to be debugged.
Step S52: and distributing target data nodes for the program to be debugged from the plurality of data nodes.
In this embodiment, the allocated target data node is used to temporarily store the program segment execution result obtained after the target computing node executes the target program segment.
In the present embodiment, the sequence of step S51 and step S52 may be interchanged. Steps S51 and S52 can be regarded as preparation work performed by the program debugging system before debugging the program to be debugged by the middle server. Taking the program to be debugged shown in fig. 3 as an example, the middlebox server allocates at least one computing node and at least one data node to the program to be debugged in advance through steps S51 and S52. After steps S51 and S52, the program debugging system starts debugging for program segments in [5] to in [9], respectively.
Step S53: and responding to the program segment execution request, and sending the target program segment to the target computing node.
In this embodiment, the middle server transmits the target program segment to the background server by executing step S53.
Taking the program to be debugged shown in fig. 3 as an example, it is assumed that the middlebox server allocates the 12 th computing node of the 50 computing nodes to the program to be debugged. When the middle server receives a program segment execution request carrying the in 6 program segment sent by the client, the middle server sends the in 6 program segment to the 12 th computing node for execution.
Step S54: and receiving value-taking prompt information sent by the target computing node.
In this embodiment, the value-taking prompt message received by the middle server is sent by the middle server after the target computing node executes the target program segment.
Step S55: and responding to the value-taking prompt message, and sending a value-taking request to the target data node.
In this embodiment, after receiving the value-taking prompt message, the middle station server represents that the target computing node has executed the target program segment, and generates a program segment execution result, that is, a plaintext result. And the middle station server sends a value taking request to the target data node, so that the target data node obtains a program segment execution result from the target computing node after receiving the value taking request.
Step S56: and obtaining the program segment execution result stored by the target data node, wherein the program segment execution result is stored after the target data node responds to the value taking request and obtains the program segment execution result from the target computing node.
In this embodiment, the target data node responds to the value taking request sent by the middlebox server, and determines a target computing node serving the same program to be debugged from a plurality of computing nodes in the background server through computing node identification information sent by the middlebox server in advance, so that the target data node can communicate with the target computing node to obtain a program segment execution result. Wherein, the computing node identification information may be an IP address, a port number, etc. of the computing node. The information of the computing node identification of each computing node is stored in the middle-stage server, and the computing node identification information acquired by the target data node may be information carried by the configuration information when the middle-stage server sends the configuration information to the target data node after the target computing node and the target data node are allocated to the program to be debugged. Or the computer identification information may also be information carried by the value taking request when the middle station server sends the value taking request to the target data node.
In this embodiment, the middlebox server obtains the program segment execution result from the background server by executing steps S54 to S56. And in steps S54 to S56, the target computing node and the target data node cooperate with each other in a division manner, wherein the target computing node is used for executing the target program segment, and the target data node is used for temporarily storing the program segment execution result and interacting with the middle server, so that the program segment execution result is returned to the middle server. Under the condition that the target computing node and the target data node are in work sharing and cooperation, the parallel performance of the program debugging system is improved, the debugging efficiency is improved, and the stability of the background server is enhanced.
The method comprises the steps of considering that a middle server can face a plurality of clients at the same time and conduct parallel processing aiming at programs to be debugged of the clients. In order to enable the middlebox server to distinguish a plurality of programs to be debugged that are processed in parallel, in this embodiment, the middlebox server may configure a first identifier for each program to be debugged, where the first identifiers of the programs to be debugged are different from each other. In view of the above, please refer to fig. 6, fig. 6 is a flowchart of a method for debugging a program according to another embodiment of the present application.
As shown in fig. 6, the method may further include step S10 in addition to steps S11 to S14. Wherein, step S10: and configuring a first identifier for the program to be debugged, and sending the first identifier to the client.
In this embodiment, step S10 can be regarded as a preparation performed by the middle-stage server before the program debugging system debugs the program to be debugged. Taking the program to be debugged shown in fig. 3 as an example, the middlebox server configures a first identifier for the program to be debugged in advance through step 10. After step S10, the program debugging system starts debugging the program segments in [5] to in [9], respectively.
For example, before the client debugs the program to be debugged through the middle server and the background server, the client may send a debugging request to the middle server in advance, and the middle server responds to the debugging request, so as to configure the first identifier for the program to be debugged of the client.
Or exemplarily, before the client debugs the program to be debugged through the middle server and the background server, the client sends a data set binding request to the middle server in advance, and aims to enable the middle server to respond to the data set binding request, so as to send a data set list to the client, enable the client to bind a data set for a ciphertext variable in the program to be debugged according to the data set list, and initialize the ciphertext variable according to the bound data set when the background server executes the program segment. The middle server responds to the data set binding request, so that the first identifier can be configured for the program to be debugged of the client.
After the step S10 is performed to configure the first identifier for the program to be debugged, in order to enable the middlebox server to perform information interaction with the client or the backend server later, the middlebox server can determine, according to the received information sent by the client or the backend server, which specific program to be debugged is in the plurality of programs to be debugged. Therefore, when the middle server performs information interaction with the client or the background server, each piece of interaction information can carry the first identifier of the corresponding program to be debugged.
For example, in step S11, the receiving, by the middlebox server, the program segment execution request sent by the client may specifically include: and the middle station server receives a program segment execution request which is sent by the client and carries the first identifier and the target program segment.
For example, in step S12, the sending, by the middle server, the target program segment to the background server in response to the program segment execution request may specifically include: and the middle station server responds to the program segment execution request and sends the first identifier and the target program segment to the background server, so that the background server returns a program segment execution result carrying the first identifier after the target program segment is executed.
The background server can comprise a plurality of computing nodes and a plurality of data nodes, the middle platform server allocates target computing nodes for the program to be debugged from the computing nodes in advance, and allocates target data nodes for the program to be debugged from the data nodes. The first identifier of the program to be debugged corresponds to the target computing node, and the first identifier of the program to be debugged corresponds to the target data node.
When the middle server responds to the program segment execution request and sends the first identifier and the target program segment to the background server, the method may specifically include:
responding to the program segment execution request, and determining a target computing node and a target data node corresponding to the first identification; and sending the first identifier and the target program segment to the target computing node, so that the target computing node finishes executing the target program segment, and the target data node stores a program segment execution result carrying the first identifier.
For example, in step S13, the obtaining, by the foreground server, the execution result of the program segment from the background server may specifically include: and obtaining a program segment execution result carrying the first identifier from the background server.
For example, in step S14, the sending, by the middleman server, the plaintext result to the client may specifically include: and determining a client corresponding to the first identifier, and sending the program segment execution result to the determined client.
Taking the program to be debugged shown in fig. 3 as an example, assuming that the first identifier configured for the program to be debugged by the middle server is ts0021, after the middle server sends the first identifier ts0021 to the client, the middle server indicates that the preparation process before the program debugging is performed is completed. After receiving the first identifier ts0021, the client starts to send the program segments in [5] to in [9] to the middle server one by one, so that the program segments are transferred to the background server through the middle server to be executed. Taking the program segment in [6] as an example, the client sends a program segment execution request carrying the first identifier ts0021 and the program segment in [6] to the middle server.
After receiving the program segment execution request, the middle server determines a target computing node corresponding to the first identifier ts0021 in the multiple computing nodes of the background server according to the first identifier ts0021 carried by the middle server. The middle server sends the first identifier ts0021 and the program segment in [6] to the target computing node. And after the target computing node executes the program segment in [6], sending value-taking prompt information to the middle station server. And the middle server responds to the value prompt message and sends a value request to the target data node corresponding to the first identifier ts 0021. And the target data node responds to the value taking request, acquires a program segment execution result carrying the first identifier ts0021 from the target computing node, and stores the program segment execution result. And the middle server acquires the program segment execution result carrying the first identifier ts0021 from the target data node, and determines the corresponding program to be debugged according to the first identifier ts0021, so as to determine the client corresponding to the program to be debugged. And the middle server sends the program segment execution result to the client.
It should be understood that the present application is not limited to the above examples. For example, after the middle server receives a program segment execution request carrying the first identifier ts0021 and the program segment in [6], and determines a target computing node corresponding to the first identifier ts0021 in a plurality of computing nodes of the middle server according to the first identifier ts0021, the middle server may send the program segment in [6] to the target computing node. After receiving the value-taking prompt message sent by the target computing node, the middle-station server can send the value-taking request carrying the first identifier ts0021 to the corresponding target data node. And the target data node responds to the value taking request, acquires a program segment execution result from the target computing node, and returns the program segment execution result and the first identifier ts0021 carried by the value taking request to the middle server.
It is considered that before debugging the program to be debugged, the ciphertext variable in the program to be debugged needs to be initialized. One possible implementation is: the ciphertext variable is initialized manually. Another possible implementation is: the debugging is performed in advance through the middle server so as to improve the debugging efficiency. Specifically, the middlebox server may perform the following steps in advance before performing the above step S11, or before performing the above step S10, or before performing the above step S51:
under the condition that a data set query request sent by the client is received, sending a data set list to the client, wherein the data set list comprises a plurality of data sets and a second identifier corresponding to each data set;
and binding a target data set corresponding to a second identifier with a ciphertext variable in the program to be debugged according to the second identifier carried by the data set binding request under the condition of receiving the data set binding request sent by the client, so as to initialize the value of the ciphertext variable by using the target data set through the background server.
Taking the program to be debugged shown in fig. 3 as an example, the client sends a data set query request to the middlebox server. And the server responds to the data set query request, sends a data set list to the client, and the client receives and displays the data set list to the developer. And the client receives the binding information input by the developer and forms a data set binding request according to the binding information. Assuming that a developer selects 3 ten thousand artificial resource data sets with the second identifier sjj006 in the data set list and binds the data sets to the ciphertext variable a1 in the program to be debugged shown in fig. 3, at least the second identifier sjj006 is carried in the data set binding request. The client sends the data set binding request to the central station server, and the central station server binds the ciphertext variable a1 with 3 ten thousand artificial resource data sets according to the second identifier sjj006 carried by the data set binding request. When debugging is performed on a specific program segment subsequently, a target computing node executing the program segment obtains a second identifier sjj006 corresponding to the ciphertext variable a1, and determines a corresponding data node according to the second identifier sjj006, wherein the data node stores a specific numerical value of 3 ten thousand artificial resource data sets. The target computing node reads the specific values of the 3 ten thousand artificial data sets, thereby initializing the ciphertext variable a 1.
The middle server executes the steps, so that a developer can directly utilize the existing data set of the program debugging system or the data set derived from other databases. On one hand, the debugging efficiency can be improved, and the labor cost is reduced; on the other hand, the data sets can comprise a plurality of numerical values, and the data sets comprising the plurality of numerical values are used for initializing the ciphertext variables, so that the initial values of the ciphertext variables are relatively random, the false detection risk caused by single detection data can be effectively reduced, and the detection accuracy is improved.
It is considered that the background server may cause the state of the background server to change in the case where an error code exists in the target program segment when the background server executes the target program segment. Therefore, the state result for representing the running state of the background server can reflect the correctness of the target program segment to a certain extent. Based on the above consideration, when the middlebox server sends the plaintext result to the client, the method specifically includes the following steps:
obtaining a state result representing the running state of the background server;
combining the plaintext result with the state result to obtain a calculation result;
and sending the calculation result comprising the plaintext result to the client.
For example, the running state characterizing the background server may be: the target computing node executes the error code in the target program segment, so that the communication between the target computing node and the middle station server is disconnected, for example, the GRPC connection between the target data node and the middle station server is disconnected. Or, the operation state of the characterization background server may also be: and the target computing node cannot match the corresponding data set from the data node according to the second identifier corresponding to the ciphertext variable.
The middle server combines the plaintext result with the state result and sends the combined calculation result to the client, so that a developer can more comprehensively master the execution condition of the target program segment, and the abnormal position can be more accurately positioned from the program to be debugged.
Considering that the middle server may face multiple clients at the same time, parallel processing is performed on the programs to be debugged of the multiple clients, and the program segment execution results of the target program segments of the programs to be debugged are stored at the same time. Since the variable names of the ciphertext variables in each target program segment may overlap, in order to avoid confusion of program segment execution results when the variable names of a plurality of ciphertext variables are the same, the intermediate server may perform the following steps:
and setting a storage area for storing the plaintext result aiming at the program to be debugged, wherein the storage area is not overlapped with the storage area for storing the plaintext results corresponding to other programs to be debugged.
For example, the staging server may set a storage area for the program to be debugged in advance before debugging all program segments of the program to be debugged. Taking the program to be debugged shown in fig. 3 as an example, the middle server sets a storage area for the program to be debugged in advance, and then starts to debug the program segments in [5] to in [9] one by one.
The above embodiment is based on the case where the result presentation function is included in the target program segment. While some program segments in the program to be debugged may not include result presentation functions.
For example, in the case where the target program segment is a calculation program, the middlebox server obtains a null result obtained by executing the calculation program from the backend server, and sends the null result to the client.
For example, when the target program segment is an exit program, the middlebox server obtains a null result obtained by executing the exit program from the background server, and sends the null result to the client. In addition, after the background server executes the quit program, the corresponding relation with the program to be debugged can be released. Similarly, the target data node may also release the corresponding relationship with the program to be debugged.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a program debugging system according to another embodiment of the present application, and fig. 7 illustrates an information interaction process among a client, a middle server, and a background server in the foregoing embodiments. In fig. 7, the middlebox server can be divided into a first middlebox and a second middlebox. The first middle station is mainly responsible for information interaction with the client. And the second middle station is mainly responsible for interacting with a target computing node and a target data node of the background server under the condition that the target program segment comprises a part of program and a result display function, so as to obtain the execution result of the program segment. And the second middle station sends the program segment execution result to the first middle station after acquiring the program segment execution result, so that the program segment execution result is transferred to the client through the first middle station.
As shown in fig. 7, the client sends a data set query request to the first central station, and the first central station queries a data set list stored in the first central station in response to the data set query request, and returns the data set list to the client. And the client displays the data set list to the developer and forms a data set binding request according to the selection information input by the developer, wherein the data set binding request carries a second identifier of the data set selected by the developer. And then, the first middle desk allocates a target computing node for the program to be debugged of the client from the plurality of computing nodes of the background server, and allocates a target data node for the program to be debugged of the client from the plurality of data nodes of the background server.
As shown in fig. 7, in order to distinguish respective programs to be debugged of multiple clients, the first console configures a first identifier for each program to be debugged of a client. In addition, the first middle station sends initialization information to the second middle station, so that the second middle station allocates a storage space for the program to be debugged, and the second middle station establishes communication connection, such as grpc long connection, with the target data node. And after the initialization is completed, the second intermediate station sends first response execution information to the first intermediate station to represent that the initialization is executed.
As shown in fig. 7, the first middle station further sends the first configuration information to the target computing node, so that the target computing node performs configuration, and returns the second response execution information, which represents that the target computing node has completed configuration. The first configuration information may include an IP address or a port number of the target data node. And the first middle station also sends second configuration information to the target data node to configure the target data node, and returns third response execution information to represent that the target data node is configured completely. The second configuration information may include an IP address or a port number of the target computing node. And then, the first middle station returns the configured first identifier to the client, and the preparation work of the middle station server is represented to be completed.
The above interaction process can be regarded as a preparation process of the middle server before debugging the program to be debugged. Thereafter, as shown in fig. 7, the client starts to send program segment execution requests to the first middle station, where each program segment execution request sent by the client carries not only the target program segment but also the first identifier. And under the condition that the target program segment is a calculation program, the first intermediate station transfers the target program segment to the corresponding target calculation node and receives a null value result obtained after the target calculation node executes the target program segment. The first middle station returns the null result to the client.
And under the condition that the target program segment comprises the result showing function, the first middle station sends the target program segment to the target computing node. And after the target computing node executes the target program segment and obtains a plaintext result, sending value-taking prompt information to the second middle station. And the second intermediate station responds to the value prompt message and sends a first value request to the target data node. And the target data node responds to the first value taking request, sends a second value taking request to the target computing node so as to obtain a plaintext result, and returns the plaintext result to the second middle station. And the second middle station stores the plaintext result and splices the plaintext result with a state result representing the running state of the background server. And the second middle station sends the spliced plaintext result to the first middle station, so that the first middle station transfers the plaintext result to the client.
And under the condition that the target program segment is the exit program, the first intermediate station transfers the target program segment to the corresponding target computing node and receives a null value result obtained after the target computing node executes the target program segment. The first middle station returns the null result to the client.
Based on the same inventive concept, an embodiment of the present application provides a device for debugging a program. Referring to fig. 8, fig. 8 is a schematic diagram of an apparatus for debugging a program according to an embodiment of the present application. The device is applied to a middle server in a program debugging system, the program debugging system further comprises a client and a background server, the client is in communication connection with the middle server, and the middle server is in communication connection with the background server. As shown in fig. 8, the apparatus includes:
a receiving module 81, configured to receive a program segment execution request sent by the client, where the program segment execution request carries a target program segment in a program to be debugged, and the target program segment is any one of multiple program segments obtained after the client splits the program to be debugged according to the received breakpoint setting information;
a first sending module 82, configured to send the target program segment to a background server in response to the program segment execution request;
an obtaining module 83, configured to obtain a program segment execution result from the background server, where the program segment execution result is a plaintext result obtained after the background server executes the partial program and the result display function in sequence when the target program segment includes the partial program and the result display function, where a ciphertext variable value is obtained by executing the partial program, and the plaintext result is obtained by executing the result display function and converting the ciphertext variable value; and the number of the first and second groups,
a second sending module 84, configured to send the plaintext result to the client.
Optionally, the background server comprises a plurality of computing nodes and a plurality of data nodes; the device further comprises:
the first distribution module is used for distributing target computing nodes for the program to be debugged from the plurality of computing nodes;
the second distribution module is used for distributing target data nodes for the program to be debugged from the plurality of data nodes;
wherein the first transmitting module comprises:
a first sending submodule, configured to send the target program segment to the target computing node in response to the program segment execution request;
wherein the acquisition module comprises:
the first receiving submodule is used for receiving the value-taking prompt information sent by the target computing node;
the second sending submodule is used for responding to the value-taking prompt message and sending a value-taking request to the target data node;
and the first obtaining sub-module is used for obtaining the program segment execution result stored by the target data node, wherein the program segment execution result is stored after the target data node responds to the value taking request and obtains the program segment execution result from the target computing node.
Optionally, the apparatus further comprises:
the identification configuration module is used for configuring a first identification for the program to be debugged and sending the first identification to the client;
wherein the receiving module comprises:
the second receiving submodule is used for receiving a program segment execution request which is sent by the client and carries the first identifier and the target program segment;
wherein the first transmitting module comprises:
the second sending submodule is used for responding to the program segment execution request, sending the first identifier and the target program segment to the background server, so that the background server returns a program segment execution result carrying the first identifier after the target program segment is executed;
wherein the acquisition module comprises:
the second obtaining submodule is used for obtaining a program segment execution result carrying the first identifier from the background server;
wherein the second sending module comprises:
and the first determining submodule is used for determining the client corresponding to the first identifier and sending the program segment execution result to the determined client.
Optionally, the background server comprises a plurality of computing nodes and a plurality of data nodes; the device further comprises:
a third allocating module, configured to allocate a target computing node corresponding to the first identifier from the plurality of computing nodes, and allocate a target data node corresponding to the first identifier from the plurality of data nodes;
wherein the first transmitting module comprises:
the second determining submodule is used for responding to the program segment execution request and determining a target computing node and a target data node corresponding to the first identification;
and the third sending submodule is used for sending the first identifier and the target program segment to the target computing node so that the target computing node finishes executing the target program segment and the target data node stores a program segment execution result carrying the first identifier.
Optionally, the second sending module includes:
the third obtaining submodule is used for obtaining a state result representing the running state of the background server;
the combining submodule is used for combining the plaintext result with the state result to obtain a calculation result;
and the fourth sending submodule is used for sending the calculation result comprising the plaintext result to the client.
Optionally, the apparatus further comprises:
a third sending module, configured to send a data set list to the client when receiving a data set query request sent by the client, where the data set list includes multiple data sets and a second identifier corresponding to each data set;
and the data set binding module is used for binding a target data set corresponding to a second identifier with a ciphertext variable in the program to be debugged according to the second identifier carried by the data set binding request under the condition of receiving the data set binding request sent by the client, so that the value of the ciphertext variable is initialized by using the target data set through the background server.
Optionally, the apparatus further comprises:
and the storage area setting module is used for setting a storage area for storing the plaintext result aiming at the program to be debugged, and the storage area is not overlapped with the storage area for storing the plaintext results corresponding to other programs to be debugged.
Optionally, the apparatus further comprises:
a fourth sending module, configured to, when the target program segment is a computing program, obtain, from the backend server, a null result obtained by executing the computing program, and send the null result to the client;
and a fifth sending module, configured to, when the target program segment is an exit program, obtain, from the background server, a null result obtained by executing the exit program, and send the null result to the client.
Based on the same inventive concept, another embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps in the method according to any of the above-mentioned embodiments of the present application.
Based on the same inventive concept, another embodiment of the present application provides a middlebox server, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps in the method according to any of the above embodiments of the present application are implemented.
Based on the same inventive concept, another embodiment of the present application provides a program debugging system, including: the system comprises a client, a middle server and a background server, wherein the client is in communication connection with the middle server, and the middle server is in communication connection with the background server; the middlebox server is configured to perform the steps of the method according to any of the above embodiments of the present application.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should also be 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 terminal 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 terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The method, the apparatus, the middle station server, the storage medium, and the system for debugging a program provided by the present application are introduced in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for debugging a program is characterized in that the method is applied to a middle server in a program debugging system, the program debugging system further comprises a client and a background server, the client is in communication connection with the middle server, and the middle server is in communication connection with the background server; the method comprises the following steps:
receiving a program segment execution request sent by the client, wherein the program segment execution request carries a target program segment in a program to be debugged, and the target program segment is any one of a plurality of program segments obtained after the client splits the program to be debugged according to the received breakpoint setting information;
responding to the program segment execution request, and sending the target program segment to a background server;
obtaining a program segment execution result from the background server, wherein the program segment execution result is a plaintext result obtained after the background server executes a part of program and a result display function in sequence under the condition that the target program segment comprises the part of program and the result display function, a ciphertext variable value is obtained by executing the part of program, and the plaintext result is obtained by converting the ciphertext variable value by executing the result display function;
and sending the plaintext result to the client.
2. The method of claim 1, wherein the backend server comprises a plurality of compute nodes and a plurality of data nodes; the method further comprises the following steps:
distributing target computing nodes for the program to be debugged from the plurality of computing nodes;
distributing target data nodes for the program to be debugged from the plurality of data nodes;
wherein, responding to the program segment execution request, sending the target program segment to a background server, and the method comprises the following steps:
sending the target program segment to the target computing node in response to the program segment execution request;
obtaining a program segment execution result from the background server, including:
receiving value-taking prompt information sent by the target computing node;
responding to the value-taking prompt message, and sending a value-taking request to the target data node;
and obtaining the program segment execution result stored by the target data node, wherein the program segment execution result is stored after the target data node responds to the value taking request and obtains the program segment execution result from the target computing node.
3. The method of claim 1, further comprising:
configuring a first identifier for the program to be debugged, and sending the first identifier to the client;
receiving a program segment execution request sent by the client, including:
receiving a program segment execution request which is sent by the client and carries the first identifier and a target program segment;
wherein, responding to the program segment execution request, sending the target program segment to a background server, and the method comprises the following steps:
responding to the program segment execution request, sending the first identifier and the target program segment to the background server, so that the background server returns a program segment execution result carrying the first identifier after the target program segment is executed;
obtaining a program segment execution result from the background server, including:
obtaining a program segment execution result carrying the first identifier from the background server;
wherein sending the plaintext result to the client comprises:
and determining a client corresponding to the first identifier, and sending the program segment execution result to the determined client.
4. The method of claim 3, wherein the backend server comprises a plurality of compute nodes and a plurality of data nodes; the method further comprises the following steps:
allocating a target computing node corresponding to the first identifier from the plurality of computing nodes, and allocating a target data node corresponding to the first identifier from the plurality of data nodes;
wherein, in response to the program segment execution request, sending the first identifier and the target program segment to the background server, including:
responding to the program segment execution request, and determining a target computing node and a target data node corresponding to the first identification;
and sending the first identifier and the target program segment to the target computing node, so that the target computing node finishes executing the target program segment, and the target data node stores a program segment execution result carrying the first identifier.
5. The method of claim 1, wherein sending the plaintext result to the client comprises:
obtaining a state result representing the running state of the background server;
combining the plaintext result with the state result to obtain a calculation result;
and sending the calculation result comprising the plaintext result to the client.
6. The method of claim 1, further comprising:
under the condition that a data set query request sent by the client is received, sending a data set list to the client, wherein the data set list comprises a plurality of data sets and a second identifier corresponding to each data set;
and binding a target data set corresponding to a second identifier with a ciphertext variable in the program to be debugged according to the second identifier carried by the data set binding request under the condition of receiving the data set binding request sent by the client, so as to initialize the value of the ciphertext variable by using the target data set through the background server.
7. A device for debugging a program is characterized by being applied to a middle server in a program debugging system, wherein the program debugging system further comprises a client and a background server, the client is in communication connection with the middle server, and the middle server is in communication connection with the background server; the device comprises:
the system comprises a receiving module and a debugging module, wherein the receiving module is used for receiving a program segment execution request sent by the client, the program segment execution request carries a target program segment in a program to be debugged, and the target program segment is any one of a plurality of program segments obtained after the client splits the program to be debugged according to received breakpoint setting information;
the first sending module is used for responding to the program segment execution request and sending the target program segment to a background server;
the obtaining module is used for obtaining a program segment execution result from the background server, wherein the program segment execution result is a plaintext result obtained after the background server executes a part of program and a result display function in sequence under the condition that the target program segment comprises the part of program and the result display function, a ciphertext variable value is obtained by executing the part of program, and the plaintext result is obtained by converting the ciphertext variable value by executing the result display function; and the number of the first and second groups,
and the second sending module is used for sending the plaintext result to the client.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
9. A middlebox server comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method according to any of claims 1 to 6 are performed when the computer program is executed by the processor.
10. A program debugging system, comprising: the system comprises a client, a middle server and a background server, wherein the client is in communication connection with the middle server, and the middle server is in communication connection with the background server; the middlebox server is configured to perform the steps of the method according to any one of claims 1 to 6.
CN201910631678.2A 2019-07-12 2019-07-12 Method, device, middle server, storage medium and system for debugging program Active CN111061623B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910631678.2A CN111061623B (en) 2019-07-12 2019-07-12 Method, device, middle server, storage medium and system for debugging program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910631678.2A CN111061623B (en) 2019-07-12 2019-07-12 Method, device, middle server, storage medium and system for debugging program

Publications (2)

Publication Number Publication Date
CN111061623A true CN111061623A (en) 2020-04-24
CN111061623B CN111061623B (en) 2023-08-22

Family

ID=70297408

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910631678.2A Active CN111061623B (en) 2019-07-12 2019-07-12 Method, device, middle server, storage medium and system for debugging program

Country Status (1)

Country Link
CN (1) CN111061623B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297218A (en) * 2021-05-20 2021-08-24 广州光点信息科技有限公司 Multi-system data interaction method, device and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598599A (en) * 2016-12-15 2017-04-26 王弘远 Program execution method and device
CN107678938A (en) * 2017-08-24 2018-02-09 阿里巴巴集团控股有限公司 The adjustment method and equipment of a kind of application program
US20180322030A1 (en) * 2017-05-04 2018-11-08 Microsoft Technology Licensing, Llc Conditional debugging of server-side production code
CN109976997A (en) * 2017-12-28 2019-07-05 北京京东尚科信息技术有限公司 Test method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598599A (en) * 2016-12-15 2017-04-26 王弘远 Program execution method and device
US20180322030A1 (en) * 2017-05-04 2018-11-08 Microsoft Technology Licensing, Llc Conditional debugging of server-side production code
CN107678938A (en) * 2017-08-24 2018-02-09 阿里巴巴集团控股有限公司 The adjustment method and equipment of a kind of application program
CN109976997A (en) * 2017-12-28 2019-07-05 北京京东尚科信息技术有限公司 Test method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297218A (en) * 2021-05-20 2021-08-24 广州光点信息科技有限公司 Multi-system data interaction method, device and system
CN113297218B (en) * 2021-05-20 2022-01-07 广州光点信息科技有限公司 Multi-system data interaction method, device and system

Also Published As

Publication number Publication date
CN111061623B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
CN108551487B (en) Application deployment method, device, server and storage medium of PaaS platform
CN110032507B (en) Application program testing method, device and system, electronic equipment and storage medium
TWI516059B (en) Setup method and system for client and server environment
CN108845954B (en) Pressure testing method, system and storage medium
US10719311B2 (en) Function library build architecture for serverless execution frameworks
US10430172B2 (en) Re-configuration in cloud computing environments
CN107291750B (en) Data migration method and device
US20050240931A1 (en) System and method for dynamic cooperative distributed execution of computer tasks without a centralized controller
CN109376088B (en) Automatic test system and automatic test method
CN104765678A (en) Method and device for testing applications on mobile terminal
CN111159049A (en) Automatic interface testing method and system
CN108270837B (en) Distributed task scheduling method and system using idle resources
CN110413329A (en) IOT equipment remote debugging method, apparatus and system
CN111045919B (en) Method, device, background server, storage medium and system for debugging program
CN113722204A (en) Application debugging method, system, device and medium
JP2015049876A (en) Test system and method
CN111061623B (en) Method, device, middle server, storage medium and system for debugging program
CN111045918B (en) Method, device, client, storage medium and system for debugging program
KR20170044320A (en) Method of analyzing application objects based on distributed computing, method of providing item executable by computer, server performing the same and storage media storing the same
CN113448730A (en) Service processing method and device, computer equipment and storage medium
CN112968812A (en) Network performance testing method, device, equipment and storage medium
CN112328267A (en) Multi-server installation method and device, terminal and storage medium
CN112272190A (en) Data access method and device
WO2016122535A1 (en) Application recording
CN113434283B (en) Service scheduling method and device, server and computer readable storage medium

Legal Events

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