CN111726373B - Communication link construction method, device and equipment - Google Patents

Communication link construction method, device and equipment Download PDF

Info

Publication number
CN111726373B
CN111726373B CN201910203884.3A CN201910203884A CN111726373B CN 111726373 B CN111726373 B CN 111726373B CN 201910203884 A CN201910203884 A CN 201910203884A CN 111726373 B CN111726373 B CN 111726373B
Authority
CN
China
Prior art keywords
communication
loaded
trigger operation
communication link
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910203884.3A
Other languages
Chinese (zh)
Other versions
CN111726373A (en
Inventor
陈康
叶克良
朱伟康
施海斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910203884.3A priority Critical patent/CN111726373B/en
Publication of CN111726373A publication Critical patent/CN111726373A/en
Application granted granted Critical
Publication of CN111726373B publication Critical patent/CN111726373B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the invention provides a method, a device and equipment for constructing a communication link, wherein the method comprises the following steps: the application program responds to a first trigger operation of a user and determines a plurality of business components to be loaded corresponding to the first trigger operation. Since each business component to be loaded can support a plurality of different communication behaviors, and a preset matching relationship can be provided between one communication behavior supported by one business component to be loaded and another communication behavior supported by another business component to be loaded, the application program can combine a plurality of business components to be loaded corresponding to the first trigger operation into a communication fragment by using the matching relationship. Finally, the application program determines a first communication link corresponding to the first trigger operation according to the communication segment. Therefore, compared with the mode of constructing the communication link by taking the component as the unit in the prior art, the scheme provides a brand-new mode of constructing the communication link by taking the communication fragment as the unit, thereby enriching the mode of constructing the communication link.

Description

Communication link construction method, device and equipment
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a method, an apparatus, and a device for constructing a communication link.
Background
In order to meet daily requirements of users, users generally install various application programs (apps) in terminal devices such as smart phones, for example, shopping apps or entertainment apps. The user can generate a trigger operation on the components in the App interface, and the trigger instruction corresponding to the trigger operation passes through each service component in the communication link corresponding to the trigger operation in sequence. Finally, the last-level service component in the communication link reversely transmits the response result corresponding to the trigger instruction according to the communication link, so that the response of the App to the trigger operation of the user is realized.
It can be seen that the response to the user trigger operation in App depends on the establishment of the communication link corresponding to the trigger operation. Therefore, how to establish a communication link between each service component in the App becomes an urgent problem to be solved.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, and a device for establishing a communication link between different components.
In a first aspect, an embodiment of the present invention provides a method for constructing a communication link, including:
responding to a first trigger operation of a user, and determining a plurality of business components to be loaded corresponding to the first trigger operation;
combining the plurality of service components to be loaded into communication segments according to the matching relation among the communication behaviors supported by the plurality of service components to be loaded;
determining a first communication link corresponding to the first trigger operation according to the communication fragment.
In a second aspect, an embodiment of the present invention provides a communication link constructing apparatus, including:
the device comprises a component determining module, a loading module and a loading module, wherein the component determining module is used for responding to a first trigger operation of a user and determining a plurality of service components to be loaded corresponding to the first trigger operation;
the combination module is used for combining the plurality of service components to be loaded into communication segments according to the matching relation among the communication behaviors supported by the plurality of service components to be loaded;
a link determination module to determine a first communication link corresponding to the first trigger operation according to the communication segment.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor and a memory, where the memory is used to store one or more computer instructions, and when executed by the processor, the one or more computer instructions implement the communication link establishment method in the first aspect. The electronic device may also include a communication interface for communicating with other devices or a communication network.
An embodiment of the present invention provides a computer storage medium for storing and storing a computer program, where the computer program is used to enable a computer to implement the communication link constructing method in the first aspect when executed.
In the method for constructing a communication link provided in the embodiment of the present invention, an application program responds to a first trigger operation of a user, and determines a plurality of service components to be loaded corresponding to the first trigger operation. Since each service component to be loaded can support a plurality of different communication behaviors, and a preset matching relationship can be provided between one communication behavior supported by one service component to be loaded and another communication behavior supported by another service component to be loaded, the application program can combine a plurality of service components to be loaded corresponding to the first trigger operation into a communication fragment by using the matching relationship. Finally, the application program determines a first communication link corresponding to the first trigger operation according to the communication segment. Therefore, compared with the mode of constructing the communication link by taking the component as the unit in the prior art, the scheme provides a brand-new mode of constructing the communication link by taking the communication fragment as the unit, thereby enriching the mode of constructing the communication link.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a communication link constructing method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a response result of the chat application in response to a first trigger;
FIG. 3 is a flow chart of an alternative implementation of step 102 of FIG. 1;
fig. 4 is a flowchart of another communication link construction method according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating the response of the chat application in response to a second trigger;
fig. 6 is a schematic structural diagram of a communication link constructing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device corresponding to the communication link construction apparatus provided in the embodiment shown in fig. 6.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, and "a" and "an" generally include at least two, but do not exclude at least one, unless the context clearly dictates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship.
The words "if," "if," as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a recognition," depending on the context. Similarly, the phrases "if determined" or "if identified (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when identified (a stated condition or event)" or "in response to an identification (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
In addition, the sequence of steps in each method embodiment described below is only an example and is not strictly limited.
Fig. 1 is a flowchart of a communication link constructing method according to an embodiment of the present invention. And bearing the application program scene in the background technology, after a user triggers any trigger operation in an interface provided by the application program, the application program constructs a communication link corresponding to the trigger operation, and based on the communication link, the application program can display a response result corresponding to the trigger operation to the user. Therefore, the communication link construction method provided by the embodiment of the invention can be executed by the application program after the application program responds to the trigger operation. As shown in fig. 1, the method comprises the steps of:
s101, responding to a first trigger operation of a user, and determining a plurality of service components to be loaded corresponding to the first trigger operation.
The multiple functions in the application are usually completed by means of multiple business components, and any operable element on the operation interface provided by the application can be regarded as one business component. Therefore, a user can generate a first trigger operation for any service component, wherein the first trigger operation can be understood as a service component loading operation, that is, after the first trigger operation is generated, the service component needs to be further loaded, and only after the first trigger operation is loaded, a response result corresponding to the first trigger operation can be displayed to the user. Alternatively, the first trigger operation may typically be a click, a slide operation, or the like.
After responding to the first trigger operation, optionally, the application program may determine the service component to be loaded corresponding to the first trigger operation according to the routing module configured by the application program. The routing module may maintain a list, and the list records which service components need to be loaded after the trigger operation B is generated on the service component a. The service component a may be any service component in the application program that a user can trigger operation, and the trigger operation B may be any trigger operation supported by the service component a. By querying the list, the application program can directly obtain a plurality of service components to be loaded corresponding to the first trigger operation. And the plurality of business components to be loaded can comprise the business component acted with the first trigger operation.
S102, combining the plurality of service components to be loaded into a communication fragment according to the matching relation among the communication behaviors supported by the plurality of service components to be loaded.
After the service component to be loaded corresponding to the first trigger operation is obtained, optionally, the application program may perform query in the matching relationship table. The matching relationship table may record a matching relationship between a trigger operation a supported by a service component a and a trigger operation B supported by a service component B, where the service component a is any service component supporting a user direct trigger operation in an application program, and the matching relationship may be preset according to a service requirement in an application program development stage. After the query, the application program can combine the matched service components to be loaded in the plurality of service components to be loaded into a communication segment.
And when the service components form a communication segment, the matching relationship table records the communication position relationship of each service component in the communication segment, for example, a matching relationship exists between the service component a supporting the trigger operation a and the service component B supporting the trigger operation B, and the first trigger operation of the user is directly acted on the service component a, so that the two service components can be combined into one communication segment, that is, the service component a-the service component B, but cannot be combined into the service component B-the service component a. The communication fragment [ service component a-service component B ] indicates that the operation instruction corresponding to the first trigger operation is transmitted from the service component a to the service component B.
It should be noted that the communication segment in the above example is composed of two service components, but in practical applications, the communication segment may also be composed of more than two service components.
In addition, optionally, after the communication segments are obtained, the application program may further record the service components included in each communication segment and the communication relationships of the service components in the communication segments into a global communication segment lookup table.
S103, determining a first communication link corresponding to the first trigger operation according to the communication fragment.
The number of the communication segments formed by combining the plurality of service components to be loaded can be one or more. When the communication segment is one, the communication segment is the first communication link corresponding to the first trigger operation.
When the number of the communication segments is multiple, the multiple communication segments need to be further sequenced, and then the multiple communication segments are combined into a first communication link corresponding to the first trigger operation according to the sequencing order.
At this time, in an optional manner, the application program first determines a target communication segment containing the target service component to be loaded, and determines that the target communication segment is located at the head of the first communication link. The target business component to be loaded is the business component to be loaded which acts as the first trigger operation. Then, the application program may determine the arrangement order of the remaining communication segments other than the target communication segment according to the preset rule again. And finally, taking the target communication segment as the head of the first communication link, and combining the plurality of communication segments into the first communication link corresponding to the first trigger operation by the rest communication segments according to the determined arrangement sequence. Optionally, the preset rule may be: for two adjacent communication segments, the tail traffic component in the previous communication segment is the same as the head traffic component in the next communication segment. In practice, the head component in the communication segment is generally called source component, and the tail component is generally called target component.
Based on the above description, it is illustrated how to combine a plurality of communication segments into a first communication link: the application program determines that the first trigger operation acts on the service component A, and also determines a communication segment 1 [ service component A-service component B ], a communication segment 2 [ service component B-service component C ] and a communication segment 3 [ service component C-service component D ], wherein the head components of the three communication segments are respectively the service component A, the service component B and the service component C, and the tail components are respectively the service component B, the service component C and the service component D. It may be determined that communication segment 1 is at the top of the first communication link in the manner described above. Meanwhile, since the tail traffic component in the communication segment 2 is the same as the head component in the communication segment 3, the arrangement order between the communication segment 2 and the communication segment 3 remains communication segment 2 — communication segment 3. Finally, the first communication link is: [ business component a-business component B ] - [ business component B-business component C ] - [ business component C-business component D ].
The following takes a chat application as an example, and specifically describes the process of establishing the first communication link. The chat application may be installed in the terminal device used by the user. When the user clicks the chat application program on the icon, that is, the start operation of the chat application program is triggered, the start operation can be regarded as a first trigger operation generated by the user, and the application program can determine the service component to be loaded corresponding to the start operation according to the routing module of the application program. Fig. 2 is a main interface of the chat application, and as shown in fig. 2, the service components to be loaded may include icons of the chat application on the terminal device interface, i.e., an icon component 1 (not shown in fig. 2), a chat entry 2, a message list 3, a container component 4, and a message number display component 5 in the main interface. And all the content displayed in the main interface can be regarded as a response result returned by the tail service component of the first communication link after the first communication link is established. The message number display component 5 at the lower left of the main interface may display the total number of all unread messages, and the box at the left of each chat entry in the main interface may display the number of unread messages corresponding to the chat entry.
After determining the service components to be loaded corresponding to the start operation, the application program may then match which service components to be loaded may be combined into a communication component in the relationship table. After the query, a plurality of communication segments, namely, a communication segment 1 [ icon component 1-chat item 2 ], a communication segment 2 [ chat item 2-message list 3 ], a communication segment 3 [ container component 4-message number display component 5 ], and a communication segment 4 [ message list 3-container component 4 ], can be obtained. According to the preset rule involved in step 103, the first communication link corresponding to the first trigger operation can be finally obtained as: [ icon component 1-chat item 2 ] - [ chat item 2-message list 3 ] - [ message list 3-container component 4 ] - [ container component 4-message number display component 5 ].
In the embodiment of the invention, the application program responds to the first trigger operation of a user and determines a plurality of service components to be loaded corresponding to the first trigger operation. Since each business component to be loaded can support a plurality of different communication behaviors, and a preset matching relationship can be provided between one communication behavior supported by one business component to be loaded and another communication behavior supported by another business component to be loaded, the application program can combine a plurality of business components to be loaded corresponding to the first trigger operation into a communication fragment by using the matching relationship. Finally, the application program determines a first communication link corresponding to the first trigger operation according to the communication segment. Therefore, compared with the mode of constructing the communication link by taking the component as the unit in the prior art, the scheme provides a brand-new mode of constructing the communication link by taking the communication fragment as the unit, thereby enriching the mode of constructing the communication link.
In order to enable the application to respond to the first trigger operation in time, optionally, on the basis of generating the first communication link, the application may further register a listening event on the service component to be loaded at the tail of the first communication link, taking over the above example, that is, register the listening event on the service component D. When the business component to be loaded at the tail part monitors the first trigger operation, a response result corresponding to the first trigger operation can be returned in time, so that the application program displays the response result for the user.
Regarding the return of the response result, in an optional manner, the operation instruction corresponding to the first trigger operation may sequentially pass through each service component in the first communication link. When the operation command reaches the tail service component of the first communication link, the operation command is the component identification associated with all the service components in the first communication link. The application program can then control the operation instructions to further associate the component identification of the self-associated business component with the response result generated by the tail business component. And finally, returning the response result according to the original path of the first communication link according to the self-associated component identification. The above process is actually to perform backtracking processing on the first trigger operation to ensure that the response result is not sent to the wrong service component. This section relates the component identification to the operation instruction and the processing of the response result, and in practical application, can be understood as the buried point processing of the data.
In addition, optionally, after the first communication link is determined, the application program may further generate a first tree diagram corresponding to the first communication link, and write the first tree diagram into the communication link tree lookup table. Under the subsequent scenes of upgrading and updating the application program and the like, technicians can visually and quickly know the communication relationship among the components before the application program is upgraded by inquiring the communication link tree, so that the communication relationship among the service components can be adjusted on the basis.
For step 102 in the above embodiment, as shown in fig. 3, an alternative implementation may be:
s201, respectively analyzing the communication behaviors supported by the plurality of service components to be loaded to obtain an analysis result corresponding to the communication behavior supported by each service component to be loaded.
After step 101 is executed, the application program may determine a plurality of business components to be loaded corresponding to the first trigger operation, and may further obtain description information for describing communication behaviors supported by each business component to be loaded. However, the description information obtained at this time is not in a form that can be directly read by the application program, and therefore, the description information needs to be further analyzed to obtain an analysis result. The application program can directly read the analysis result so as to know the communication behavior supported by each business component to be loaded. After the analysis result is obtained, the application program can also write the analysis result into the global execution unit query table so that the application program can query in the subsequent communication segment generation process. The parsing process is similar to compiling the description information, and the compiling process can be embodied as lexical analysis processing in practical application.
As can be seen from the above description, each service component to be loaded has description information for describing a communication behavior supported by itself, and the parsing manners of the description information corresponding to each service component to be loaded are the same, so that the parsing process is described by taking any one of the plurality of service components to be loaded, that is, the service component I to be loaded, as an example:
in practical applications, there may be multiple pieces of description information corresponding to the service component I to be loaded, and each piece of description information is used to indicate one communication behavior supported by the service component I to be loaded. Alternatively, a piece of description information may be embodied as a character string, and the character string may include delimiters. Based on this, optionally, the application may divide the description information into a plurality of information segments based on the descriptor contained in the description information, i.e. the character string, and then may directly determine the divided information segments as the analysis result corresponding to the communication behavior supported by the service component I to be loaded.
For example, in practical applications, each piece of description information has a preset information format. Optionally, one information format may be: scope/actionmethod # element! paramter. The descriptor is divided into a plurality of fields by the separators, that is, a character between two adjacent separators is a field, and a field is an information fragment. And each field represents a communication behavior attribute of the communication behavior. Where chema denotes the protocol name. pipe, domain, action and method respectively represent the communication direction, scope, action type and implementation mode of the communication action, and these parts are essential parts in the description information. The element and the paramter respectively represent the behavior result of the communication behavior and the additional description information of the communication behavior, and the two parts are unnecessary parts in the description information.
For example, the description information corresponding to the service component I to be loaded may be specifically expressed as: and rx, output, default/ajaxget # names, wherein the description information shows that the service component I supports to externally send an ajax request according to the preset information format, the request type is get, and the communication behavior of the names elements is obtained. After the application program divides the description information according to the separators, a plurality of information fragments can be obtained, namely 'output', 'default', 'ajax', 'get' and 'names'. The communication behavior attributes corresponding to the information pieces are additional description information of communication direction, scope, behavior type, communication request implementation mode and communication behavior.
In practical applications, due to different design manners of the application programs, the plurality of divided information fragments may still not satisfy the direct reading requirement of the application program, and therefore, the plurality of information fragments are further analyzed, and the analyzing process can be specifically expressed as syntax analysis. The process of grammar analysis usually includes two parts of word check and grammar rule check. In the present invention, because the content in the description information is usually simpler, the syntax analysis is mainly embodied in the verification of a plurality of information fragments, and the verified result can also be understood as an analysis result, and the analysis result usually meets the requirement of directly reading by the application program.
For the verification of multiple pieces of information, one optional way is: and identifying the communication behavior attribute corresponding to each information fragment according to the separator. If two information segments have the same communication behavior attribute, the information segment redundancy exists in the description information, and meanwhile, the position of the redundant information segment in the description information is determined. If the communication behavior attribute corresponding to each of the plurality of information segments lacks the necessary part in the above-mentioned description information, the information segment missing indication is indicated in the description information, and an information segment missing prompt is output. This prompt is typically not displayed on the application's operator interface, but appears in the background of the application in the form of instructions. After the application program obtains the description information error prompt, the application program further obtains relevant logic, for example, obtains the description information of the service component again, and performs analysis processing and the like again. If there is no information fragment missing and/or information fragment redundant in the description information, the plurality of information fragments can be directly determined as the analysis result of the communication behavior supported by the service component I to be loaded.
Of course, in the running process of the application program, a running error is inevitably generated, and the running error may be obtained by obtaining the wrong description information, which cannot be analyzed by the application program. Therefore, optionally, in order to improve the parsing efficiency, the application program may determine the validity of the description information before dividing the acquired description information into a plurality of information segments. If the description information is valid information, the valid description information is further divided into a plurality of information segments. Specifically, after the description information corresponding to a service component to be loaded is obtained, it is determined whether a preset illegal delimiter exists in the description information. If the preset illegal separator does not exist in the description information, the description information is valid, and the application program can further divide the valid description information into a plurality of information segments.
If the preset illegal separator exists, the description information is invalid, at this time, the application program does not further execute the step of dividing the description information into a plurality of information segments, and simultaneously outputs a description information error prompt. Similar to the above-mentioned message fragment missing prompt, this prompt is not usually displayed on the operation interface of the application, but appears in the background of the application in the form of an instruction. After obtaining the description information error prompt, the application program further correlates logic, such as re-obtaining and parsing the description information of the service component.
S202, according to the analysis result, inquiring in the matching relation among the communication behaviors supported by the service components to be loaded respectively to determine the service components to be loaded which meet the combination requirement in the service components to be loaded, and forming a communication segment by the service components to be loaded which meet the combination requirement. After obtaining the analysis result and writing the analysis result into the global execution unit query table, the application program may determine a trigger operation corresponding to the first trigger operation according to a preset corresponding relationship between the trigger operations, then query the service components respectively supporting the two trigger operations from the global execution unit query table, and combine the two queried service components into a communication fragment. The above process actually determines which service components to be loaded meet the combination requirement from the global execution unit lookup table according to the corresponding relationship between the trigger operations, and combines the service components to be loaded meeting the combination requirement into one communication segment.
In the embodiment of the invention, after the application program acquires the plurality of to-be-loaded service components corresponding to the first trigger operation, the description information for describing each to-be-loaded service component is analyzed to obtain an analysis result. The analysis result meets the requirement of directly reading the application program, and the communication behavior supported by each service component to be loaded can be obtained after the application program is read. Then, the application program can determine which of the service components to be loaded are the service components to be loaded meeting the combination requirement according to the analysis result, and determine the service components to be loaded meeting the combination requirement as the communication segments. Meanwhile, in order to improve the analysis efficiency, before the description information is analyzed, the validity of the description information is also checked. And the application program can further check the analysis result, so that the application program can determine the communication segment according to the correct analysis result.
In addition, the above-described analysis of the description information is actually performed when the user uses the application. However, since the description information corresponding to the service component is usually written by a developer manually, and an error is hard to avoid, in the application program development stage, in order to check whether the description information written by the developer is incorrect, the above parsing process is also required to be performed. So as to judge whether redundant description information exists or not according to the analysis result, namely the same description information exists. If the description information exists, the writing repetition exists when the developer writes the description information. One optional decision rule is: in the analysis results corresponding to the two pieces of description information, the communication behavior attributes corresponding to a plurality of information segments divided by each piece of description information are all the same. Another optional decision rule is: the information segments divided by each description information comprise information segments corresponding to the preset communication behavior attribute.
In addition, as mentioned in the embodiment shown in fig. 3, there is a preset corresponding relationship between one trigger operation, and each trigger operation corresponds to one piece of description information, so that the corresponding relationship between the trigger operations is also the corresponding relationship between the description information. In an optional manner, if the preset communication behavior attribute has the preset matching relationship in a plurality of information segments corresponding to two pieces of description information, and the remaining communication behavior attributes are the same, it indicates that the two pieces of description information are matched.
For example, the plurality of information pieces divided by the description information M respectively correspond to a protocol name, a communication direction, a scope, a behavior type and an implementation manner in the communication attribute, the plurality of information pieces divided by the information description N also respectively correspond to the communication behavior attribute, and the communication directions in the communication behavior attribute are one output and one input, and the two communication directions have a preset matching relationship, so that the description information M and the description information N are also matched.
The first trigger operation mentioned in the embodiment shown in fig. 1 may be actually understood as a service component loading operation, and in practical applications, it is easily conceivable that there is a service component unloading operation, and the service component unloading operation in this embodiment may be referred to as a second trigger operation, and the second trigger operation is often generated after the first trigger operation. Based on this, after step 103, fig. 4 is a flowchart of another communication link construction method provided in the embodiment of the present invention, and as shown in fig. 4, the method includes the following steps:
s301, responding to a second trigger operation of the user, and determining the service component to be unloaded corresponding to the trigger operation.
S302, deleting the communication segment including the service component to be unloaded in the first communication link to obtain a second communication link corresponding to the second trigger operation.
Similarly to the first trigger operation, the user may also generate a second trigger operation in the application program, where the second trigger operation may be understood as a service component uninstalling operation, that is, after the second trigger operation is generated, further uninstalling of the service component is required, and after the uninstalling, a response result corresponding to the first trigger operation may be displayed to the user. Alternatively, the second trigger operation may be a click operation, a slide operation, or the like. Similarly to step 101, the application program may also determine, according to a routing module configured by the application program, a service component to be offloaded corresponding to the second trigger operation. And the application program responds to the second trigger operation, and deletes the communication segment including the component to be unloaded from the first communication link from the established first communication link so as to obtain a second communication link corresponding to the second trigger operation.
Taking the example of the chat application in fig. 1 as an example, the first communication link is: [ icon component 1-chat item 2 ] - [ chat item 2-message list 3 ] - [ message list 3-container component 4 ] - [ container component 4-message number display component 5 ]. The second trigger operation generated by the user may be that the user clicks any chat item, at this time, in response to the second trigger operation, the application program determines that the components to be uninstalled are the message list 3 and the container component 4, and at this time, the chat application jumps from the main interface to the chat interface of the chat item, as shown in fig. 5, the second communication link is [ icon component 1-chat item 2 ].
When the user generates a triggering operation of clicking the return button in fig. 5, the application program returns to the main interface again from the chat interface, and at this time, the application program reconstructs the first communication link. And the number of unread messages in the lower left corner of the main interface is correspondingly changed, and meanwhile, the unread messages are not displayed on the chat items acted with the second trigger operation any more.
In the embodiment of the present invention, after the first communication link is established, the user may further generate a second trigger operation. And the application program determines the service component to be unloaded corresponding to the second trigger operation, and deletes the communication fragment containing the service component to be unloaded from the first communication link to obtain a second communication link.
In addition, after obtaining the second communication link, the application program will re-register the listening event with the service component on the second communication link. For simplifying the description, the process of re-registering the snoop event is explained by taking the tree diagram as a carrier:
after the application program obtains the first communication link and the second communication link, the application program correspondingly generates a first tree diagram and a second tree diagram which respectively correspond to the first tree diagram and the second tree diagram. Comparing the second tree diagram with the first tree diagram, if a new leaf node appears in the second tree diagram, registering the monitoring event on the new leaf node. If a new parent node appears in the second tree and the new parent node is a leaf node in the first tree, the existing snoop event is logged out of the newly appearing parent node.
The communication link construction apparatus of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that these communication link building means may be constructed by configuring the steps taught in the present solution using commercially available hardware components.
Fig. 6 is a schematic structural diagram of a communication link constructing apparatus according to an embodiment of the present invention, and as shown in fig. 6, the apparatus includes: a component determination module 11, a combination module 12 and a link determination module 13.
The component determining module 11 is configured to determine, in response to a first trigger operation of a user, a plurality of service components to be loaded corresponding to the first trigger operation.
The combination module 12 is configured to combine the multiple service components to be loaded into a communication fragment according to a matching relationship between the communication behaviors supported by the multiple service components to be loaded.
The link determining module 13 is configured to determine, according to the communication fragment, a first communication link corresponding to the first trigger operation.
Optionally, the combining module 12 specifically includes:
an analyzing unit 121, configured to analyze the communication behaviors supported by the multiple service components to be loaded, respectively, so as to obtain an analysis result corresponding to the communication behavior supported by each service component to be loaded.
A querying unit 122, configured to query, according to the analysis result, in a matching relationship among communication behaviors supported by the multiple service components to be loaded, so as to determine a service component to be loaded that meets an assembly requirement among the multiple service components to be loaded, and form a communication fragment from the service components to be loaded that meet the assembly requirement.
Optionally, the parsing unit 121 is specifically configured to: for a service component to be loaded, dividing description information into a plurality of information segments according to separators contained in the description information describing communication behaviors, wherein the communication behaviors described by the description information are the communication behaviors supported by the service component to be loaded; and checking the plurality of information fragments to obtain an analysis result corresponding to the communication behavior supported by the service component to be loaded.
Optionally, the apparatus further comprises: the determining module 21 is configured to determine whether a preset illegal delimiter exists in the character string included in the description information.
The analysis unit 121 is specifically configured to: and if the character string contained in the description information does not have a preset illegal separator, executing the step of dividing the description information into a plurality of information segments according to the separator contained in the description information describing the communication behavior.
Optionally, the apparatus further comprises: and the prompt module 22 is configured to output a description information error prompt if a preset illegal separator exists in the character string included in the description information.
Optionally, the parsing unit 121 is further specifically configured to: identifying communication behavior attributes corresponding to the plurality of information fragments according to the separators; determining whether the description information has information segment loss and/or information segment redundancy according to the communication behavior attribute corresponding to each information segment; and if the description information does not have information fragment missing and/or information fragment redundancy, determining the plurality of information fragments as the analysis result corresponding to the communication behaviors supported by the service component to be loaded.
Optionally, the apparatus further comprises: a position determining module 23, configured to determine, if there is redundancy of information segments in the description information, a position of a redundant information segment in the description information.
The prompt module 22 is further configured to output an information fragment missing prompt if there is an information fragment missing in the description information.
Optionally, the number of the communication segments is multiple, and the link determining module 13 specifically includes:
a first determining unit 131, configured to determine that a target communication fragment including the target to-be-loaded service component is located at a head of the first communication link, where the first triggering operation acts on the target to-be-loaded service component.
A second determining unit 132, configured to determine an arrangement order between remaining communication segments in the plurality of communication segments according to a preset rule, where the preset rule is that a tail service component in an adjacent previous communication segment is the same as a head service component in a subsequent communication segment.
A third determining unit 133, configured to sequentially connect the remaining communication segments with the target communication segment according to the arrangement order to generate a first communication link corresponding to the first trigger operation.
Optionally, the apparatus further comprises: a registering module 24, configured to register a listening event on the to-be-loaded service component located at the tail of the first communication link, so that when the to-be-loaded service component located at the tail listens to the first trigger operation, a response result corresponding to the first trigger operation is returned.
Optionally, the apparatus further comprises: an association module 25 and a transmission module 26.
The association module 25 is configured to associate, when an operation instruction corresponding to the first trigger operation passes through any service component to be loaded in the first communication link, a component identifier of the any service component to be loaded with the operation instruction; and associating the component identification associated with the operation instruction to the response result.
The transmission module 26 is configured to return the response result to the target service component to be loaded according to the component identifier associated with the response result.
Optionally, the component determining module 11 is configured to determine, in response to a second trigger operation of the user, a to-be-offloaded traffic component corresponding to the trigger operation.
The link determining module 13 is configured to delete the communication fragment including the service component to be offloaded in the first communication link, so as to obtain a second communication link corresponding to the second trigger operation.
Optionally, the apparatus further comprises: a generation module 27 and a logging-off module 28.
The generating module is configured to generate a first tree diagram corresponding to the first communication link and generate a second tree diagram corresponding to the second communication link.
The registering module 24 is configured to register a listening event on a service component to be unloaded corresponding to the newly added leaf node if the second tree diagram is compared with the first tree diagram and the newly added leaf node exists.
The cancellation module 28 is configured to cancel a monitoring event on the newly added parent node if the second dendrogram is compared with the first dendrogram, and the newly added parent node exists and is any leaf node in the first dendrogram.
The apparatus shown in fig. 6 can perform the method of the embodiment shown in fig. 1 to 5, and reference may be made to the related description of the embodiment shown in fig. 1 to 5 for a part not described in detail in this embodiment. The implementation process and technical effect of the technical solution refer to the descriptions in the embodiments shown in fig. 1 to fig. 5, and are not described herein again.
Having described the internal functions and structure of the communication link construction apparatus, in one possible design, the structure of the communication link construction apparatus may be implemented as an electronic device, which may be a terminal device installed with an application program, as shown in fig. 7, and the electronic device may include: a processor 31 and a memory 32. Wherein the memory 32 is used for storing a program for supporting the electronic device to execute the communication link construction method provided in the embodiments shown in fig. 1 to 5, and the processor 31 is configured to execute the program stored in the memory 32.
The program comprises one or more computer instructions which, when executed by the processor 31, are capable of performing the steps of:
responding to a first trigger operation of a user, and determining a plurality of business components to be loaded corresponding to the first trigger operation;
combining the plurality of service components to be loaded into communication segments according to the matching relation among the communication behaviors supported by the plurality of service components to be loaded;
determining a first communication link corresponding to the first trigger operation according to the communication fragment.
Optionally, the processor 31 is further configured to perform all or part of the steps in the foregoing embodiments shown in fig. 1 to 5.
The electronic device may further include a communication interface 33 for communicating with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for the electronic device, which includes a program for executing the communication link constructing method in the method embodiments shown in fig. 1 to 5.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course, can also be implemented by a combination of hardware and software. With this understanding in mind, the above-described aspects and portions of the present technology which contribute substantially or in part to the prior art may be embodied in the form of a computer program product, which may be embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including without limitation disk storage, CD-ROM, optical storage, and the like.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (13)

1. A method for constructing a communication link, comprising:
responding to a first trigger operation of a user, and determining a plurality of business components to be loaded corresponding to the first trigger operation;
combining the plurality of service components to be loaded into communication segments according to the matching relation among the communication behaviors supported by the plurality of service components to be loaded;
determining a first communication link corresponding to the first trigger operation according to the communication fragment;
after generating the first communication link, further comprising: and generating a first tree graph corresponding to the first communication link.
2. The method according to claim 1, wherein the combining the plurality of service components to be loaded into a plurality of communication fragments according to the matching relationship between the communication behaviors supported by the plurality of service components to be loaded comprises:
respectively analyzing the communication behaviors supported by the plurality of service components to be loaded to obtain an analysis result corresponding to the communication behavior supported by each service component to be loaded;
and inquiring in the matching relation among the communication behaviors supported by the service components to be loaded according to the analysis result so as to determine the service components to be loaded which meet the combination requirement in the service components to be loaded, and forming a communication segment by the service components to be loaded which meet the combination requirement.
3. The method according to claim 2, wherein the analyzing the communication behaviors supported by the service components to be loaded respectively to obtain an analysis result corresponding to the communication behaviors supported by each service component to be loaded comprises:
for a service component to be loaded, dividing description information into a plurality of information segments according to separators contained in the description information describing communication behaviors, wherein the communication behaviors described by the description information are the communication behaviors supported by the service component to be loaded;
and checking the plurality of information fragments to obtain an analysis result corresponding to the communication behavior supported by the service component to be loaded.
4. The method according to claim 3, wherein before dividing the description information describing the communication behavior into a plurality of information pieces according to separators included in the description information, the method further comprises:
determining whether a preset illegal separator exists in a character string contained in the description information;
and if the character string contained in the description information does not have a preset illegal separator, executing the step of dividing the description information into a plurality of information segments according to the separator contained in the description information describing the communication behavior.
5. The method according to claim 3, wherein the checking the plurality of information fragments to obtain a parsing result corresponding to the communication behavior supported by the service component to be loaded comprises:
identifying communication behavior attributes corresponding to the plurality of information fragments according to the separators;
determining whether the description information has information segment loss and/or information segment redundancy according to the communication behavior attribute corresponding to each information segment;
and if the description information does not have information fragment missing and/or information fragment redundancy, determining the plurality of information fragments as the analysis result corresponding to the communication behaviors supported by the service component to be loaded.
6. The method of claim 5, further comprising:
if the description information has information segment redundancy, determining the position of a redundant information segment in the description information;
and if the description information has information segment missing, outputting an information segment missing prompt.
7. The method of claim 1, wherein the number of the communication segments is multiple, and wherein the determining the first communication link corresponding to the first trigger operation according to the communication segments comprises:
determining that a target communication fragment containing a target service component to be loaded is positioned at the head of the first communication link, wherein the first trigger operation acts on the target service component to be loaded;
determining the arrangement sequence of the rest communication segments in the plurality of communication segments according to a preset rule, wherein the preset rule is that a tail service component in an adjacent previous communication segment is the same as a head service component in a next communication segment;
and sequentially connecting the remaining communication segments with the target communication segment according to the arrangement sequence to generate a first communication link corresponding to the first trigger operation.
8. The method of claim 7, further comprising:
and registering a monitoring event on the service component to be loaded positioned at the tail part of the first communication link so as to return a response result corresponding to the first trigger operation when the service component to be loaded positioned at the tail part monitors the first trigger operation.
9. The method of claim 8, further comprising:
when an operation instruction corresponding to the first trigger operation passes through any service component to be loaded in the first communication link, associating the component identifier of any service component to be loaded with the operation instruction;
associating a component identification associated with the operational instruction to the response result;
and returning the response result to the target business component to be loaded according to the component identifier associated with the response result.
10. The method of claim 1, further comprising:
responding to a second trigger operation of the user, and determining a business component to be unloaded corresponding to the trigger operation;
and deleting the communication fragment including the service component to be unloaded in the first communication link to obtain a second communication link corresponding to the second trigger operation.
11. The method of claim 10,
after deleting the communication segment including the service component to be offloaded in the first communication link to obtain a second communication link corresponding to the second trigger operation, the method further includes:
generating a second tree corresponding to the second communication link;
the method further comprises the following steps:
if the second tree-like graph is compared with the first tree-like graph, a newly added leaf node exists, and a monitoring event is registered on a service component to be unloaded corresponding to the newly added leaf node;
and if the second dendrogram is compared with the first dendrogram, a newly added father node exists and the newly added father node is any leaf node in the first dendrogram, canceling the monitoring event on the newly added father node.
12. A communication link construction apparatus, comprising:
the device comprises a component determining module, a loading module and a loading module, wherein the component determining module is used for responding to a first trigger operation of a user and determining a plurality of business components to be loaded corresponding to the first trigger operation;
the combination module is used for combining the plurality of service components to be loaded into communication segments according to the matching relation among the communication behaviors supported by the plurality of service components to be loaded;
a link determination module for determining a first communication link corresponding to the first trigger operation according to the communication fragment;
and the generating module is used for generating a first tree diagram corresponding to the first communication link after the first communication link is generated.
13. An electronic device, comprising: a memory, a processor; wherein the content of the first and second substances,
the memory is configured to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the communication link construction method of any of claims 1 to 11.
CN201910203884.3A 2019-03-18 2019-03-18 Communication link construction method, device and equipment Active CN111726373B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910203884.3A CN111726373B (en) 2019-03-18 2019-03-18 Communication link construction method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910203884.3A CN111726373B (en) 2019-03-18 2019-03-18 Communication link construction method, device and equipment

Publications (2)

Publication Number Publication Date
CN111726373A CN111726373A (en) 2020-09-29
CN111726373B true CN111726373B (en) 2022-06-03

Family

ID=72562266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910203884.3A Active CN111726373B (en) 2019-03-18 2019-03-18 Communication link construction method, device and equipment

Country Status (1)

Country Link
CN (1) CN111726373B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101861566A (en) * 2007-10-01 2010-10-13 奥多比公司 System and method for generating an application fragment
CN106899447A (en) * 2016-06-28 2017-06-27 阿里巴巴集团控股有限公司 The method and device that a kind of link determines

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6941135B2 (en) * 2001-08-13 2005-09-06 Qualcomm Inc. System and method for temporary application component deletion and reload on a wireless device
US9632906B2 (en) * 2013-03-15 2017-04-25 Ca, Inc. Automated software system validity testing
US9558105B2 (en) * 2013-03-15 2017-01-31 Ca, Inc. Transactional boundaries for virtual model generation
US10296445B2 (en) * 2015-09-13 2019-05-21 Ca, Inc. Automated system documentation generation
US20170200098A1 (en) * 2016-01-08 2017-07-13 Ca, Inc. Transaction flow visualization
US9946639B2 (en) * 2016-03-30 2018-04-17 Ca, Inc. Transactional boundaries for virtualization within a software system
US10394583B2 (en) * 2016-03-31 2019-08-27 Ca, Inc. Automated model generation for a software system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101861566A (en) * 2007-10-01 2010-10-13 奥多比公司 System and method for generating an application fragment
CN106899447A (en) * 2016-06-28 2017-06-27 阿里巴巴集团控股有限公司 The method and device that a kind of link determines

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
An Adaptive Reliability Analysis Using Path Testing for Complex Component-Based Software Systems;Chao-Jung Hsu 等;《IEEE》;20110124;全文 *
Reliability assessment of component based software by using basis path testing;R. Chinnaiyan 等;《IEEE》;20180111;全文 *
基于MVC框架的快速可重构内容管理***的研究与实现;薛慧军;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180415(第4期);第3-4章 *

Also Published As

Publication number Publication date
CN111726373A (en) 2020-09-29

Similar Documents

Publication Publication Date Title
CN108897691B (en) Data processing method, device, server and medium based on interface simulation service
US10169034B2 (en) Verification of backward compatibility of software components
US11231916B2 (en) Method and apparatus for data compilation using intermediate class files, electronic device and non-transitory computer readable storage medium
CN107092491B (en) Configuration loading method and system
JP2006031109A (en) Management system and management method
US11144437B2 (en) Pre-populating continuous delivery test cases
CN112380145A (en) SDK generation method, device, equipment and readable storage medium
CN113495797A (en) Message queue and consumer dynamic creation method and system
CN112905441A (en) Test case generation method, test method, device and equipment
CN112162761A (en) Method, system and equipment for automatically deploying project to public cloud containerization platform
CN113760308A (en) DSP system construction method and device, electronic equipment and storage medium
CN106502707B (en) Code generation method and device
CN112258295A (en) Recording processing method, device and equipment
CN111726373B (en) Communication link construction method, device and equipment
WO2023151397A1 (en) Application program deployment method and apparatus, device, and medium
CN112181407B (en) Service realization processing method, device, system, electronic equipment and storage medium
CN114338846B (en) Message testing method and device
CN110515905B (en) Method, device and server for configuring route
CN111736848A (en) Packet conflict positioning method and device, electronic equipment and readable storage medium
CN111158873A (en) System state machine implementation method and device, storage medium and processor
CN112905449A (en) Target test method, device, equipment and storage medium
CN112230938A (en) Method and device for configuring rental products of industrial Internet
CN111124712A (en) Event notification method, device, server and storage medium
US11561979B2 (en) Dynamically detecting and correcting errors in queries
CN110770702B (en) Information processing device, information processing system, information processing method, and recording medium

Legal Events

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