Microservice test information display method, device, equipment and computer-readable medium
By obtaining and annotating microservice requirements information and drawing and updating microservice business flow charts, the problem of difficult to intuitively display microservice test results and label generation in the existing technology is solved, and the effect of intuitive display and resource saving is achieved.
Patent Information
- Application Number
- CN202410272984.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-11
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-03-11
AI Technical Summary
When displaying microservice test information, it is difficult to intuitively display the test results of the entire business process, and occupy a lot of communication resources. It takes time to generate labels that match the requirements of microservice application or rely on the amount of dictionary data, resulting in matching. difficulty.
By obtaining the requirements of the target business process, analyzing text information, performing text recognition and annotation processing, generating post-annotated microservice requirements information, drawing microservice business flow charts, and binding functional code blocks to charts, updating test results, and generating exception tests Result information reduces the use of communication resources.
It realizes the microservice test results that intuitively display business processes, reduces the use of communication resources, and timely generates tags that match the needs of microservices application, improving the accuracy and efficiency of tag matching.
Smart Images

Figure CN118093413B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, apparatus, device, and computer-readable medium for displaying microservice test information. Background Art
[0002] The microservice test information display method is a technology for displaying and feeding back the test results of each microservice application corresponding to a business process. At present, when displaying microservice test information, the method usually adopted is: first, for each process node in the business process, collect the microservice test results of each microservice application corresponding to the microservice application. Then, the source data of each microservice test result is directly sent to the terminal as the report content for item-by-item display or the source data is statistically displayed through a two-dimensional chart.
[0003] However, the inventors have found that when the above method is used to display microservice test information, the following technical problems often occur:
[0004] First, since each process node usually corresponds to multiple test results, if the source data of each microservice test result is directly sent to the terminal for display item by item, it is difficult to intuitively display the microservice test results corresponding to the entire business process, and it will occupy more communication resources;
[0005] Second, due to the relatively simple structure of the two-dimensional chart, it can usually only display low-dimensional statistical data for each microservice test result, and it is difficult to display each microservice test result from more dimensions, which makes it difficult to provide more comprehensive feedback on the test results corresponding to the business process.
[0006] In the process of adopting technical solutions to solve the above-mentioned technical problems 1 and 2, the following technical problem 3 is often accompanied: how to generate labels that match the microservice application requirements in a timely manner. In response to the above problems, the conventional solution is generally to use manual labeling or dictionary matching to determine the labels corresponding to the microservice application requirements. However, the above solutions still have the following problems: if the microservice application requirements are manually labeled, users will need to spend a lot of time reading and understanding the requirement text, resulting in a long time for label generation; if matching and labeling are performed through dictionary matching, it is easy for the matching results to be too dependent on the amount of data in the dictionary, and some texts are difficult to match to the target matching labels in a timely manner, which makes it difficult to generate labels that match the microservice application requirements in a timely manner.
[0007] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0008] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0009] Some embodiments of the present disclosure propose a microservice test information display method, apparatus, device, and computer-readable medium to solve one or more of the technical problems mentioned in the above background technology section.
[0010] In a first aspect, some embodiments of the present disclosure provide a method for displaying microservice test information, the method comprising: obtaining a demand analysis text information sequence for a target business process; performing text recognition processing on each demand analysis text information in the demand analysis text information sequence to obtain a microservice demand information sequence; annotating the microservice demand information sequence to obtain an annotated microservice demand information sequence, and sending the annotated microservice demand information sequence to each development terminal for development of each microservice application; obtaining a microservice call information set corresponding to each microservice application, wherein each microservice application includes at least one functional code block; based on the annotated microservice demand information sequence and the microservice call information set, drawing a microservice The microservice business process diagram is constructed by the embodiment of the present invention; each functional code block corresponding to each microservice application is bound to the microservice business process diagram to obtain a bound microservice business process diagram; in response to receiving each method test completion information for each functional code block, the bound microservice business process diagram is updated to obtain a tested microservice business process diagram; the method test completion information that meets the preset test failure condition is selected from the method test completion information as the abnormal test result information to obtain an abnormal test result information set; based on the abnormal test result information set and the post-test microservice business process diagram, the microservice test information corresponding to the target business process is generated, and the microservice test information is sent to each development terminal for display.
[0011] In a second aspect, some embodiments of the present disclosure provide a microservice test information display device, the device comprising: a first acquisition unit, configured to acquire a demand analysis text information sequence for a target business process; a text recognition processing unit, configured to perform text recognition processing on each demand analysis text information in the above demand analysis text information sequence to obtain a microservice demand information sequence; a labeling processing unit, configured to perform labeling processing on the above microservice demand information sequence to obtain a labeled microservice demand information sequence, and send the labeled microservice demand information sequence to each development terminal for development of each microservice application; a second acquisition unit, configured to acquire a microservice call information set corresponding to each of the above microservice applications, wherein each microservice application includes at least one functional code block; a drawing unit, configured to draw a microservice call information set based on the above labeled microservice demand information sequence and the above microservice call information set. , draw a microservice business process diagram; a binding processing unit is configured to bind each functional code block corresponding to the above-mentioned microservice application with the above-mentioned microservice business process diagram to obtain a bound microservice business process diagram; an update processing unit is configured to update the above-mentioned bound microservice business process diagram in response to receiving each method test completion information for each functional code block, and obtain a tested microservice business process diagram; a selection unit is configured to select the method test completion information that meets the preset test failure condition from the above-mentioned method test completion information as abnormal test result information, and obtain an abnormal test result information set; a generation and sending unit is configured to generate microservice test information corresponding to the above-mentioned target business process based on the above-mentioned abnormal test result information set and the above-mentioned microservice business process diagram after testing, and send the above-mentioned microservice test information to each development terminal for display.
[0012] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0013] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
[0014] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the microservice test information display method of some embodiments of the present disclosure, the microservice test results corresponding to the entire business process can be intuitively displayed, and the occupation of communication resources can be reduced. Specifically, the reason why it is difficult to intuitively display the microservice test results corresponding to the entire business process and occupy more communication resources is that: since each process node usually corresponds to multiple test results, if the source data of each microservice test result is directly sent to the terminal for item-by-item display, it is difficult to intuitively display the microservice test results corresponding to the entire business process, and it will occupy more communication resources. Based on this, the microservice test information display method of some embodiments of the present disclosure, first, obtains a demand analysis text information sequence for the target business process. Perform text recognition processing on each demand analysis text information in the above demand analysis text information sequence to obtain a microservice demand information sequence. Thus, the business demand data required for developing microservice applications corresponding to each process node corresponding to the target business process can be obtained. Secondly, the above microservice demand information sequence is annotated to obtain an annotated microservice demand information sequence, and the annotated microservice demand information sequence is sent to each development terminal for the development of each microservice application. Thus, each microservice requirement information with a label can be obtained, which is convenient for each development terminal to develop microservice applications in different business domains according to the label, and is convenient for the subsequent integration and display of the business process with each microservice application. Then, the microservice call information set corresponding to each microservice application is obtained. Among them, each microservice application may include at least one functional code block. Thus, the call relationship of each functional method in each microservice application can be obtained. Then, based on the above-mentioned annotated microservice requirement information sequence and the above-mentioned microservice call information set, a microservice business process diagram is drawn. Thus, the business process can be integrated with each microservice application, which is convenient for better simultaneous display of the two. Then, each functional code block corresponding to each microservice application is bound to the above-mentioned microservice business process diagram to obtain a bound microservice business process diagram. Thus, it is convenient to display the test results of each functional method in the above-mentioned microservice business process diagram in the subsequent process. Afterwards, in response to receiving the test completion information of each method for each functional code block, the above-mentioned bound microservice business process diagram is updated to obtain a tested microservice business process diagram. Thus, the test results of each functional method and the corresponding microservice application can be intuitively displayed in the above microservice business process diagram. Then, the method test completion information that meets the preset test failure conditions is selected from the above method test completion information as the abnormal test result information to obtain the abnormal test result information set. Thus, the test failure result data can be obtained, which is convenient for subsequent verification by the development end.Finally, based on the above-mentioned abnormal test result information set and the above-mentioned post-test microservice business process diagram, the microservice test information corresponding to the above-mentioned target business process is generated, and the above-mentioned microservice test information is sent to each development terminal for display. Therefore, the microservice test information display method of some embodiments of the present disclosure constructs a microservice business process diagram by integrating the business process with the corresponding microservice applications, and binds each functional method to the microservice business process diagram, thereby eliminating the need to display the source data of the test results item by item, thereby facilitating the intuitive display of the microservice test results corresponding to the entire business process. In addition, because when sending the microservice test information, the microservice test information only includes the chart corresponding to the post-test microservice business process diagram and part of the test result data, thereby reducing the occupation of communication resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0016] Figure 1 is a flowchart of some embodiments of the microservice test information display method according to the present disclosure;
[0017] Figure 2 is a schematic diagram of a three-dimensional business process diagram of the microservice test information display method according to the present disclosure;
[0018] Figure 3 is a schematic diagram of the structure of some embodiments of the microservice test information display device according to the present disclosure;
[0019] Figure 4 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0021] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0022] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0023] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0024] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0025] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0026] Figure 1 The process 100 of some embodiments of the microservice test information display method according to the present disclosure is shown. The microservice test information display method includes the following steps:
[0027] Step 101: Obtain a demand analysis text information sequence for a target business process.
[0028] In some embodiments, the execution subject (e.g., a computing device) of the microservice test information display method can obtain a demand analysis text information sequence for the target business process from the demand collection terminal through a wired connection or a wireless connection. Among them, the above-mentioned demand collection terminal can be a terminal for collecting and summarizing the microservice application development requirements. One microservice application corresponds to one microservice interface. The above-mentioned target business process can be a business process that needs to implement various business functions in the process through microservice application development. The business process may include at least one process node. For example, the above-mentioned target business process may include but is not limited to process nodes such as merchant registration, merchant release of goods, user ordering goods, and user confirmation of receipt. The demand analysis text information in the above-mentioned demand analysis text information sequence may be text information of a string including an HTML (Hyper Text Markup Language) tag that represents the microservice application development requirements. The above-mentioned demand analysis text information sequence may be an ordered collection of each demand analysis text information arranged in the order of collection corresponding to the demand analysis text information. It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0029] As an example, the above demand analysis text information sequence can be {" <h3> Merchant registration function< / h3> ”, “ Merchants register through the registration page in the merchant system. Registration information includes merchant name and business scope information. ”, “ Upload the business door picture ”, “ Registration is successful after background review ”, “ <h3> Product publishing function< / h3> ”, “ Merchants can add product information in batches on the product release page, and submit it after adding to complete the product release. ”}. Among them, h3 (head3, title 3) and p (paragraph, paragraph) are HTML tags.
[0030] Step 102: Perform text recognition processing on each demand analysis text information in the demand analysis text information sequence to obtain a microservice demand information sequence.
[0031] In some embodiments, the execution subject may perform text recognition processing on each demand analysis text information in the demand analysis text information sequence in various ways to obtain a microservice demand information sequence. The microservice demand information in the microservice demand information sequence may correspond one-to-one to the process nodes included in the target business process. The microservice demand information in the microservice demand information sequence may be information on microservice application development requirements related to the corresponding process nodes. The microservice demand information sequence may be an ordered set of microservice demand information arranged in the order of the process nodes corresponding to the microservice demand information.
[0032] In some optional implementations of some embodiments, the execution subject may perform text recognition processing on each demand analysis text information in the demand analysis text information sequence to obtain a microservice demand information sequence through the following steps:
[0033] The first step is to perform data cleaning on the demand analysis text information sequence to obtain a cleaned demand text information sequence. The cleaned demand text information in the cleaned demand text information sequence may be the demand analysis text information after data cleaning. The demand analysis text information sequence may be data cleaned through a preset data cleaning interface to obtain a cleaned demand text information sequence. The data cleaning interface may be encapsulated with a data cleaning method group. The data cleaning method in the data cleaning method group may include but is not limited to one of the following: a data cleaning method for deleting redundant spaces, a data cleaning method for deleting duplicate data.
[0034] The second step is to perform subject text recognition processing on each demand analysis text information in the above demand analysis text information sequence to obtain a process node information sequence. The process node information in the above process node information sequence may be information on process nodes in the target business process. The above process node information sequence may be an ordered set of process node information arranged in the order of the process nodes. For each demand analysis text information in the above demand analysis text information sequence, perform the following steps:
[0035] In a first sub-step, in response to determining that the demand analysis text information satisfies a preset text condition, a sequence number corresponding to the demand analysis text information in the demand analysis text information sequence is determined as a text sequence number. The preset text condition may be that the character string text corresponding to the demand analysis text information includes a preset title tag. The preset title tag may be a pre-set HTML tag that represents the marked character string text as a title.
[0036] The second sub-step is to determine the above demand analysis text information and the above text sequence number as process node information.
[0037] The third step is to segment the cleaned requirement text information sequence based on the process node information sequence to obtain a segmented requirement text information group sequence. The segmented requirement text information groups in the segmented requirement text information group sequence can be an ordered array of cleaned requirement text information corresponding to the same process node. For each process node information in the process node information sequence, perform the following steps:
[0038] The first sub-step is to determine the text serial number included in the above process node information as the starting serial number.
[0039] In the second sub-step, the difference between the text sequence number of the next process node information after the above process node information in the above process node information sequence and the preset step value is determined as the end sequence number. The next process node information may be the post-cleaning requirement text information adjacent to the above process node information in the above process node information sequence. The preset step value may be a preset value by which the sequence number increases or decreases each time.
[0040] The third sub-step is to intercept and segment the cleaned demand text information sequence according to the start sequence number and the end sequence number to obtain segmented demand text information groups, wherein the segmented demand text information groups can be an ordered array composed of the cleaned demand text information obtained by interception and segmentation.
[0041] The fourth step is to determine the microservice demand information corresponding to each segmented demand text information group in the segmented demand text information group sequence to obtain a microservice demand information sequence. For each segmented demand text information group in the segmented demand text information group sequence, perform the following steps:
[0042] The first sub-step is to determine the first segmented requirement text information in the segmented requirement text information group as the application requirement subject information.
[0043] In the second sub-step, a preset character string segmentation operation is performed on the character string text corresponding to the application requirement subject information according to a preset character group to obtain a subject string, and the subject string is determined as a microservice interface identifier. The character string segmentation operation may be a split segmentation function. The preset character group may include ">" and "<".
[0044] The third sub-step is to determine each segmented demand text information satisfying a preset sequence condition in the segmented demand text information group as the demand text information group to be integrated. The preset sequence condition may be that the sequence number of the segmented demand text information in the segmented demand text information group is not 1.
[0045] In the fourth sub-step, for each of the demand text information to be integrated in the above-mentioned demand text information group to be integrated, the character string text corresponding to the above-mentioned demand text information to be integrated is segmented according to the above-mentioned preset character group through the above-mentioned character string segmentation operation to obtain a topic description character string.
[0046] In a fifth sub-step, the obtained topic description strings are sequentially concatenated by preset concatenating characters according to the order of the segmented requirement text information corresponding to the topic description strings in the segmented requirement text information group to obtain the topic description information, and the topic description information is determined as the interface function description information. The preset concatenating characters may be pre-set characters.
[0047] In the sixth sub-step, the microservice interface identifier and the interface function description information are determined as the microservice requirement information.
[0048] Step 103 , annotate the microservice requirement information sequence to obtain an annotated microservice requirement information sequence, and send the annotated microservice requirement information sequence to each development terminal for developing each microservice application.
[0049] In some embodiments, the execution subject may annotate the microservice demand information sequence in various ways to obtain an annotated microservice demand information sequence, and send the annotated microservice demand information sequence to each development terminal for developing each microservice application. The annotated microservice demand information in the annotated microservice demand information sequence may be microservice demand information with a label. The label may characterize the scope in which the microservice demand information occurs. The scope may be different business systems, different business stages, or different business subjects. The business system may include but is not limited to at least one of the following: merchant system, commodity system, transaction system, and logistics system. The business stage may include but is not limited to at least one of the following: product delivery link and transaction link. The business subject may include but is not limited to at least one of the following: merchant, user. The development terminal may be a terminal for developing microservice applications. Microservice application developers may develop each microservice application according to the annotated microservice demand information sequence through the development terminal.
[0050] In addition, when the present disclosure annotates the above-mentioned microservice demand information sequence to solve the above-mentioned technical problem three mentioned in the background technology part (how to generate corresponding labels for microservice application requirements), it also takes into account that the conventional solution "using manual annotation or dictionary matching to determine the labels corresponding to the microservice application requirements" has the problem that "if the microservice application requirements are manually annotated, users will need to spend a lot of time reading and understanding the requirement text, resulting in a long time for label generation; if matching annotation is performed through dictionary matching, it is easy for the matching results to be too dependent on the amount of data in the dictionary, and some texts are difficult to match the target matching labels in time, thereby making it difficult to generate labels that match the microservice application requirements in time". Therefore, in the face of the above-mentioned technical problem three mentioned in the background technology part: how to generate corresponding labels for microservice application requirements, combined with the computer technology advantages of the R&D team, the present disclosure decides to adopt the following annotation processing solution.
[0051] In some optional implementations of some embodiments, the execution subject may perform annotation processing on the microservice demand information sequence to obtain annotated microservice demand information sequence through the following steps:
[0052] In the first step, for each microservice requirement information in the above microservice requirement information sequence, perform the following steps:
[0053] In the first sub-step, the microservice demand information is input into a pre-trained demand label generation model to obtain demand label information. The demand label information may be information of a label corresponding to the microservice demand information. The demand label generation model may be a custom neural network model that takes the microservice demand information as input and takes the demand label information as output.
[0054] In the second sub-step, the microservice requirement information and the requirement tag information are determined as the microservice requirement tag information to be confirmed.
[0055] In the second step, the obtained microservice requirement annotation information sequence to be confirmed is sent to the requirement collection terminal for confirmation.
[0056] The third step is to update the above-mentioned microservice requirement annotation information sequence to be confirmed in response to receiving the update confirmation information for the above-mentioned microservice requirement annotation information sequence to be confirmed, and obtain the annotated microservice requirement information sequence. Among them, the above-mentioned update confirmation information may include a group of microservice requirement annotation information to be updated. Each microservice requirement annotation information to be updated may include a microservice interface identifier and update requirement label information. The above-mentioned update requirement label information may be information for updating the corresponding requirement label information. For each microservice requirement annotation information to be confirmed in the above-mentioned microservice requirement annotation information sequence to be confirmed, perform the following steps:
[0057] In the first sub-step, in response to determining that the microservice interface identifier included in the microservice requirement annotation information to be confirmed meets the preset identification condition, the requirement label information included in the microservice requirement annotation information to be confirmed is updated according to the updated requirement label information corresponding to the microservice interface identifier, and the updated microservice requirement annotation information is obtained as the annotated microservice requirement information. Among them, the preset identification condition can be that the microservice interface identifier included in the microservice requirement annotation information to be confirmed is the same as any microservice interface identifier corresponding to the microservice requirement annotation information group to be updated.
[0058] In a second sub-step, in response to determining that the microservice interface identifier included in the microservice requirement annotation information to be confirmed does not satisfy the preset identification condition, the microservice requirement annotation information to be confirmed is determined as the annotated microservice requirement information.
[0059] Optionally, the above requirement label generation model is trained through the following steps:
[0060] The first step is to obtain a training sample set and a demand label text description information set. Each training sample in the above training sample set may include sample microservice demand information and sample demand label information. The demand label text description information in the above demand label text description information set may be functional description information of the corresponding label. For example, when the label is "logistics system", the demand label text description information corresponding to the label may be "the logistics system can be used to manage various activities and resources in the logistics link, including generating waybill numbers, uploading logistics order information, querying and displaying logistics order information, etc."
[0061] The second step is to select training samples from the above training sample set and perform the following training steps:
[0062] In the first sub-step, the sample microservice demand information included in the training sample is input into the word embedding layer included in the initial demand label generation model to obtain a demand word embedding vector sequence and a demand word embedding matrix. The demand word embedding vector in the demand word embedding vector sequence can represent the text words in the sample microservice demand information. The demand word embedding matrix can represent the sample microservice demand information. The word embedding layer is used to embed the microservice demand information. The word embedding layer can include a word representation model based on global word frequency statistics and a long short-term memory network model. The initial demand label generation model can also include an embedding fusion layer, a hole convolution layer and a classification layer. The embedding fusion layer can be used to fuse each word embedding representation. The hole convolution layer can be used to extract features from the result of the fusion of microservice demand information and demand labels. The classification layer is used to determine the demand label corresponding to the microservice demand information. First, the sample microservice demand information included in the training sample is input into the word representation model based on global word frequency statistics included in the word embedding layer to obtain a word embedding vector sequence. Then, the above word embedding vector sequence is input into the long short-term memory network model included in the above word embedding layer to obtain the demand word embedding matrix.
[0063] The second sub-step is to input the above-mentioned requirement label text description information set into the word embedding layer included in the initial requirement label generation model to obtain a label word embedding vector sequence and a label word embedding matrix. Among them, the label word embedding vector in the above-mentioned label word embedding vector sequence represents the text words in the requirement label text description information. The above-mentioned label word embedding matrix can represent the requirement label text description information set. First, the above-mentioned requirement label text description information set is input into the word representation model based on global word frequency statistics included in the above-mentioned word embedding layer to obtain a label embedding vector sequence. Then, the above-mentioned label embedding vector sequence is input into the long short-term memory network model included in the above-mentioned word embedding layer to obtain a label word embedding matrix.
[0064] The third sub-step is to input the above-mentioned demand word embedding matrix, the above-mentioned label word embedding matrix, the above-mentioned demand word embedding vector sequence and the above-mentioned label word embedding vector sequence into the embedding fusion layer included in the initial demand label generation model to obtain a fusion feature matrix. Among them, the above-mentioned fusion feature matrix can characterize the relationship between the microservice demand information and each demand label. The above-mentioned embedding fusion layer can perform the following steps to obtain the fusion feature matrix:
[0065] Sub-step one: determine the product of the transposed matrix of the above-mentioned label word embedding matrix and the above-mentioned requirement word embedding matrix as the first fusion matrix.
[0066] Sub-step two, for each label word embedding vector in the above label word embedding vector sequence, determine the product of the dot product of the above label word embedding vector and each requirement word embedding vector as the fusion element, and determine the vector composed of each fusion element as the fusion vector corresponding to the above label word embedding vector.
[0067] Sub-step three: determining the matrix composed of each fusion vector as the second fusion matrix.
[0068] Sub-step four: performing a division operation on the elements at the same position of the first fusion matrix and the second fusion matrix to obtain a fusion feature matrix.
[0069] In a fourth sub-step, the fused feature matrix is input into the dilated convolution layer included in the initial demand label generation model to obtain a fused text feature matrix. The dilated convolution layer may include at least two one-dimensional dilated convolutions with different dilation rates. The fused text feature matrix may characterize the characteristics of the microservice demand information and the correlation characteristics between the microservice demand information and the label.
[0070] The fifth sub-step is to perform maximum pooling processing on the above fused text feature matrix to obtain a fused text feature vector.
[0071] In the sixth sub-step, the fused text feature vector is normalized to obtain a text attention vector. The text attention vector can represent the importance of words in the microservice demand information in different label categories, that is, the weight. The text feature vector can be normalized by a softmax normalization function to obtain a text attention vector.
[0072] The seventh sub-step is to perform weighted summation processing on the above-mentioned text attention vector and the above-mentioned requirement word embedding matrix to obtain the requirement text feature matrix.
[0073] In the eighth sub-step, the requirement text feature matrix is input into the classification layer included in the initial requirement label generation model to obtain requirement label information. For example, the classification layer can be composed of a perceptron classification model consisting of two fully connected layers and an output layer.
[0074] The ninth sub-step is to determine the target loss value between the required label information and the sample required label information included in the training sample based on a preset loss function. The loss function may be a binary cross entropy loss function. The target loss value may represent the difference between the predicted label and the true label.
[0075] In a tenth sub-step, in response to determining that the target loss value satisfies a preset loss value condition, the trained initial demand label generation model is determined as the demand label generation model. The preset loss value condition may be that the target loss value is less than a preset loss value. The preset loss value may be a pre-set value close to 0.
[0076] Optionally, in response to determining that the target loss value does not meet the preset loss value condition, the parameters in the initial demand label generation model are adjusted, and training samples are reselected from the training sample set, and the adjusted initial demand label generation model is used as the initial demand label generation model, and the training step is performed again. The parameters in the initial demand label generation model can be adjusted by a gradient descent algorithm.
[0077] The above-mentioned annotation processing scheme and its related contents, as an inventive point of an embodiment of the present disclosure, solve the technical problem three mentioned in the background technology, "how to generate labels that match the microservice application requirements in a timely manner". The reasons why it is difficult to generate labels that match the microservice application requirements in a timely manner are often as follows: if the microservice application requirements are manually annotated, the user needs to spend a lot of time reading and understanding the requirement text, resulting in a long time for label generation; if matching annotation is performed by dictionary matching, it is easy to make the matching result too dependent on the amount of data in the dictionary, and some texts are difficult to match the target matching label label in a timely manner. If the above problems are solved, the effect of timely generating labels that match the microservice application requirements can be achieved. In order to achieve this effect, the present disclosure first generates each label that matches the microservice requirements in a timely manner according to the requirement label generation model, and then sends each generated label to the requirement collection terminal for secondary confirmation to further improve the accuracy of the label. In addition, in the process of generating labels that match the microservice requirements, the requirement label generation model first performs word embedding representation on the microservice requirement text and the pre-set requirement label text. Then, the demand word vector and label word vector after word embedding are fused to embed the demand label into the microservice demand information, so as to facilitate the subsequent determination of the classification label corresponding to the microservice demand information according to the fusion result. After that, for the fusion result, more comprehensive semantic features are extracted through multiple layers of dilated convolution with different expansion rates, which can reduce the feature loss caused by the grid effect of dilated convolution. Then, according to the normalized results of the extracted features, the text attention weight information corresponding to the microservice demand text can be determined, and further, the demand text feature matrix embedded with label information can be obtained. Finally, according to the demand text feature matrix, the microservice demand text can be classified to determine the matching demand label. Therefore, by fusing the microservice demand text and the label text and then extracting features, the label classification prediction of the microservice demand text can be better, and the label matching the microservice application demand can be generated in time, and the accuracy of the label matching result can be improved.
[0078] Step 104: Obtain a microservice call information set corresponding to each microservice application.
[0079] In some embodiments, the execution entity may obtain a microservice call information set corresponding to each of the microservice applications from a database. Each microservice application may include at least one functional code block. Each functional code block may correspond one-to-one to a microservice method. At least one microservice method is encapsulated in the microservice interface corresponding to each microservice application. Each microservice call information in the microservice call information set represents the call relationship between the microservice methods encapsulated in the same microservice interface. Each microservice call information in the microservice call information set may include, but is not limited to, a microservice interface identifier and each microservice method identifier.
[0080] Step 105: Draw a microservice business process diagram based on the annotated microservice requirement information sequence and microservice call information set.
[0081] In some embodiments, the execution subject may draw a microservice business process diagram based on the annotated microservice demand information sequence and the microservice call information set in various ways, wherein the microservice business process diagram may be a business process diagram bound to a microservice application.
[0082] In some optional implementations of some embodiments, each microservice call information in the above-mentioned microservice call information set may include a microservice method call information sequence. The microservice method call information sequence may be an ordered set of microservice method call information arranged in the order of calling the corresponding microservice method. The microservice method call information in the above-mentioned microservice method call information sequence may include a microservice method identifier. The above-mentioned execution subject may draw a microservice business process diagram based on the above-mentioned annotated microservice demand information sequence and the above-mentioned microservice call information set through the following steps:
[0083] The first step is to draw a three-dimensional business process diagram based on the above-mentioned annotated microservice demand information sequence. Among them, the above-mentioned three-dimensional business process diagram can be a chart that jointly displays the business process through three different dimensions. The above-mentioned three-dimensional business process diagram may include a three-dimensional coordinate system. The above-mentioned three-dimensional coordinate system may be established according to each demand label information corresponding to the above-mentioned annotated microservice demand information sequence, and each demand label information may include system label information, subject label information and stage label information. The above-mentioned system label information may represent the label of the business system type corresponding to the microservice demand information. The above-mentioned subject label information may represent the label of the business subject type corresponding to the microservice demand information. The above-mentioned stage label information may represent the label of the business stage type corresponding to the microservice demand information. A three-dimensional business process diagram can be drawn based on the above-mentioned annotated microservice demand information sequence in various ways.
[0084] In some optional implementations of some embodiments, the execution subject may draw a three-dimensional business process diagram based on the annotated microservice demand information sequence through the following steps:
[0085] Step one, determine the system label information group, subject label information group and stage label information group corresponding to the above-mentioned annotated microservice demand information sequence. Among them, the above-mentioned system label information group can be an array composed of non-repeating system label information. The above-mentioned subject label information group can be an array composed of non-repeating subject label information. The above-mentioned stage label information group can be an array composed of non-repeating stage label information. First, determine the system label information corresponding to the above-mentioned annotated microservice demand information sequence as the system label information group. Then, determine the subject label information corresponding to the above-mentioned microservice demand information sequence as the subject label information group. Finally, determine the stage label information corresponding to the above-mentioned annotated microservice demand information sequence as the stage label information group.
[0086] Step 2: Based on the system label information group, the subject label information group and the stage label information group, determine the axis label data group set and the lane Figure 3 dimensional data set. Among them, the axis label data set in the axis label data set may be an array of axis label data corresponding to the same axis. The axis may be one of the following: horizontal axis, vertical axis, vertical axis. Figure 3 Swimlanes in a Cube Figure 3 Dimensional data can represent a swim lane diagram. Figure 3 Swimlanes in a Cube Figure 3 Dimensional data may include lane label data groups, lane segmentation label data groups and layered label data. The lane label data group may be a coordinate axis label data group in the horizontal axis direction. The lane segmentation label data group may be a coordinate axis label data group in the vertical axis direction. The layered label data may be a coordinate axis label data in the vertical axis direction. First, the above-mentioned system label information group is used as a lane label data group, the above-mentioned subject label information group is used as a lane segmentation label data group, the above-mentioned stage label information group is used as a layered label data group, and the lane label data group, the lane segmentation label data group and the layered label data group are respectively determined as axis label data groups to obtain a coordinate axis label data group set. Then, for each layered label data in the above-mentioned layered label data group, the above-mentioned lane label data group, the above-mentioned lane segmentation label data group and the above-mentioned layered label data are determined as lanes. Figure 3 Dimensional data.
[0087] Step 3: Determine the rectangular frame information corresponding to each annotated microservice demand information in the above annotated microservice demand information sequence to obtain a rectangular frame information sequence. The rectangular frame information in the above rectangular frame information sequence may be the text information to be displayed in the rectangular frame and the information of the position of the rectangular frame in the three-dimensional coordinate system. For each annotated microservice demand information in the above annotated microservice demand information sequence, the following steps may be performed:
[0088] Sub-step one: determining the microservice interface identifier included in the annotated microservice requirement information as a rectangular frame identifier.
[0089] Sub-step two, based on the demand label information included in the above-mentioned annotated microservice demand information, the system label information in the demand label information is used as the target lane label data, the subject label information in the demand label information is used as the target lane segmentation label data, the stage label information in the demand label information is used as the target layered label data, and the above-mentioned target lane label data, the above-mentioned target lane segmentation label data and the above-mentioned target layered label data are determined as rectangular frame position information.
[0090] Sub-step three: determining the rectangular frame identifier and the rectangular frame position information as rectangular frame information.
[0091] Step 4, establish a three-dimensional coordinate system based on the above-mentioned coordinate axis label data set. First, determine the lane label data set corresponding to the coordinate axis label data set as the horizontal axis label data set, the corresponding lane segmentation label data set as the vertical axis label data set, and the corresponding layered label data set as the vertical axis label data set. Then, according to the horizontal axis label data set, the vertical axis label data set and the vertical axis label data set, perform coordinate axis label update processing on each coordinate axis corresponding to the initial three-dimensional coordinate system to obtain a three-dimensional coordinate system. Among them, the above-mentioned initial three-dimensional coordinate system can be a coordinate system including a horizontal axis, a vertical axis and a vertical axis. Each coordinate axis has corresponding preset label offset information. The preset label offset information may include a coordinate axis identifier and an offset value. The above-mentioned coordinate axis identifier can uniquely identify the coordinate axis. The above-mentioned offset value can characterize the distance between two adjacent labels on the corresponding coordinate axis.
[0092] Step 5: Draw the lanes in the above three-dimensional coordinate system. Figure 3 The initial three-dimensional business process diagram is obtained by drawing the lane diagrams corresponding to the dimensional data set. Each lane diagram may correspond to the stage label information. The initial three-dimensional business process diagram may be a three-dimensional diagram including the scope corresponding to the business process but not including each process node. The data corresponding to the lane diagram may be drawn in the three-dimensional coordinate system by a preset data visualization method. Figure 3 The swim lane diagrams corresponding to the dimensional data set are used to obtain the initial three-dimensional business process diagram. For example, the above data visualization method may include but is not limited to at least one of the following: Echarts (Enterprise Charts, enterprise-level data charts), D3.js (Data-Driven Documents, data-driven documents) visualization chart library, Three.js drawing library.
[0093] Step 6: Draw each rectangular box corresponding to the rectangular box information sequence in the initial three-dimensional business process diagram. The data visualization method can be used to draw each rectangular box corresponding to the rectangular box information sequence in the initial three-dimensional business process diagram.
[0094] Step 7: Connect the rectangular boxes in the initial three-dimensional business process diagram to obtain a three-dimensional business process diagram. Specifically, the following steps can be performed:
[0095] Sub-step 1, obtaining a rectangular frame coordinate data set from a preset position data acquisition interface. The position data acquisition interface may be an interface for obtaining coordinates corresponding to a graphic on a chart. The rectangular frame coordinate data in the rectangular frame coordinate data set may include a rectangular frame identifier and a rectangular frame coordinate group. The rectangular frame identifier may be a unique identifier of the rectangular frame. The rectangular frame coordinates in the rectangular frame coordinate group may be the coordinates of the midpoint of the rectangular frame edge line.
[0096] Sub-step 2: for each rectangular frame information in the rectangular frame information sequence, perform the following line drawing steps to update the initial three-dimensional business process diagram:
[0097] In the first sub-step, in response to determining that the rectangular frame information is not the last rectangular frame information in the rectangular frame information sequence, the rectangular frame information in the rectangular frame information sequence that meets the preset position condition is determined as the subsequent rectangular frame information. The preset position condition may be the adjacent rectangular frame information in the rectangular frame information sequence that is arranged after the rectangular frame information.
[0098] The second sub-step is to select rectangular frame coordinate data matching the rectangular frame information from the rectangular frame coordinate data set as the predecessor rectangular frame coordinate data.
[0099] The third sub-step is to select the rectangular frame coordinate data matching the subsequent rectangular frame information from the rectangular frame coordinate data set as the subsequent rectangular frame coordinate data.
[0100] The fourth sub-step is to determine the coordinate matching pair corresponding to the above-mentioned predecessor rectangular frame coordinate data and the above-mentioned successor rectangular frame coordinate data according to the distance formula between two points. The above-mentioned coordinate matching pair can be a combination of two coordinates corresponding to the shortest distance between the coordinates of the midpoints of each sideline on one rectangular frame and the coordinates of the midpoints of each sideline on another rectangular frame. The above-mentioned coordinate matching pair can include a first coordinate and a second coordinate. The above-mentioned first coordinate and the second coordinate can be the coordinates of the midpoints of the sidelines on the two rectangular frames, respectively.
[0101] The fifth sub-step is to connect the first coordinate and the second coordinate in the above coordinate matching pair by using the above data visualization method.
[0102] Sub-step three: in response to detecting that the connection processing for the rectangular frame information sequence is completed, determining the updated initial three-dimensional business process diagram as the three-dimensional business process diagram.
[0103] As an example, Figure 2 A schematic diagram of a three-dimensional business process diagram of the microservice test information display method disclosed in the present invention is shown. Figure 2 The horizontal axis of the three-dimensional coordinate system where the three-dimensional business process diagram is located includes merchant system labels, commodity system labels, transaction system labels and logistics system labels, the vertical axis includes merchant labels and user labels, and the vertical axis includes product delivery link labels and transaction link labels. Figure 2 The three-dimensional business process diagram includes process nodes such as registration, product release, product viewing, ordering, logistics delivery and confirmation of receipt. The directed lines in the three-dimensional business process diagram reflect the execution order between process nodes. For example, from registration to product release, it indicates that merchants can only release products after registration.
[0104] In the second step, for each microservice call information in the above microservice call information set, perform the following steps:
[0105] The first sub-step is to generate a method node information sequence based on the microservice method call information sequence included in the above microservice call information. The method node information in the above method node information sequence may be information of a node representing a microservice method. For each microservice method call information in the microservice method call information sequence included in the above microservice call information, the microservice method identifier included in the above microservice method call information may be used as a node identifier, and the node identifier and the preset node style information may be determined as the method node information. The above node style information may be information of the style type of the node. The style type may be, but is not limited to, one of the following: a point type, a rectangle type.
[0106] The second sub-step is to determine the node call relationship information corresponding to each method node information in the method node information sequence to obtain a node call relationship information set. The node call relationship information in the node call relationship information set may be information of two nodes with a call relationship. For each method node information in the method node information set, the following steps are performed:
[0107] Sub-step 1: determining the target sequence number corresponding to the method node information, wherein the target sequence number is the sequence number of the method node information in the method node information sequence.
[0108] Sub-step 2: In response to determining that the target sequence number is different from the preset sequence number, selecting method node information that satisfies a preset adjacent sequence number condition from the method node information sequence as the first method node information. The preset sequence number may be 1. The preset adjacent sequence number condition may be: the sequence number corresponding to the method node information in the method node information sequence is less than the target sequence number and is adjacent to the method node information corresponding to the target sequence number.
[0109] Sub-step three: using the method node information as the second method node information, and determining the first method node information and the second method node information as node call relationship information.
[0110] The third sub-step is to draw a microservice method call relationship subgraph based on the above-mentioned node call relationship information set. Among them, the above-mentioned microservice method call relationship subgraph can represent the sequential call relationship between the various microservice methods encapsulated by the corresponding microservice interface. Each microservice method call relationship subgraph has a corresponding subgraph identifier. The subgraph identifier can be a unique identifier of the microservice method call relationship subgraph. The above-mentioned microservice method call relationship subgraph may include a method node group. Each method node group corresponds to a node identifier one by one. The microservice method call relationship subgraph can be drawn based on the above-mentioned node call relationship information set by the above-mentioned data visualization method.
[0111] In the third step, the three-dimensional business process diagram and the obtained microservice method call relationship subgraph set are bound to obtain a microservice business process diagram. First, for each rectangular frame element in the three-dimensional business process diagram, the subgraph identifier corresponding to the microservice method call relationship subgraph matching the rectangular frame element is determined as the first data attribute value corresponding to the rectangular frame element. Among them, the subgraph identifier corresponding to the microservice method call relationship subgraph matching the rectangular frame element can be the same as the rectangular frame identifier. The first data attribute value can be the attribute value of the first preset data attribute corresponding to the rectangular frame element. The first preset data attribute can be a pre-set data attribute. For example, the first preset data attribute can be represented by "data (data) -bind (binding) -1". Then, in response to detecting that each rectangular frame element is bound to the microservice method call relationship subgraph, the three-dimensional business process diagram after data binding and the microservice method call relationship subgraph set are determined as the microservice business process diagram.
[0112] Step 106, binding each functional code block corresponding to each microservice application with the microservice business flow chart to obtain a bound microservice business flow chart.
[0113] In some embodiments, the execution subject may bind each functional code block corresponding to each microservice application to the microservice business flow chart to obtain a bound microservice business flow chart. The bound microservice business flow chart may be a microservice business flow chart associated with the test results of each functional code block. Specifically, the following steps may be performed:
[0114] The first step is to initialize the test results of each functional code block to a preset result. The preset result may be a preset Boolean value. For example, the preset result may be "false", indicating that the functional code block of the corresponding microservice method has not passed the test or the test has not been completed.
[0115] In the second step, for each rectangular frame element in the above three-dimensional business process diagram, the test result group corresponding to each functional code block matching the above rectangular frame element is determined as the second data attribute value corresponding to the above rectangular frame element. Among them, matching the above rectangular frame element can be that the microservice interface identifier corresponding to the functional code block is the same as the above rectangular frame identifier. The above second data attribute value can be the attribute value of the second preset data attribute corresponding to the rectangular frame element. The above second preset data attribute can be a pre-set data attribute. For example, the above second preset data attribute can be represented by "data-bind-2".
[0116] In the third step, for each method node corresponding to the above-mentioned microservice method call relationship subgraph set, the test result corresponding to the function code block matching the above-mentioned method node is determined as the node data attribute value corresponding to the above-mentioned method node. Among them, matching the above-mentioned method node can be that the microservice method identifier corresponding to the function code block is the same as the node identifier corresponding to the above-mentioned method node. The above-mentioned node data attribute value can be the attribute value of the node data attribute corresponding to the method node. The above-mentioned node data attribute can be a pre-set data attribute. For example, the above-mentioned node data attribute can be represented by "data-bind-node (node)".
[0117] In the fourth step, in response to detecting that each functional code block has been bound to the microservice business process diagram, the bound microservice business process diagram is determined as the bound microservice business process diagram.
[0118] The above three-dimensional business process diagram drawing steps and related contents, as an inventive point of an embodiment of the present disclosure, solve the technical problem 2 mentioned in the background technology, "it is difficult to provide comprehensive feedback on the test results corresponding to the business process". The reasons for the difficulty in providing comprehensive feedback on the test results corresponding to the business process are often as follows: due to the relatively simple structure of the two-dimensional chart, it is usually only possible to display low-dimensional statistical data for each microservice test result, and it is difficult to display each microservice test result from more dimensions. If the above problems are solved, the effect of providing comprehensive feedback on the test results corresponding to the business process can be achieved. In order to achieve this effect, first, a three-dimensional coordinate system is established according to each business label corresponding to each microservice demand information. Thus, it is convenient to display the microservice test results from multiple dimensions in the subsequent process. Then, according to the three-dimensional data and process sequence of the process node corresponding to the microservice interface, the process nodes and the lines between the nodes included in the business process are drawn in the three-dimensional coordinate system to obtain a three-dimensional business process diagram. Afterwards, according to the call relationship between the microservice methods, each microservice method call relationship subgraph is drawn. Finally, the functional method is bound to the three-dimensional business process diagram and each microservice method call relationship sub-diagram included in the microservice business process diagram. This facilitates the subsequent intuitive feedback of the test results of the functional method on the corresponding bound drawing elements. Thus, by drawing and binding the microservice business process diagram, the test results corresponding to the business process can be fed back more comprehensively.
[0119] Step 107, in response to receiving the test completion information of each method for each functional code block, the bound microservice business flow chart is updated to obtain a tested microservice business flow chart.
[0120] In some embodiments, the execution subject may update the above-mentioned bound microservice business process diagram in response to receiving the completion information of each method test for each functional code block, and obtain the microservice business process diagram after testing. Among them, each functional code block may correspond to at least one method test completion information. Each method test completion information may include but is not limited to a microservice method identifier, a test case identifier, and a test result. The above test case identifier may be a unique identifier of the test case. The above test result may be a Boolean value. For example, the above test result may be "false" or "true". "True" may indicate that the functional code block of the corresponding microservice method has passed the test. Specifically, the following steps may be performed:
[0121] In the first step, for each rectangular box element in the three-dimensional business process diagram included in the above-mentioned microservice business process diagram after binding, perform the following steps:
[0122] In the first sub-step, the method test completion information matching the rectangular frame element is selected from each method test completion information as the target method test completion information to obtain the target method test completion information group. The microservice method corresponding to the method test completion information matching the rectangular frame element may be encapsulated in the microservice interface corresponding to the rectangular frame element.
[0123] In the second sub-step, each test result corresponding to the target method test completion information group is determined as a target test result group.
[0124] The third sub-step is to update the second data attribute value corresponding to the rectangular frame element to the target test result group, and update the style of the rectangular frame element according to the preset style corresponding to the target test result group to obtain an updated rectangular frame element. The preset style can be a style of a pre-set drawing element. For example, the rectangular frame edge of the rectangular frame element is initially gray, and when the test results corresponding to the rectangular frame element are all passed, the corresponding rectangular frame edge is updated to green. The above-mentioned data visualization method can be used to update the style of the rectangular frame element according to the preset style corresponding to the target test result group to obtain an updated rectangular frame element.
[0125] The fourth sub-step is to determine the first data attribute value corresponding to the rectangular frame element as the target sub-graph identifier.
[0126] The fifth sub-step is to perform style update processing on the microservice method call relationship subgraph corresponding to the above target subgraph identifier according to the above target method test completion information group and the node data attributes corresponding to the method node, so as to obtain an updated microservice method call relationship subgraph.
[0127] In the second step, in response to detecting that the above-mentioned post-binding microservice business process diagram has been updated, the updated post-binding microservice business process diagram is determined as the post-test microservice business process diagram.
[0128] Step 108 , selecting method test completion information that meets a preset test failure condition from each method test completion information as abnormal test result information, and obtaining an abnormal test result information set.
[0129] In some embodiments, the execution subject may select the method test completion information that satisfies the preset test failure condition from the method test completion information as abnormal test result information to obtain an abnormal test result information set. The preset test failure condition may be that the test result included in the method test completion information is "false".
[0130] Step 109, based on the abnormal test result information set and the post-test microservice business process diagram, generate microservice test information corresponding to the target business process, and send the microservice test information to each development terminal for display.
[0131] In some embodiments, the execution subject may generate microservice test information corresponding to the target business process based on the abnormal test result information set and the post-test microservice business process diagram, and send the microservice test information to each development terminal for display. Among them, the microservice test information may be information about the results of each microservice application test. First, the post-test microservice business process diagram is exported as a target microservice business process image through the image export method provided by the data visualization library. Then, the target microservice business process image is compressed through a preset image compression interface to obtain a compressed microservice business process diagram. Among them, the image compression interface may be an interface for calling a commonly used image compression tool on the market to compress an image. Finally, the abnormal test result information set and the compressed microservice business process diagram are determined as microservice test information corresponding to the target business process.
[0132] Optionally, the execution subject may also generate secondary test request information corresponding to the self-test completion information in response to receiving the self-test completion information sent by the development terminal for any abnormal test result information, and send the secondary test request information to the test terminal for testing the microservice application. Among them, the self-test completion information may represent the information that the functional code block has been corrected. The secondary test request information may be information requesting a secondary test on the functional code block. The secondary test request information may include but is not limited to a microservice method identifier and a test case identifier. The test terminal may be a terminal for testing each functional code block. After receiving the secondary test request information, the test terminal starts the code test operation according to the microservice method identifier and the test case identifier included in the secondary test request information.
[0133] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the microservice test information display method of some embodiments of the present disclosure, the microservice test results corresponding to the entire business process can be intuitively displayed, and the occupation of communication resources can be reduced. Specifically, the reason why it is difficult to intuitively display the microservice test results corresponding to the entire business process and occupy more communication resources is that: since each process node usually corresponds to multiple test results, if the source data of each microservice test result is directly sent to the terminal for item-by-item display, it is difficult to intuitively display the microservice test results corresponding to the entire business process, and it will occupy more communication resources. Based on this, the microservice test information display method of some embodiments of the present disclosure, first, obtains a demand analysis text information sequence for the target business process. Perform text recognition processing on each demand analysis text information in the above demand analysis text information sequence to obtain a microservice demand information sequence. Thus, the business demand data required for developing microservice applications corresponding to each process node corresponding to the target business process can be obtained. Secondly, the above microservice demand information sequence is annotated to obtain an annotated microservice demand information sequence, and the annotated microservice demand information sequence is sent to each development terminal for the development of each microservice application. Thus, each microservice requirement information with a label can be obtained, which is convenient for each development terminal to develop microservice applications in different business domains according to the label, and is convenient for the subsequent integration and display of the business process with each microservice application. Then, the microservice call information set corresponding to each microservice application is obtained. Among them, each microservice application may include at least one functional code block. Thus, the call relationship of each functional method in each microservice application can be obtained. Then, based on the above-mentioned annotated microservice requirement information sequence and the above-mentioned microservice call information set, a microservice business process diagram is drawn. Thus, the business process can be integrated with each microservice application, which is convenient for better simultaneous display of the two. Then, each functional code block corresponding to each microservice application is bound to the above-mentioned microservice business process diagram to obtain a bound microservice business process diagram. Thus, it is convenient to display the test results of each functional method in the above-mentioned microservice business process diagram in the subsequent process. Afterwards, in response to receiving the test completion information of each method for each functional code block, the above-mentioned bound microservice business process diagram is updated to obtain a tested microservice business process diagram. Thus, the test results of each functional method and the corresponding microservice application can be intuitively displayed in the above microservice business process diagram. Then, the method test completion information that meets the preset test failure conditions is selected from the above method test completion information as the abnormal test result information to obtain the abnormal test result information set. Thus, the test failure result data can be obtained, which is convenient for subsequent verification by the development end.Finally, based on the above-mentioned abnormal test result information set and the above-mentioned post-test microservice business process diagram, the microservice test information corresponding to the above-mentioned target business process is generated, and the above-mentioned microservice test information is sent to each development terminal for display. Therefore, the microservice test information display method of some embodiments of the present disclosure constructs a microservice business process diagram by integrating the business process with the corresponding microservice applications, and binds each functional method to the microservice business process diagram, thereby eliminating the need to display the source data of the test results item by item, thereby facilitating the intuitive display of the microservice test results corresponding to the entire business process. In addition, because when sending the microservice test information, the microservice test information only includes the chart corresponding to the post-test microservice business process diagram and part of the test result data, thereby reducing the occupation of communication resources.
[0134] Further references Figure 3 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a microservice test information display device, and these device embodiments are Figure 1 Corresponding to the method embodiments shown, the microservice test information display device 300 can be specifically applied to various electronic devices.
[0135] like Figure 3As shown, the microservice test information display device 300 of some embodiments includes: a first acquisition unit 301, a text recognition processing unit 302, a labeling processing unit 303, a second acquisition unit 304, a drawing unit 305, a binding processing unit 306, an update processing unit 307, a selection unit 308 and a generation and sending unit 309. Among them, the first acquisition unit 301 is configured to obtain a demand analysis text information sequence for a target business process; the text recognition processing unit 302 is configured to perform text recognition processing on each demand analysis text information in the above demand analysis text information sequence to obtain a microservice demand information sequence; the annotation processing unit 303 is configured to perform annotation processing on the above microservice demand information sequence to obtain an annotated microservice demand information sequence, and send the annotated microservice demand information sequence to each development terminal for development of each microservice application; the second acquisition unit 304 is configured to obtain a microservice call information set corresponding to each of the above microservice applications, wherein each microservice application includes at least one functional code block; the drawing unit 305 is configured to draw a microservice business process diagram based on the annotated microservice demand information sequence and the above microservice call information set; the binding unit 303 The processing unit 306 is configured to bind each functional code block corresponding to each microservice application with the microservice business process diagram to obtain a bound microservice business process diagram; the update processing unit 307 is configured to update the bound microservice business process diagram in response to receiving each method test completion information for each functional code block to obtain a tested microservice business process diagram; the selection unit 308 is configured to select the method test completion information that meets the preset test failure condition from the method test completion information as the abnormal test result information to obtain an abnormal test result information set; the generation and sending unit 309 is configured to generate microservice test information corresponding to the target business process based on the abnormal test result information set and the post-test microservice business process diagram, and send the microservice test information to each development terminal for display.
[0136] It can be understood that the units recorded in the microservice test information display device 300 are similar to the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the microservice test information display device 300 and the units contained therein, and will not be repeated here.
[0137] Further references Figure 4 , which shows a structural schematic diagram of an electronic device 400 suitable for implementing some embodiments of the present disclosure. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0138] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0139] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 4 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0140] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0141] It should be noted that the computer-readable medium in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0142] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0143] The above-mentioned computer-readable medium may be included in the above-mentioned device; or it may exist independently and not be assembled into the electronic device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains a demand analysis text information sequence for a target business process; performs text recognition processing on each demand analysis text information in the above-mentioned demand analysis text information sequence to obtain a microservice demand information sequence; performs annotation processing on the above-mentioned microservice demand information sequence to obtain an annotated microservice demand information sequence, and sends the annotated microservice demand information sequence to each development terminal for the development of each microservice application; obtains a microservice call information set corresponding to each of the above-mentioned microservice applications, wherein each microservice application includes at least one functional code block; based on the above-mentioned annotated microservice demand information sequence and the above-mentioned microservice call information sequence, information set, draw a microservice business process diagram; bind each functional code block corresponding to the above-mentioned microservice application with the above-mentioned microservice business process diagram to obtain a bound microservice business process diagram; in response to receiving each method test completion information for each functional code block, update the above-mentioned bound microservice business process diagram to obtain a tested microservice business process diagram; select the method test completion information that meets the preset test failure condition from the above-mentioned method test completion information as the abnormal test result information, and obtain the abnormal test result information set; based on the above-mentioned abnormal test result information set and the above-mentioned microservice business process diagram after testing, generate microservice test information corresponding to the above-mentioned target business process, and send the above-mentioned microservice test information to each development terminal for display.
[0144] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0145] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0146] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including a first acquisition unit, a text recognition processing unit, a labeling processing unit, a second acquisition unit, a drawing unit, a binding processing unit, an update processing unit, a selection unit, and a generation and sending unit. Among them, the names of these units do not constitute a limitation on the units themselves in certain cases, for example, the first acquisition unit may also be described as "a unit for acquiring a sequence of text information for demand analysis of a target business process".
[0147] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0148] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A method for displaying microservice test information, include: Obtaining a demand analysis text information sequence for a target business process; Performing text recognition processing on each demand analysis text information in the demand analysis text information sequence to obtain a microservice demand information sequence; Annotating the microservice requirement information sequence to obtain an annotated microservice requirement information sequence, and sending the annotated microservice requirement information sequence to each development terminal for developing each microservice application; Acquire a microservice call information set corresponding to each microservice application, wherein each microservice application includes at least one functional code block, each microservice call information in the microservice call information set represents a call relationship between each microservice method encapsulated in the same microservice interface, and each microservice call information in the microservice call information set includes a microservice method call information sequence, and the microservice method call information sequence is an ordered set of each microservice method call information arranged in a call order of the microservice method; Based on the annotated microservice demand information sequence and the microservice call information set, a microservice business process diagram is drawn; Binding each functional code block corresponding to each microservice application with the microservice business flow chart to obtain a bound microservice business flow chart, wherein the bound microservice business flow chart is a microservice business flow chart associated with the test results of each functional code block; In response to receiving the test completion information of each method for each functional code block, the bound microservice business flow chart is updated to obtain a tested microservice business flow chart; Selecting method test completion information that meets a preset test failure condition from the method test completion information as abnormal test result information to obtain an abnormal test result information set; Based on the abnormal test result information set and the post-test microservice business process diagram, generate microservice test information corresponding to the target business process, and send the microservice test information to each development terminal for display; The step of labeling the microservice demand information sequence to obtain a labeled microservice demand information sequence includes: For each microservice requirement information in the microservice requirement information sequence, perform the following steps: Inputting the microservice demand information into a pre-trained demand label generation model to obtain demand label information; Determine the microservice requirement information and the requirement tag information as microservice requirement annotation information to be confirmed; Send the obtained microservice requirement annotation information sequence to be confirmed to the requirement collection terminal for confirmation; In response to receiving update confirmation information for the to-be-confirmed microservice requirement annotated information sequence, updating the to-be-confirmed microservice requirement annotated information sequence to obtain an annotated microservice requirement information sequence; Wherein, drawing a microservice business process diagram based on the annotated microservice demand information sequence and the microservice call information set includes: Based on the annotated microservice requirement information sequence, a three-dimensional business process diagram is drawn, wherein the three-dimensional business process diagram includes a three-dimensional coordinate system, and the three-dimensional coordinate system is established according to each requirement label information corresponding to the annotated microservice requirement information sequence, and each requirement label information includes system label information, subject label information and stage label information; For each microservice call information in the microservice call information set, perform the following steps: Generate a method node information sequence based on the microservice method call information sequence included in the microservice call information; Determine the node call relationship information corresponding to each method node information in the method node information sequence to obtain a node call relationship information set; Based on the node call relationship information set, a microservice method call relationship subgraph is drawn, wherein the microservice method call relationship subgraph represents the sequential call relationship between each microservice method encapsulated by the microservice interface; The three-dimensional business process diagram and the obtained microservice method call relationship sub-graph set are bound to obtain a microservice business process diagram.
2. The method according to claim 1, in, The performing text recognition processing on each demand analysis text information in the demand analysis text information sequence to obtain a microservice demand information sequence includes: Performing data cleaning processing on the demand analysis text information sequence to obtain a cleaned demand text information sequence; Performing subject text recognition processing on each demand analysis text information in the demand analysis text information sequence to obtain a process node information sequence; Based on the process node information sequence, segmenting the cleaned demand text information sequence to obtain a segmented demand text information group sequence; Determine the microservice demand information corresponding to each segmented demand text information group in the segmented demand text information group sequence to obtain a microservice demand information sequence.
3. The method according to claim 1, in, The method further comprises: In response to receiving self-check completion information for any abnormal test result information sent by the development terminal, generating secondary test request information corresponding to the self-check completion information, and sending the secondary test request information to the test terminal for testing the microservice application.
4. A microservice test information display device, include: A first acquisition unit is configured to acquire a demand analysis text information sequence for a target business process; A text recognition processing unit is configured to perform text recognition processing on each demand analysis text information in the demand analysis text information sequence to obtain a microservice demand information sequence; A labeling processing unit is configured to label the microservice requirement information sequence to obtain a labeled microservice requirement information sequence, and send the labeled microservice requirement information sequence to each development terminal for developing each microservice application; A second acquisition unit is configured to acquire a microservice call information set corresponding to each microservice application, wherein each microservice application includes at least one functional code block, each microservice call information in the microservice call information set represents a call relationship between each microservice method encapsulated in the same microservice interface, and each microservice call information in the microservice call information set includes a microservice method call information sequence, and the microservice method call information sequence is an ordered set of each microservice method call information arranged in a call order of the microservice method; A drawing unit, configured to draw a microservice business process diagram based on the annotated microservice demand information sequence and the microservice call information set; A binding processing unit is configured to perform binding processing on each functional code block corresponding to each microservice application and the microservice business flow chart to obtain a bound microservice business flow chart, wherein the bound microservice business flow chart is a microservice business flow chart associated with the test results of each functional code block; An update processing unit is configured to update the bound microservice business flow chart in response to receiving the test completion information of each method for each functional code block, so as to obtain a tested microservice business flow chart; A selection unit is configured to select method test completion information that meets a preset test failure condition from the various method test completion information as abnormal test result information to obtain an abnormal test result information set; A generating and sending unit, configured to generate microservice test information corresponding to the target business process based on the abnormal test result information set and the post-test microservice business process diagram, and send the microservice test information to each development terminal for display; The step of labeling the microservice demand information sequence to obtain a labeled microservice demand information sequence includes: For each microservice requirement information in the microservice requirement information sequence, perform the following steps: Inputting the microservice demand information into a pre-trained demand label generation model to obtain demand label information; Determine the microservice requirement information and the requirement tag information as microservice requirement annotation information to be confirmed; Send the obtained microservice requirement annotation information sequence to be confirmed to the requirement collection terminal for confirmation; In response to receiving update confirmation information for the to-be-confirmed microservice requirement annotated information sequence, updating the to-be-confirmed microservice requirement annotated information sequence to obtain an annotated microservice requirement information sequence; Wherein, drawing a microservice business process diagram based on the annotated microservice demand information sequence and the microservice call information set includes: Based on the annotated microservice requirement information sequence, a three-dimensional business process diagram is drawn, wherein the three-dimensional business process diagram includes a three-dimensional coordinate system, and the three-dimensional coordinate system is established according to each requirement label information corresponding to the annotated microservice requirement information sequence, and each requirement label information includes system label information, subject label information and stage label information; For each microservice call information in the microservice call information set, perform the following steps: Generate a method node information sequence based on the microservice method call information sequence included in the microservice call information; Determine the node call relationship information corresponding to each method node information in the method node information sequence to obtain a node call relationship information set; Based on the node call relationship information set, a microservice method call relationship subgraph is drawn, wherein the microservice method call relationship subgraph represents the sequential call relationship between each microservice method encapsulated by the microservice interface; The three-dimensional business process diagram and the obtained microservice method call relationship sub-graph set are bound to obtain a microservice business process diagram.
5. An electronic device, include: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 3.
6. A computer readable medium having a computer program stored thereon, in, When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
