CN111444081B - Determination, response and generation methods, client, server, device and medium - Google Patents

Determination, response and generation methods, client, server, device and medium Download PDF

Info

Publication number
CN111444081B
CN111444081B CN201910043949.2A CN201910043949A CN111444081B CN 111444081 B CN111444081 B CN 111444081B CN 201910043949 A CN201910043949 A CN 201910043949A CN 111444081 B CN111444081 B CN 111444081B
Authority
CN
China
Prior art keywords
component
code
response
access request
result code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910043949.2A
Other languages
Chinese (zh)
Other versions
CN111444081A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910043949.2A priority Critical patent/CN111444081B/en
Publication of CN111444081A publication Critical patent/CN111444081A/en
Application granted granted Critical
Publication of CN111444081B publication Critical patent/CN111444081B/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The specification provides a determining, responding and generating method, a client, a server, a device and a medium. The method may include: obtaining an access record; the access record comprises a result code corresponding to the access request; wherein the result code represents a response path and an execution state for the access request; wherein the response path represents a plurality of components; determining a component which causes response failure according to the result code; wherein the component that caused the response failure is in the component of the response path representation. The technical scheme is convenient for determining the fault component.

Description

Determination, response and generation methods, client, server, device and medium
Technical Field
The present disclosure relates to the field of computer internet, and in particular, to a failure component determining method, an access request responding method, an access record generating method, a client, a server, an electronic device, and a computer storage medium.
Background
A distributed system may include multiple components each performing a respective function. Each component may be a program module. Relatively complex business logic can be implemented by calls between multiple components.
Disclosure of Invention
The embodiment of the specification provides a fault component determining method, an access request responding method, an access record generating method, a client, a server, electronic equipment and a computer storage medium. It may be convenient to determine the components that are malfunctioning.
The embodiment of the specification provides a fault component determining method, which comprises the following steps: obtaining an access record; the access record comprises a result code corresponding to the access request; wherein the result code represents a response path and an execution state for the access request; wherein the response path represents a plurality of components; determining a component which causes response failure according to the result code; wherein the component that caused the response failure is in the component of the response path representation.
The present specification embodiment provides an electronic apparatus including: the acquisition module is used for acquiring the access record; the access record comprises a result code corresponding to the access request; wherein the result code represents a response path and an execution state for the access request; wherein the response path represents a plurality of components; the determining module is used for determining a component which causes response failure according to the result code; wherein the component that caused the response failure is in the component of the response path representation.
The present description provides a computer storage medium storing computer program instructions that, when executed, implement: obtaining an access record, wherein the access record comprises a result code corresponding to an access request, and the result code represents a response path and an execution state aiming at the access request; wherein the response path represents a plurality of components; and determining a component causing response failure according to the result code, wherein the component causing response failure is positioned in the component represented by the response path.
The embodiment of the specification provides a fault component determining method, which comprises the following steps: sending an access request; receiving response data for the access request; wherein the response data is accompanied by a result code; wherein the result code represents a response path and an execution state for the access request; wherein the response path represents a plurality of components; determining a component which causes response failure according to the result code; wherein the component that caused the response failure is in the component of the response path representation.
The embodiment of the present specification provides a client, including: the sending module is used for sending the access request; a receiving module for receiving response data for the access request; wherein the response data is accompanied by a result code; wherein the result code represents a response path and an execution state for the access request; wherein the response path represents a plurality of components; the determining module is used for determining a component which causes response failure according to the result code; wherein the component that caused the response failure is in the component of the response path representation.
The present description also provides a computer storage medium storing computer program instructions that, when executed, implement: sending an access request; receiving response data for the access request, wherein the response data is accompanied by a result code, wherein the result code represents a response path for the access request and an execution state, wherein the response path represents a plurality of components; and determining a component causing response failure according to the result code, wherein the component causing response failure is positioned in the component represented by the response path.
The embodiment of the specification also provides a response method of the access request, which is applied to the component and comprises the following steps: receiving an access request; executing the corresponding function of the access request, and generating response data; placing the component code of the component into a result code attached to the response data, so that the result code represents a response path of the access request; providing the response data to the component sending the access request, so that the component receiving the response data obtains a result code for the access request.
The embodiment of the present specification also provides a server, including: the receiving module is used for receiving the access request; the execution module is used for executing the corresponding function of the access request and generating response data; the adding module is used for placing the component code of the component into a result code attached to the response data so that the result code represents a response path of the access request; a transmitting module for providing the response data to the component that transmitted the access request; such that the component receiving the response data obtains a result code for the access request.
The present description also provides a computer storage medium storing computer program instructions that, when executed, implement: receiving an access request; executing the corresponding function of the access request, and generating response data; placing the component code of the component into a result code attached to the response data, so that the result code represents a response path of the access request; providing the response data to the component sending the access request, so that the component receiving the response data obtains a result code for the access request.
The embodiment of the specification also provides a method for generating the access record, which comprises the following steps: receiving an access request; recording a request code of the access request; determining a component that responds to the access request; sending the access request to the component; receiving response data fed back by the component for the access request; wherein, the request code and the result code are attached to the response data; wherein the result code represents a response path in the process of responding to the access request; and recording the result code corresponding to the request code to form an access record.
In the embodiment of the present specification, the response path and the execution state to the access request are represented by using the result code. Therefore, under the condition of faults, the components with faults can be conveniently determined, and thus, the faults are convenient to repair.
Drawings
The accompanying drawings are included to provide a further understanding of embodiments of the specification, and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the principles of the specification. It is obvious that the drawings in the following description are only some embodiments of the present specification, from which other drawings can be obtained without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a schematic view of a scene interaction provided in an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an interface displayed by a client in a scene interaction schematic diagram provided in an embodiment of the present disclosure;
FIG. 3 is a flow chart of a method for determining a faulty component according to an embodiment of the present disclosure;
FIG. 4 is a block diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 5 is a flow chart of a method for determining a faulty component according to an embodiment of the present disclosure;
FIG. 6 is a block diagram of a client according to an embodiment of the present disclosure;
fig. 7 is a schematic architecture diagram of a client according to an embodiment of the present disclosure;
FIG. 8 is a flow chart of a method for responding to an access request according to an embodiment of the present disclosure;
FIG. 9 is a block diagram of a server according to an embodiment of the present disclosure;
FIG. 10 is a flowchart of a method for generating an access record according to an embodiment of the present disclosure;
fig. 11 is a block diagram of a server according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solution in the present specification better understood by those skilled in the art, the technical solution in the present specification embodiment will be clearly and completely described with reference to the drawings in the present specification embodiment, and it is apparent that the described embodiment is only a part of the embodiment of the present specification, not all the embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
Please refer to fig. 1 and 2. In one example scenario, a shopping website system employing a distributed system architecture. The shopping website system may include a plurality of components. The components may include a number of categories, such as product components, operational components, system object components, and the like. The shopping website system may have a plurality of product components, each of which may have a corresponding operating component. Of course, there may be no operating components in the product components. The system object component may be invoked when the operational component is triggered to perform a corresponding function.
In this scenario example, system maintenance personnel may use the client to expose product components, specifically, such as product detail pages. The component is a product component having a product code that may be CP903. A number of operational components may be provided in the product detail page, such as immediate purchase, joining shopping carts, etc. Immediate purchase may have an operation code CZ235 as an operational component and joining a shopping cart may have an operation code CZ40257 as an operational component.
In this scenario example, a system maintainer may operate a mouse click to join a shopping cart in a product detail page. The joining shopping cart is an operation component that, after being clicked, sends an access request to the server to indicate that product information of the product represented in the product detail page is placed in the user's shopping cart. The access request may have therein a component code of the product and a component code of the operating component. Specifically, the access request may be accompanied by user identification information and "CP903& CZ40257".
In this scenario example, after the server receives the access request, the system object component may be further invoked and the access request may be provided to the system object component. For example, call a user's login status component, user shopping cart component, etc. Each system object component may have an object code such that the corresponding system object component may be represented by the object code. For example, the object code of the login status component may be DX002 and the object code of the user shopping cart component may be DX879. Specifically, the login status component needs to be invoked first, and the user shopping cart component can be invoked further only if the user is determined to be in an effective login status.
In this scenario example, the login status component may verify with authentication information read from the database based on user information in the server-provided access request to determine whether the user is in a valid login state. In this scenario example, the login status component may fail database access such that the response to the access request fails. I.e. the login status component may fail. Further, the login status component may generate a status code 106 indicating that the execution failed, and the status code 106 may be used to agree that the failure was due to a database read failure. The login status component may generate response data that is fed back to the server and add the status code 106 and the object code DX002 to the response data. I.e. the response data may be accompanied by "DX002&106".
In this scenario example, after the server receives the response data, an operation code and a product code may be further added to the response data, so that a result code is formed in the response data, and the result code may be used to represent a response path and an execution state of an access request for the client. Specifically, for example, the result code may be "CP903& CZ40257& DX002&106". Thus, after the client receives the result code, the maintainer can determine that the login status component has an execution failure according to the result code, and the failure is caused by the failure of the database reading. Therefore, the method can be convenient for carrying out targeted repair on fault reasons as soon as possible.
Please refer to fig. 3. The embodiment of the specification provides a fault component determining method. The failed component analysis method can be used for analyzing components with faults in a distributed system. The fault component analysis method can be used for analyzing software faults in a distributed system so as to facilitate the determination of the cause of the faults. The fault component analysis method may include the following steps.
Step S10: acquiring an access record; the access record comprises a result code corresponding to the access request; wherein the result code represents a response path and an execution state for the access request; wherein the response path represents a plurality of components.
Step S12: determining a component which causes response failure according to the result code; wherein the component that caused the response failure is in the component of the response path representation.
In this embodiment, the distributed system may record the processed service during the execution. A distributed system may include multiple servers, each running a respective component. Each server may record data involved in its own execution separately. Alternatively, the data involved in the execution of the entire system may be recorded by a designated server in the distributed system. The components may include functional units for implementing specified business logic. The components may include software elements formed by computer program instructions or circuit elements formed without electronic circuitry.
In this embodiment, the access record may be formed by recording an access request received for the distributed system and response data for the access request. The access request may be issued for a client or for a server. The access record may have recorded therein response data of the distributed system to the access request. Specifically, for example, the distributed system includes a service request server for receiving the access request and further invoking the service processing server according to the access request response. The service request server can record the received access request, the called service processing server, specific components in the specific service processing server and the like to form a response path. The service server may also record the execution status corresponding to the response path. Specifically, for example, an access request invokes a weather forecast service, and a client that issues the access request requests to obtain a weather forecast for the next day. After receiving the access request, the service server may record an operation code that transmits the access request product code and triggers an operation of the access request in a product represented by the product code.
In this embodiment, the access request may be recorded with a result code. Specifically, the result codes of the access requests are recorded in sequence in the access record, and specified character intervals are adopted between different access requests and the result codes. Of course, the access request and the result code may also be recorded in a data table manner. The access record may be obtained by forming an access record for the record or by reading an access record already recorded.
In this embodiment, the result code may represent a response path and an execution state for the access request. Therefore, when the response of the distributed system to the access request fails, the result code corresponding to the access request can be analyzed to obtain the response path aiming at the access request, and further the reason possibly causing the response failure is analyzed. Responses to access requests may require involvement of multiple components, with calls between components. Components may be categorized according to the functions implemented. Specifically, for example, components may be divided into product components, operation components, system object components, and the like. Of course, the components are not limited to the above list, and those skilled in the art can also make other modifications in light of the technical spirit of the present application, and all the functions and effects achieved by the components are included in the protection scope of the present application as long as they are the same as or similar to the functions and effects of the present application. In some implementations, the response path can include a product code representing a product component operated by the user, an operation code of an operation component that results in an access request, and an object code of a system object component involved in responding to the access request. Of course, the response path is not limited to including the product code, the operation code, and the object code, but may include other data codes such as an action code for indicating a specific action of the system object, and the like. Of course, the response path may also include the component codes of the above-mentioned portions, for example, the response path may also include only 1 or a few of the component codes listed above. For example, the result code may include only the object code, or the object code and the operation code. Of course, the result code may also include a combination of component code and action code, for example, including operation code, object code and action code, or including operation code and action code, etc., which are not repeated.
In some cases, the distributed system may record the corresponding result code for all access requests. At this time, the result code may include a component code and a status code forming a response path. The status code may be used to represent the execution status of the response procedure of the component represented by the response path for the access request. For example, execution success or execution failure can be distinguished according to different values of the status codes. In some cases, the corresponding result code may be recorded corresponding to the access request only in the case where the response processing for the access request fails to be performed. At this time, the status code may not be included in the result code, and the cause of the failure may be determined only by the component represented by the response path. Of course, the result code may also include a status code, through which the cause of the fault is indicated to facilitate determination of the specific cause of the fault.
In this embodiment, the fault component determining method may be executed in the electronic device. Specifically, for example, the electronic device may be a desktop computer, a workstation, a notebook computer, a tablet computer, or the like operated by a user. Of course, the above method for determining a failed component may also be run in a server, and after the server determines a component that causes a failure in response, the server may send information of the component to a designated management end device, such as a desktop computer. In this way, the staff is made aware of the malfunctioning component. Or, the server may automatically repair the component that causes the response failure according to a preset repair procedure.
In the embodiment of the present specification, the response path and the execution state to the access request are represented by using the result code. Therefore, under the condition of faults, the components with faults can be conveniently determined, and thus, the faults are convenient to repair.
In addition, for convenience of implementation, the method for determining a faulty component provided in the embodiment of the present disclosure may be implemented by using a buried point in a component in an existing system. In this way, component codes and/or status codes can be automatically added to response data when the response data is fed back by way of buried points.
In some implementations, the response path includes a plurality of specified dimensions, each of the specified dimensions including a component code of at least one component.
In this embodiment, in responding to an access request, a component represented by a component code in a result code may be divided into a plurality of dimensions. Specifically, the specified dimensions may include a product dimension, an operation dimension, a system object dimension, and the like. In particular, the product dimension may include components of the functional page for presentation by the user's electronic device, e.g., components in the product dimension may include: the product detail page, the product list page, the online consultation, etc. are not repeated. The operational dimension may include components that provide user-specific operational functionality. Specifically, for example, a shopping cart adding function, a collection adding function, and the like. The system object dimensions may include system object components in the distributed system involved in implementing the operational functions. Specifically, for example, the user may have specific operation functions for placing an order, and the system object involved in this case may include: inventory objects, weather objects, distribution resource objects, and the like. The inventory object may determine whether the amount of resources currently in inventory can meet the amount of resources specified in the order, and the weather object is used to determine the weather from the shipping location to the receiving location, such as some bad weather that may have a significant impact on the logistics distribution. The delivery resource object may be used to determine whether or not human or material resources are currently delivering for the goods specified by the order.
In this embodiment, the components may be pre-partitioned into respective specified dimensions such that each dimension may include at least one component. When a specific access request is processed, a component responding to the access request can be included in each appointed dimension in a response path formed for the access request. In some cases, only one component per dimension responds to the access request, and only one component code per dimension may be included in the response path. In some cases, for an access request, where multiple components in a specified dimension respond, component codes of the multiple components of the specified dimension may be included in the response path.
In this embodiment, the component code is recorded in the response path by dividing the dimension for the component and recording the component code in the specified dimension. Therefore, under the condition that the components in the system have faults, the faulty components can be more conveniently determined. Specifically, for example, there is an error in response to the access request, and the result code of the access request includes the product code CP123, the operation code CZ3765, and the object code DX6374. It may be determined that the system object represented by DX6374 causes execution failure when an access request generated by an operation of an operation component represented by CZ3765 is executed in response to a product component represented by CP 123.
In some embodiments, the response path may include a plurality of component codes, where call relationships exist between components represented by the component codes; wherein the calling relationship comprises a direct calling relationship or an indirect calling relationship; the result code may also include a state code representing an execution state; accordingly, determining the component that causes the response failure according to the result code may include: and under the condition that the state code represents the execution failure, determining the component with the failure according to the calling relation.
In this embodiment, a call relationship exists between a plurality of component codes included in the response path. Specifically, for example, a product component may have a call to an operational component, and further, an operational component may have a call to a system object component. At this time, the product component and the system object component may be in a profile calling relationship, and the operation component and the system object may be in a direct calling relationship.
In this embodiment, a status code may be used to indicate the execution status. The state code may be different in value and the execution state represented may be different. Specifically, for example, the state code has a value of Normal and is executed normally, and the state code has a value of Abnormal and is faulty.
In the present embodiment, when the status code indicates that the execution has failed, it can be considered that the component indicated by the response path has a failure. In particular, a component that has not invoked other components may be determined to be a failed component. In some cases, when the internal execution of the component fails, the execution is finished in an internal error-reporting manner, and the subsequent component is not called. In this way, a component that has not invoked other components can be considered a failed component. Of course, a component represented by a component code adjacent to the status code may be regarded as a component having a failure. Specifically, for example, in the result code, the contracted state code may represent the execution state of the component represented by the leftmost component. The above measures may facilitate a quick determination of components that may be faulty.
In some cases, no component calling other components occurs in the response path, and no failure occurs, then it may be further checked whether the component called at the previous stage has a failure. Specifically, for example, in the process of showing the product component, the operation component is called to show the corresponding button, and in the case that the button is triggered, the operation component further calls the system object component. The corresponding status code indicates an execution failure. In the case where the system object component does not fail, it can be said that there is a failure in the operation component that calls the system object component.
In some embodiments, the response path may include a plurality of component codes, and an action code corresponding to the component codes, and a status code corresponding to the action code; the action code may represent a processing action performed by the corresponding component code; accordingly, determining the component that causes the response failure according to the result code may include: and determining the component where the action code corresponding to the status code indicating the execution failure is located as a fault component.
In this embodiment, when the component represented by the component code responds specifically, a corresponding processing action is performed. The action code may be used to represent a processing action performed by the component. So that there may be a correspondence between the action code and the component code. When the execution state represented by the state code is a failure state, the execution of the action represented by the action code corresponding to the state code may be considered to be failed, and further, the component represented by the component code corresponding to the action code may be considered to be failed.
In this embodiment, the response path includes a plurality of component codes, each of which may correspond to an action code, and each of which may correspond to a status code. So that the component where the processing action represented by the action code corresponding to the status code indicating the execution failure is located can be regarded as having a failure. Of course, in some embodiments, the system may record the result code for only access requests that failed in response. Thus, the status code may indicate that the component code corresponding to the corresponding action code is faulty.
In some embodiments, the response path includes a plurality of component codes arranged in sequence; correspondingly, determining the component causing the response failure according to the result code comprises the following steps: the component represented by the component code arranged at the end is determined as the failed component.
In the present embodiment, the component represented by the component code at the end of the component codes arranged in sequence may be determined as the faulty component, so that the result code may include only the plurality of component codes arranged in sequence, without including the status code, and may represent the execution status. Specifically, for example, the result code may be CP375CZ2847DX90, where CP375 may be the product code, CZ284 may be the operation code, and DX90 may be the object code. The result code may indicate that the system object represented by DX90 is faulty.
In some embodiments, the response path further includes an action code; the action code represents the processing action of failure execution of the component code arranged at the tail end. In this manner, the processing actions of the failed component may be further indicated by the action code. Therefore, the fault reason of the fault component is more convenient and quicker to locate. Further, in some embodiments, the result code may also include a status code; the status code indicates a failure cause of the processing action indicated by the action code that failed to be executed. Thus, the cause of the execution failure can be represented by the status code while the execution failure can be represented by the status code. The convenience of determining the specific fault reasons of the fault components is further improved. Specifically, for example, the component represented by the component code arranged at the end in the result code is a weather service component, and the processing action represented by the action code is to obtain the today's weather in beijing, and the state code represents that the data acquisition fails. Therefore, the fault reason can be determined more quickly, and convenience is brought to maintenance personnel.
Please refer to fig. 4. The embodiment of the present specification also provides an electronic device, which may include: the acquisition module is used for acquiring the access record; the access record comprises a result code corresponding to the access request; wherein the result code represents a response path and an execution state for the access request; wherein the response path represents a plurality of components; the determining module is used for determining a component which causes response failure according to the result code; wherein the component that caused the response failure is in the component of the response path representation.
In this embodiment, the functions and effects implemented by the electronic device may be explained in comparison with the foregoing embodiments, and will not be described in detail.
The present description also provides a computer storage medium. The computer storage medium stores computer program instructions that, when executed, implement: obtaining an access record, wherein the access record comprises a result code corresponding to an access request, and the result code represents a response path and an execution state aiming at the access request; wherein the response path represents a plurality of components; and determining a component causing response failure according to the result code, wherein the component causing response failure is positioned in the component represented by the response path.
In the present embodiment, the computer storage medium includes, but is not limited to, a random access Memory (Random Access Memory, RAM), a Read-Only Memory (ROM), a Cache (Cache), a Hard Disk (HDD), or a Memory Card (Memory Card).
In this embodiment, specific functions implemented by the computer program instructions in the computer storage medium may be explained in contrast with other embodiments.
Please refer to fig. 5. The embodiment of the specification also provides a fault component determining method. The fault component determination method can be applied to clients. The fault component determination method may include the following steps.
Step S20: an access request is sent.
Step S22: receiving response data for the access request; wherein the response data is accompanied by a result code; wherein the result code represents a response path and an execution state for the access request; wherein the response path represents a plurality of components.
Step S24: determining a component which causes response failure according to the result code; wherein the component that caused the response failure is in the component of the response path representation.
In this embodiment, the client may send an access request to the server and receive response data fed back by the server. Thus, after the client of the maintainer can obtain the response data, the component causing the response failure is determined according to the result code attached to the response data. In this way, maintenance personnel can repair the program as soon as possible after the failed component is determined conveniently. Thus, great convenience is brought to maintenance personnel.
The specific content of the fault component determining method provided in the embodiments of the present disclosure may be explained in comparison with other embodiments, and will not be described in detail.
Please refer to fig. 6. The embodiment of the present specification also provides a client, including: the sending module is used for sending the access request; a receiving module for receiving response data for the access request; wherein the response data is accompanied by a result code; wherein the result code represents a response path and an execution state for the access request; wherein the response path represents a plurality of components; the determining module is used for determining a component which causes response failure according to the result code; wherein the component that caused the response failure is in the component of the response path representation.
In this embodiment, the functions and effects implemented by the client may be explained in comparison with other embodiments, which will not be described in detail.
Please refer to fig. 7. The embodiment of the specification also provides a client. The client may have a touch-sensitive display, a processor, a network communication unit, and a memory.
The network communication unit may send an access request under control of a processor and receive response data for the access request; wherein the response data is accompanied by a result code; wherein the result code represents a response path and an execution state for the access request; wherein the response path represents a plurality of components.
The processor may determine the component that caused the failure of the response based on the result code; wherein the component that caused the response failure is in the component of the response path representation.
In this embodiment, the network communication unit may be an integrated module that performs network data communication according to a network communication protocol. The touch display may be a display device having a touch sensing function. Specifically, for example, the display may include an LCD display having a touch sensing function, a CRT display, an LED display, or the like. The processor may be a large scale integrated circuit capable of performing logic operations. The memory may include a memory storage and a memory storage. The memory storage may hold stored data after power is turned off.
In this embodiment, the functions and effects implemented by the client may be explained in comparison with other embodiments, which will not be described in detail.
The present description also provides a computer storage medium storing computer program instructions that, when executed, implement: sending an access request; receiving response data for the access request, wherein the response data is accompanied by a result code, wherein the result code represents a response path for the access request and an execution state, wherein the response path represents a plurality of components; and determining a component causing response failure according to the result code, wherein the component causing response failure is positioned in the component represented by the response path.
In the present embodiment, the computer storage medium includes, but is not limited to, a random access Memory (Random Access Memory, RAM), a Read-Only Memory (ROM), a Cache (Cache), a Hard Disk (HDD), or a Memory Card (Memory Card).
In this embodiment, specific functions implemented by the computer program instructions in the computer storage medium may be explained in contrast with other embodiments.
Please refer to fig. 8. The embodiment of the specification provides a response method of an access request, which is applied to a component. The component may be run in an electronic device. The electronic device may be a server with a strong computing power. A component may be a software module that performs specified functions. The response method of the access request may include the following steps.
Step S30: an access request is received.
Step S32: and executing the corresponding function of the access request, and generating response data.
Step S34: and placing the component code of the component into a result code attached to the response data, so that the result code represents a response path of the access request.
Step S36: providing the response data to the component sending the access request, so that the component receiving the response data obtains a result code for the access request.
In this embodiment, the method of responding to an access request may be applied to a component in a distributed system. There may be calls between the components, and response data generated by the called component may be provided to the component that initiated the call. Specifically, for example, the operating component invokes the system object component. The system object component sends the response data generated by the execution to the operation component. Further, the invoked component adds component code to the response data that is fed back. In this way, the component that originally initiated the call may receive a result code representing the response path in a logistic regressive data flow.
In some embodiments, the component may feed back response data to the component that initiated the call when executing the access request corresponding function, whether or not the execution was successful. The component executing the response method of the access request may be configured to put the component code into the result code attached to the response data only when the function execution of the access request fails.
In this embodiment, when each component responds to the access request, the component code of the component is fed back. So that the resulting code formed may represent a response path. In this manner, it is convenient to determine the component that has failed by the result code.
In some embodiments, performing the corresponding function of the access request, generating response data may include: executing processing actions to implement the functions to generate response data; wherein the processing action has an action code; correspondingly, the step of placing the component code of the component into the result code attached to the response data further comprises the steps of: and placing the action code into the result code.
The component places an action code representing the performed processing action in the result code of the response data. In this way, the result code can represent the specific processing action of the component on the basis of being capable of representing the response path. Furthermore, when determining the component with the fault according to the result code, the processing action executed by the component with the fault can be determined by further combining the action code, so that the cause of the fault can be determined more conveniently.
In some implementations, performing processing actions that implement the described functions to generate response data further includes: generating a state code representing an execution state corresponding to the processing action; correspondingly, the step of placing the component code of the component into the result code attached to the response data further comprises the steps of: and placing the status code into the result code.
The component can judge the execution state by itself when executing the function corresponding to the access request and generating the response data. And then correspondingly generates a status code. The success or failure of execution can be indicated by the different values of the status codes. Furthermore, the status code may be used to indicate the cause of the failure in addition to the success or failure of execution. Specifically, for example, when the status code is 123, it may indicate that the execution has failed, and on this basis, it may be predetermined that the cause of the failure is network connection failure.
By placing the status code in the result code, it may thus be more convenient to determine the cause of the failure of the failed component.
Please refer to fig. 9. The embodiment of the present specification also provides a server, including: the receiving module is used for receiving the access request; the execution module is used for executing the corresponding function of the access request and generating response data; the adding module is used for placing the component code of the component into a result code attached to the response data so that the result code represents a response path of the access request; a transmitting module for providing the response data to the component that transmitted the access request; such that the component receiving the response data obtains a result code for the access request.
In this embodiment, the functions and effects implemented by the server may be explained in comparison with other embodiments, and will not be described in detail.
The present description provides a computer storage medium. The computer storage medium stores computer program instructions that, when executed, implement: receiving an access request; executing the corresponding function of the access request, and generating response data; placing the component code of the component into a result code attached to the response data, so that the result code represents a response path of the access request; providing the response data to the component sending the access request, so that the component receiving the response data obtains a result code for the access request.
In the present embodiment, the computer storage medium includes, but is not limited to, a random access Memory (Random Access Memory, RAM), a Read-Only Memory (ROM), a Cache (Cache), a Hard Disk (HDD), or a Memory Card (Memory Card).
In this embodiment, specific functions implemented by the computer program instructions in the computer storage medium may be explained in contrast with other embodiments.
Please refer to fig. 10. The embodiment of the specification provides a method for generating an access record. The method for generating the access record is applied to the server. The method of generating the access record may include the following steps.
Step S40: an access request is received.
Step S42: and recording the request code of the access request.
Step S44: a component is determined that responds to the access request.
Step S46: invoking the determined component.
Step S48: receiving response data fed back by the component for the access request; wherein, the request code and the result code are attached to the response data; wherein the result code represents a response path in the process of responding to the access request.
Step S50: and recording the result code corresponding to the request code to form an access record.
In this embodiment, the request code may be used to represent an access request. Thus, the result code can be recorded in correspondence with the request code. In this manner, analysis is facilitated in determining a specific response to an access request.
After the server receives the access request, it may further determine the components that respond to the access request next. Specifically, for example, the user operates the add shopping cart function in the product detail page, and the server may further invoke the operation component shopping cart to place the items represented by the product detail page into the user's shopping cart.
The server sends the access request to the determined component, which may also invoke other components in the response. Specifically, for example, the operating component may invoke a system object component during a response. Thus, when the response data is fed back through the called component, the corresponding component code is added into the response data. So that the response data received by the final server may be accompanied by a result code representing the response path. In this manner, the server may record the result code corresponding to the request code of the access request to form an access record.
Please refer to fig. 11. The embodiment of the specification also provides a server. The server may include: and the request receiving module is used for receiving the access request. And the recording module is used for recording the request code of the access request. And the determining module is used for determining a component responding to the access request. And the sending module is used for sending the access request to the component. The data receiving module is used for receiving response data fed back by the component and aiming at the access request; wherein, the request code and the result code are attached to the response data; wherein the result code represents a response path in the process of responding to the access request. And the record generation module is used for recording the result code corresponding to the request code so as to form an access record.
In this embodiment, the functions and effects implemented by the server may be explained by referring to other embodiments, and will not be described in detail.
The present description also provides a computer storage medium. The computer storage medium stores computer program instructions that, when executed, implement: receiving an access request; recording a request code of the access request; determining a component that responds to the access request; sending the access request to the component; receiving response data fed back by the component for the access request, wherein the response data is accompanied by the request code and a result code, and the result code represents a response path in the process of responding to the access request; and recording the result code corresponding to the request code to form an access record.
In this embodiment, specific functions implemented by the computer program instructions in the computer storage medium may be explained in contrast with other embodiments. And will not be described in detail.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer self-programs to integrate a digital system on a single PLD without having to ask the chip manufacturer to design and fabricate an application specific integrated circuit chip 2. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by logic compiler (logic compiler) software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog2 are most commonly used at present. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
Those skilled in the art will also appreciate that, in addition to implementing clients, servers in the form of pure computer readable program code, it is well possible to implement the same functions by logically programming method steps such that clients, servers are implemented in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, and the like. Such clients, servers may therefore be considered as a hardware component, and the means included therein for performing various functions may also be considered as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in the embodiments or some parts of the embodiments of the present application.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are referred to each other, and each embodiment is mainly described as different from other embodiments.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
Although the present application has been described by way of embodiments, those of ordinary skill in the art will recognize that there are many variations and modifications of the present application without departing from the spirit of the present application, and it is intended that the appended claims encompass such variations and modifications without departing from the spirit of the present application.

Claims (28)

1. A method of determining a faulty component, comprising:
Obtaining an access record; the access record comprises a result code corresponding to the access request; wherein the result code represents a response path and an execution state for the access request; wherein the response path represents a plurality of components;
determining a component which causes response failure according to the result code; wherein the component that caused the response failure is in the component of the response path representation.
2. The method of claim 1, wherein the response path comprises a plurality of specified dimensions, each specified dimension comprising a component code of at least one component.
3. The method of claim 2, wherein the fault component determination method is applied in a distributed system, the specified dimension comprising: product dimension, operation dimension and system object dimension; wherein the product dimension includes a component that provides a displayed functional page; the operational dimension includes a component that provides operational functionality; the system object dimension includes system object components in the distributed system that are involved in implementing operational functions.
4. The method of claim 1, wherein the response path includes a plurality of component codes, and wherein call relationships exist between components represented by the component codes; wherein the calling relationship comprises a direct calling relationship or an indirect calling relationship; the result code includes a status code representing an execution status;
Correspondingly, determining the component causing the response failure according to the result code comprises the following steps:
and under the condition that the state code represents the execution failure, determining the component with the failure according to the calling relation.
5. The method of claim 4, wherein determining the failed component from the calling relationship comprises: the component that has not invoked the other component is determined to be the failed component.
6. The method of claim 1, wherein the response path includes a plurality of component codes, and an action code corresponding to the component codes, and a status code corresponding to the action code; the action code represents a processing action executed by the corresponding component code;
correspondingly, determining the component causing the response failure according to the result code comprises the following steps:
and determining the component where the action code corresponding to the status code indicating the execution failure is located as a fault component.
7. The method of claim 1, wherein the response path comprises a plurality of component codes arranged in sequence;
correspondingly, determining the component causing the response failure according to the result code comprises the following steps: the component represented by the component code arranged at the end is determined as the failed component.
8. The method of claim 7, wherein the response path further comprises an action code; the action code represents the processing action of failure execution of the component code arranged at the tail end.
9. The method of claim 8, wherein the result code further comprises a status code; the status code indicates a failure cause of the processing action indicated by the action code that failed to be executed.
10. An electronic device, comprising:
the acquisition module is used for acquiring the access record; the access record comprises a result code corresponding to the access request; wherein the result code represents a response path and an execution state for the access request; wherein the response path represents a plurality of components;
the determining module is used for determining a component which causes response failure according to the result code; wherein the component that caused the response failure is in the component of the response path representation.
11. A computer storage medium storing computer program instructions that when executed implement: obtaining an access record, wherein the access record comprises a result code corresponding to an access request, and the result code represents a response path and an execution state aiming at the access request; wherein the response path represents a plurality of components; and determining a component causing response failure according to the result code, wherein the component causing response failure is positioned in the component represented by the response path.
12. A method of determining a faulty component, comprising:
sending an access request;
receiving response data for the access request; wherein the response data is accompanied by a result code; wherein the result code represents a response path and an execution state for the access request; wherein the response path represents a plurality of components;
determining a component which causes response failure according to the result code; wherein the component that caused the response failure is in the component of the response path representation.
13. The method of claim 12, wherein the response path includes a plurality of specified dimensions, each specified dimension including a component code of at least one component.
14. The method of claim 13, wherein the fault component determination method is applied in a distributed system, the specified dimension comprising: product dimension, operation dimension and system object dimension; wherein the product dimension includes a component that provides a displayed functional page; the operational dimension includes a component that provides operational functionality; the system object dimension includes system object components in the distributed system that are involved in implementing operational functions.
15. The method of claim 12, wherein the response path includes a plurality of component codes, the component codes representing components having calling relationships therebetween; wherein the calling relationship comprises a direct calling relationship or an indirect calling relationship; the result code includes a status code representing an execution status;
correspondingly, determining the component causing the response failure according to the result code comprises the following steps:
and under the condition that the state code represents the execution failure, determining the component with the failure according to the calling relation.
16. The method of claim 15, wherein determining the failed component from the calling relationship comprises: the component that has not invoked the other component is determined to be the failed component.
17. The method of claim 12, wherein the response path includes a plurality of component codes, and an action code corresponding to the component codes, and a status code corresponding to the action code; the action code represents a processing action executed by the corresponding component code;
correspondingly, determining the component causing the response failure according to the result code comprises the following steps:
and determining the component where the action code corresponding to the status code indicating the execution failure is located as a fault component.
18. The method of claim 12, wherein the response path includes a plurality of component codes arranged in sequence;
correspondingly, determining the component causing the response failure according to the result code comprises the following steps: the component represented by the component code arranged at the end is determined as the failed component.
19. The method of claim 18, wherein the response path further comprises an action code; the action code represents the processing action of failure execution of the component code arranged at the tail end.
20. The method of claim 19, wherein the result code further comprises a status code; the status code indicates a failure cause of the processing action indicated by the action code that failed to be executed.
21. A client, comprising:
the sending module is used for sending the access request;
a receiving module for receiving response data for the access request; wherein the response data is accompanied by a result code; wherein the result code represents a response path and an execution state for the access request; wherein the response path represents a plurality of components;
the determining module is used for determining a component which causes response failure according to the result code; wherein the component that caused the response failure is in the component of the response path representation.
22. A computer storage medium storing computer program instructions that when executed implement: sending an access request; receiving response data for the access request, wherein the response data is accompanied by a result code, wherein the result code represents a response path for the access request and an execution state, wherein the response path represents a plurality of components; and determining a component causing response failure according to the result code, wherein the component causing response failure is positioned in the component represented by the response path.
23. A method of responding to an access request, applied to a component, comprising:
receiving an access request;
executing the corresponding function of the access request, and generating response data;
placing the component code of the component into a result code attached to the response data, so that the result code represents a response path of the access request; the result code also represents an execution state for the access request;
providing the response data to the component sending the access request, so that the component receiving the response data obtains a result code for the access request.
24. The method of claim 23, wherein performing the corresponding function of the access request, generating response data, comprises:
executing processing actions to implement the functions to generate response data; wherein the processing action has an action code;
correspondingly, the step of placing the component code of the component into the result code attached to the response data further comprises the steps of: and placing the action code into the result code.
25. The method of claim 24, wherein performing processing actions that implement the function to generate response data further comprises: generating a state code representing an execution state corresponding to the processing action;
correspondingly, the step of placing the component code of the component into the result code attached to the response data further comprises the steps of: and placing the status code into the result code.
26. A server, comprising:
the receiving module is used for receiving the access request;
the execution module is used for executing the corresponding function of the access request and generating response data;
the adding module is used for placing the component code of the component into a result code attached to the response data so that the result code represents a response path of the access request; the result code also represents an execution state for the access request;
A transmitting module for providing the response data to the component that transmitted the access request; such that the component receiving the response data obtains a result code for the access request.
27. A computer storage medium storing computer program instructions that when executed implement: receiving an access request; executing the corresponding function of the access request, and generating response data; placing the component code of the component into a result code attached to the response data, so that the result code represents a response path of the access request; the result code also represents an execution state for the access request; providing the response data to the component sending the access request, so that the component receiving the response data obtains a result code for the access request.
28. A method for generating an access record, comprising:
receiving an access request;
recording a request code of the access request;
determining a component that responds to the access request;
sending the access request to the component;
receiving response data fed back by the component for the access request; wherein, the request code and the result code are attached to the response data; wherein the result code represents a response path in the process of responding to the access request; the result code also represents an execution state for the access request;
And recording the result code corresponding to the request code to form an access record.
CN201910043949.2A 2019-01-17 2019-01-17 Determination, response and generation methods, client, server, device and medium Active CN111444081B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910043949.2A CN111444081B (en) 2019-01-17 2019-01-17 Determination, response and generation methods, client, server, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910043949.2A CN111444081B (en) 2019-01-17 2019-01-17 Determination, response and generation methods, client, server, device and medium

Publications (2)

Publication Number Publication Date
CN111444081A CN111444081A (en) 2020-07-24
CN111444081B true CN111444081B (en) 2023-05-02

Family

ID=71627004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910043949.2A Active CN111444081B (en) 2019-01-17 2019-01-17 Determination, response and generation methods, client, server, device and medium

Country Status (1)

Country Link
CN (1) CN111444081B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387048A (en) * 2011-10-25 2012-03-21 中兴通讯股份有限公司 Monitoring method for distributed file systems and distributed file system
CN105577454A (en) * 2016-03-03 2016-05-11 上海新炬网络信息技术有限公司 Method for quickly positioning service fault based on log
CN108011752A (en) * 2017-11-21 2018-05-08 江苏天联信息科技发展有限公司 Fault locating analysis method and device, computer-readable recording medium
CN108038145A (en) * 2017-11-23 2018-05-15 携程旅游网络技术(上海)有限公司 Distributed Services tracking, system, storage medium and electronic equipment
CN108234207A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 A kind of Fault Locating Method and device based on content distributing network CDN
CN108429643A (en) * 2018-02-28 2018-08-21 郑州云海信息技术有限公司 A kind of method, apparatus and equipment of server failure management
CN108629865A (en) * 2018-04-28 2018-10-09 百度在线网络技术(北京)有限公司 Generation method, device, equipment and the storage medium of fault log

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014038564A (en) * 2012-08-20 2014-02-27 International Business Maschines Corporation System and method which perform processing to database
US9960952B2 (en) * 2016-03-17 2018-05-01 Ca, Inc. Proactive fault detection and diagnostics for networked node transaction events

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387048A (en) * 2011-10-25 2012-03-21 中兴通讯股份有限公司 Monitoring method for distributed file systems and distributed file system
CN105577454A (en) * 2016-03-03 2016-05-11 上海新炬网络信息技术有限公司 Method for quickly positioning service fault based on log
CN108011752A (en) * 2017-11-21 2018-05-08 江苏天联信息科技发展有限公司 Fault locating analysis method and device, computer-readable recording medium
CN108038145A (en) * 2017-11-23 2018-05-15 携程旅游网络技术(上海)有限公司 Distributed Services tracking, system, storage medium and electronic equipment
CN108234207A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 A kind of Fault Locating Method and device based on content distributing network CDN
CN108429643A (en) * 2018-02-28 2018-08-21 郑州云海信息技术有限公司 A kind of method, apparatus and equipment of server failure management
CN108629865A (en) * 2018-04-28 2018-10-09 百度在线网络技术(北京)有限公司 Generation method, device, equipment and the storage medium of fault log

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于程序分析的分布式应用自动化追踪方法;袁鑫晨;李海波;王伟;唐震;任仲山;郑莹莹;;计算机系统应用(11);全文 *
无线传感器节点模块级故障诊断方法的研究;李智敏;陈祥光;;仪器仪表学报(12);全文 *

Also Published As

Publication number Publication date
CN111444081A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
US12038827B2 (en) System and method of handling complex experiments in a distributed system
US8813039B2 (en) Method and system for software defect reporting
CN108628748B (en) Automatic test management method and automatic test management system
US9049105B1 (en) Systems and methods for tracking and managing event records associated with network incidents
US9122804B2 (en) Logic validation and deployment
US20100205583A1 (en) Request-based activation of debugging and tracing
US9652744B2 (en) Smart user interface adaptation in on-demand business applications
CN110688285A (en) Method and device for processing abnormal classification of business system, computer equipment and storage medium
US11269756B1 (en) Self-healing web applications
US11169910B2 (en) Probabilistic software testing via dynamic graphs
CN112187933A (en) Method and system for monitoring services in multi-architecture cloud platform
US20190354991A1 (en) System and method for managing service requests
CN112817869A (en) Test method, test device, test medium, and electronic apparatus
US11868441B2 (en) Duplicate frames detection
CN114328250A (en) Automatic self-checking method, medium and device for software system
CN111444081B (en) Determination, response and generation methods, client, server, device and medium
CN114021756A (en) Fault analysis method and device and electronic equipment
CN115437903A (en) Interface test method, device, apparatus, storage medium, and program
CN111737129A (en) Service control method, service control device, computer readable medium and electronic equipment
CN115543807A (en) Automatic regression testing method and device, computer equipment and storage medium
CN118519920A (en) Automatic test method, device, equipment and storage medium
CN118444958A (en) Software resource updating method, device, equipment, medium and program product
CN113010368A (en) Method and apparatus for generating information
CN115689561A (en) U shield testing method, device, equipment and medium
CN117034255A (en) Application error reporting repair method, device, equipment and 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