Routing Data Generation Method, Electronic Device, and Computer-Readable Storage Medium

By obtaining and assembling shared and private attribute information of routing data, the problem of redundant information storage in the gateway configuration background is solved, and efficient resource utilization and streamlining of routing data generation is achieved.

CN116366528BActive Publication Date: 2025-07-25KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310347991.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-03
Publication Date
2025-07-25
Estimated Expiration
2043-04-03

AI Technical Summary

Technical Problem

In the prior art, the gateway configuration backend stores a large amount of redundant routing information, resulting in waste of resources.

Method used

By obtaining the shared attribute information and private attribute information of the routing data for assembly, the routing data to be generated is generated to reduce redundant information storage.

Benefits of technology

Reduces redundancy in routing information storage, improves resource utilization efficiency, and ensures streamlined and reliable routing data generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116366528B_ABST
    Figure CN116366528B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a method for generating routing data, an electronic device, and a computer-readable storage medium. The method includes: in response to the routing data to be generated having a first routing identifier and a first routing group identifier, obtaining, from the stored routing information, first shared routing attribute information corresponding to the first routing group identifier and first private routing attribute information corresponding to the first routing identifier; and performing information assembly on the first shared routing attribute information and the first private routing attribute information to generate the routing data to be generated. Embodiments of the present disclosure can reduce the storage of redundant information, thereby reducing waste of resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technologies, and in particular, to a method for generating routing data, an electronic device, and a computer-readable storage medium. Background Art

[0002] Routing data is the core data for a gateway device to provide gateway services. Therefore, the management of routing data is very important.

[0003] Generally speaking, gateway data is managed by a gateway configuration background. Specifically, all routing configuration information can be stored in the gateway configuration background. The gateway configuration background can generate routing data regularly or irregularly according to the routing configuration information stored in itself, and provide the generated routing data to the gateway device.

[0004] It should be noted that by using the above method, a large amount of redundant information will be stored in the gateway configuration background, which will cause waste of resources. Summary of the Invention

[0005] To solve the above technical problems, the present disclosure is proposed. Embodiments of the present disclosure provide a method for generating routing data, an electronic device, and a computer-readable storage medium.

[0006] According to one aspect of an embodiment of the present disclosure, there is provided a method for generating routing data, including:

[0007] In response to the routing data to be generated having a first routing identifier and a first routing group identifier, obtaining, from the stored routing information, first shared routing attribute information corresponding to the first routing group identifier and first private routing attribute information corresponding to the first routing identifier;

[0008] Performing information assembly on the first shared routing attribute information and the first private routing attribute information to generate the routing data to be generated.

[0009] According to another aspect of an embodiment of the present disclosure, there is provided a routing data generation device, including:

[0010] An obtaining module, configured to obtain, from the stored routing information, first shared routing attribute information corresponding to the first routing group identifier and first private routing attribute information corresponding to the first routing identifier in response to the routing data to be generated having a first routing identifier and a first routing group identifier;

[0011] A generating module, configured to perform information assembly on the first shared routing attribute information and the first private routing attribute information to generate the routing data to be generated.

[0012] According to another aspect of the embodiments of the present disclosure, there is provided an electronic device, including:

[0013] a memory for storing a computer program product;

[0014] The processor is used to execute the computer program product stored in the memory, and when the computer program product is executed, the above-mentioned routing data generation method is implemented.

[0015] According to another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium on which computer program instructions are stored, wherein when the computer program instructions are executed by a processor, the above-mentioned routing data generating method is implemented.

[0016] According to another aspect of an embodiment of the present disclosure, a computer program product is provided, including computer program instructions, and when the computer program instructions are executed by a processor, the above-mentioned routing data generating method is implemented.

[0017] In the embodiment of the present disclosure, when the routing data to be generated has a first routing identifier and a first routing group identifier, the first shared routing attribute information corresponding to the first routing group identifier and the first private routing attribute information corresponding to the first routing identifier can be obtained from the stored routing information, and the routing data to be generated can be generated by assembling the first shared routing attribute information and the first private routing attribute information. In this way, by grouping the routing data, the same attributes of all routing data in the same routing data group can be extracted and stored as shared routing attribute information, and private routing attribute information can be stored for the unique attributes of each routing data. Therefore, there will not be a large amount of redundant information in the stored routing information, and the information stored in the stored routing information is very concise, which is conducive to reducing the waste of resources.

[0018] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the drawings, the same reference numerals generally represent the same components or steps.

[0020] Figure 1 It is a flowchart of a method for generating routing data provided by an exemplary embodiment of the present disclosure.

[0021] Figure 2It is a schematic flowchart of a routing data generation method provided by another exemplary embodiment of the present disclosure.

[0022] Figure 3 It is a schematic flowchart of a routing data generation method provided by still another exemplary embodiment of the present disclosure.

[0023] Figure 4 It is a schematic flowchart of a routing data generation method provided by yet another exemplary embodiment of the present disclosure.

[0024] Figure 5 It is a schematic diagram of user input of selected parameters in a routing data generation method provided by yet another exemplary embodiment of the present disclosure.

[0025] Figure 6 It is a schematic flowchart of a routing data generation method provided by yet another exemplary embodiment of the present disclosure.

[0026] Figure 7 It is a schematic structural diagram of a routing data generation device provided by an exemplary embodiment of the present disclosure.

[0027] Figure 8 It is a structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. Detailed implementation manners

[0028] Next, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments of the present disclosure. It should be understood that the present disclosure is not limited by the exemplary embodiments described herein.

[0029] It should be noted that: unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions and values set forth in these embodiments do not limit the scope of the present disclosure.

[0030] Those skilled in the art can understand that terms such as "first", "second", etc. in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and do not represent specific technical meanings, nor do they represent an inevitable logical order.

[0031] It should also be understood that in the embodiments of the present disclosure, "a plurality" may refer to two or more, and "at least one" may refer to one, two or more.

[0032] It should also be understood that for any component, data or structure mentioned in the embodiments of the present disclosure, without clear definition or contrary indication in the context, it can generally be understood as one or more.

[0033] In addition, the term "and / or" in the present disclosure is merely a description of the relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent three cases: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in the present disclosure generally indicates that the associated objects before and after are in an "or" relationship.

[0034] It should also be understood that the descriptions of the various embodiments in the present disclosure emphasize the differences between the various embodiments, and their similarities or similarities can be referred to each other. For the sake of brevity, they will not be elaborated one by one.

[0035] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0036] The following description of at least one exemplary embodiment is actually merely illustrative and in no way limits the present disclosure or its application or use.

[0037] Techniques, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the techniques, methods, and devices should be regarded as part of the specification.

[0038] It should be noted that like reference numerals and letters indicate like items in the following figures, and thus, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0039] The embodiments of the present disclosure can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate together with many other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, and so on.

[0040] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system-executable instructions (such as program modules) executed by a computer system. Program modules can include routines, programs, target programs, components, logics, data structures, etc., which perform specific tasks or implement specific abstract data types. The computer system / server can be implemented in a distributed cloud computing environment where tasks are executed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.

[0041] Exemplary method

[0042] Figure 1 It is a schematic flowchart of a routing data generation method provided by an exemplary embodiment of the present disclosure. Figure 1 The method shown can be applied to electronic devices such as a gateway configuration background, Figure 1 The method shown can include step 110 and step 120, and each step will be described separately below.

[0043] Step 110, in response to the routing data to be generated having a first routing identifier and a first routing group identifier, obtain, from the stored routing information, first shared routing attribute information corresponding to the first routing group identifier and first private routing attribute information corresponding to the first routing identifier.

[0044] It should be noted that any routing data involved in the embodiments of the present disclosure may all have a routing identifier, such as a routing id, and the routing identifier can be used to distinguish different routing data; at least some of the routing data involved in the embodiments of the present disclosure may have a routing group identifier, such as a routing group id, and the routing group identifier can be used to distinguish different routing data groups.

[0045] Optionally, the stored routing information may include information essential for generating any routing data, and the stored routing information can be stored in the form of a data table. For the sake of clear layout, the composition of the stored routing information will be introduced in detail later.

[0046] Optionally, the first shared routing attribute information corresponding to the first routing group identifier may refer to: routing attribute information shared by all routing data in the routing data group having the first routing group identifier.

[0047] Optionally, the first private routing attribute information corresponding to the first routing identifier may refer to: routing attribute information that is unique to the routing data to be generated and not possessed by the remaining routing data in the routing data group having the first routing group identifier.

[0048] Step 120: Assemble the first shared routing attribute information and the first private routing attribute information to generate the routing data to be generated.

[0049] In step 120, by assembling the first shared routing attribute information and the first private routing attribute information, routing data in JSON format (which is a lightweight data exchange format) can be generated, and this routing data can be used as the routing data to be generated.

[0050] It should be noted that by executing the above steps 110 to 120, a piece of routing data to be processed can be obtained. By executing the above steps 110 to 120 multiple times, a large amount of routing data can be obtained. The gateway configuration background can provide all this routing data to the gateway device. In this way, using this routing data provided by the gateway configuration background, the gateway device can provide reliable gateway services.

[0051] In the embodiments of the present disclosure, when the routing data to be generated has a first routing identifier and a first routing group identifier, the first shared routing attribute information corresponding to the first routing group identifier and the first private routing attribute information corresponding to the first routing identifier can be obtained from the stored routing information. By assembling the first shared routing attribute information and the first private routing attribute information, the routing data to be generated can be generated. In this way, by grouping the routing data, the same attributes of all the routing data in the same routing data group can be extracted and stored as the shared routing attribute information, and the private routing attribute information for the unique attributes of each routing data can be stored separately. Therefore, there will be no large amount of redundant information in the stored routing information, and the information stored in the stored routing information is very concise, which is conducive to reducing resource waste.

[0052] In an optional example, the stored routing information includes: a first information set, a second information set, and a third information set. The first information set records the correspondence between the routing group identifier and the shared routing definition path prefix. The second information set records multiple routing rule information, and each routing rule information in the second information set corresponds to a routing identifier or a routing group identifier. The third information set records multiple routing basic information, and each routing basic information corresponds to a routing identifier or a routing group identifier;

[0053] In Figure 1 Based on the embodiment shown, as Figure 2 shown, step 110 includes:

[0054] Step 1101: Based on the first information set, determine the first shared routing definition path prefix corresponding to the first routing group identifier;

[0055] Step 1103: Based on the second information set, determine the first shared routing rule information corresponding to the first routing group identifier and the first private routing rule information corresponding to the first routing identifier.

[0056] Step 1105: Based on the third information set, determine the first routing basic information corresponding to the first routing identifier, and from the first routing basic information, obtain the first private routing definition path suffix corresponding to the first routing identifier.

[0057] Among them, the first shared routing attribute information includes: the first shared routing definition path prefix and the first shared routing rule information, and the first private routing attribute information includes: the first private routing definition path suffix and the first private routing rule information.

[0058] Optionally, the first information set, the second information set, and the third information set can all be in the form of data tables.

[0059] Optionally, the number of the second information sets can be two. One of the second information sets is used to record multiple assertors, and the other second information set is used to record multiple filters. Each assertor among the multiple assertors can be used as a routing rule information, and each filter among the multiple filters can also be used as a routing rule information.

[0060] It should be noted that if both of the two second information sets are in the form of data tables, the two second information sets can be respectively called the assertor table and the filter table. Additionally, the number of the second information sets can also be only one, and multiple assertors and multiple filters can be recorded in this second information set at the same time.

[0061] Optionally, each routing basic information in the third information set can include at least one of the following: information identifier (such as the serial number used to represent the sorting position of this routing basic information in the third information set), creation time, creator, modification time, modifier, and the field used to represent whether this routing basic information corresponds to routing data or a routing data group. If this routing basic information corresponds to a routing data group, this routing basic information can also include the routing group identifier of this routing data group. If this routing basic information corresponds to routing data, this routing basic information can also include the routing identifier of this routing data, and if this routing data also belongs to a certain routing data group, this routing basic information can also include the routing group identifier of this routing data group and the sub-identifier of this routing data under this routing data group. In this way, through this routing identifier, this routing group identifier, and this sub-identifier, the association between this routing data and this routing data group can be better represented, and thus the routing data with both a routing identifier and a routing group identifier can be efficiently and reliably identified.

[0062] In one example, the information shown in Table 1 can be recorded in the first information set:

[0063] Routing group identifier Shared routing definition path prefix Z1 / console / marketing / authorization Z2 / console / after-sale serving / authorization

[0064] Table 1

[0065] The number of the second information sets can be two. Among them, the information shown in Table 2 can be recorded in one second information set, and the information shown in Table 3 can be recorded in the other second information set:

[0066] Routing rule information Identifier Assertor a Z1 Assertor b Z1 Assertor m r1 Assertor f r2

[0067] Table 2

[0068] Routing rule information Identifier Filter c Z1 Filter g r1 Filter n r2

[0069] Table 3

[0070] The information shown in Table 4 can be recorded in the third information set:

[0071] Identifier Routing basic information Z1 Routing basic information 1 r1 Routing basic information 2 r2 Routing basic information 3

[0072] Table 4

[0073] Assume that the first routing identifier is r1 and the first routing group identifier is Z1. Then, as can be seen from Table 1 above, the prefix of the first shared routing definition path corresponding to Z1 is / console / marketing / authorization; as can be seen from Table 2 and Table 3 above, the first shared routing rule information corresponding to Z1 can include assertor a, assertor b, and filter c, and the first private routing rule information corresponding to r1 can include assertor m and filter g; as can be seen from Table 4 above, the first routing base information corresponding to r1 is routing base information 2, and the routing base information 2 can include a private routing definition path suffix, and this private routing definition path suffix can be used as the first private routing definition path suffix. Thus, the prefix of the first shared routing definition path, the first shared routing rule information, the first private routing rule information, and the first private routing definition path suffix are all successfully obtained, and then the routing data corresponding to r1 (i.e., the routing data to be generated) can be generated through information assembly.

[0074] In the embodiments of the present disclosure, with reference to the first information set, the second information set, and the third information set, the first shared routing definition path prefix, the first shared routing rule information, the first private routing rule information, and the first private routing definition path suffix can be determined efficiently and reliably, so as to implement the generation of the to-be-generated routing data accordingly. Moreover, by using the first information set to store the shared routing definition path prefix, the second information set to store the routing rule information, and the third information set to store the routing basic information, the storage of routing-related information can be made more regular, facilitating information search and conducive to ensuring the generation speed of routing data.

[0075] Based on the embodiments shown Figure 2 as Figure 3 shown, the method further includes step 130, step 140, step 150, step 160, and step 170.

[0076] Step 130, receiving an operation request from the user for the second information set or the third information set.

[0077] Optionally, the user can initiate an operation request for the second information set or the third information set through touch input, keyboard input, mouse input, voice input, etc.; wherein, the operation request can be used to request addition, deletion, modification, query, etc. of the second information set or the third information set.

[0078] Step 140, receiving the verification information input by the user.

[0079] Optionally, the user can input the verification information through keyboard input, mouse input, voice input, etc.; the verification information can include the identification information of the user, for example, including the user's UCID (Universal Call Identifier).

[0080] Step 150, determining the first microservice selected by the user.

[0081] Optionally, the user can select a microservice from multiple microservices through keyboard input, mouse input, voice input, etc., and the microservice selected by the user can be used as the first microservice.

[0082] Optionally, in the housing rental and sales scenario, new houses can be used as one microservice, second-hand houses can be used as another microservice, and factories can be used as yet another microservice.

[0083] It should be noted that any routing data involved in the embodiments of the present disclosure can belong to a microservice, and the microservice to which the routing data belongs can be represented by the application_id field in the corresponding routing basic information.

[0084] Step 160. Determine the permission information of the user corresponding to the first microservice based on the verification information.

[0085] Optionally, an administrator list corresponding to the first microservice can be stored in advance. The administrator list can include the UCIDs of at least one administrator; wherein, the at least one administrator can include at least one of the following: ordinary administrator, super administrator.

[0086] The verification information can include the user's UCID. If the user's UCID is in the administrator list, it can be determined that the user does not have the operation permission corresponding to the first microservice. If the user's UCID is in the administrator list, it can be determined that the user has the operation permission corresponding to the first microservice. Further, it can also be determined what specific operation permission the user has corresponding to the first microservice. Thus, the permission information of the user corresponding to the first microservice can be obtained.

[0087] Step 170. Process the operation request based on the permission information.

[0088] In an alternative embodiment,

[0089] Before step 170, the method further includes:

[0090] Obtain the first service public information corresponding to the first microservice;

[0091] Step 170 includes at least one of the following:

[0092] In response to the permission information indicating that the user does not have the operation permission corresponding to the first microservice, do not respond to the operation request, and display the first service public information and the administrator list corresponding to the first microservice;

[0093] In response to the permission information indicating that the user has the first type of operation permission corresponding to the first microservice, respond to the operation request and display the first service public information;

[0094] In response to the permission information indicating that the user has the second type of operation permission corresponding to the first microservice, respond to the operation request and display the first service public information and the preset configuration page corresponding to the first microservice.

[0095] Optionally, a fourth information set can be preset. The fourth information set can record the correspondence between microservices and service public information. The service public information can include at least one of the following: service identifier, forwarding address; wherein, the service identifier includes but is not limited to service ID, service name, etc.

[0096] Optionally, the fourth information set can be either in the stored routing information or outside the stored routing information.

[0097] Optionally, the first type of operation permission may be the operation permission corresponding to an ordinary administrator, and the second type of operation permission may be the operation permission corresponding to a super administrator.

[0098] In this implementation manner, according to the corresponding relationship recorded in the fourth information set, the first service common information corresponding to the first microservice can be determined efficiently and reliably.

[0099] If the permission information of the user corresponding to the first microservice indicates that the user does not have the operation permission corresponding to the first microservice, the operation request may not be responded to. For example, assuming that the application_id field in a certain routing basic information in the third information set indicates that the routing data corresponding to the current routing basic information belongs to the first microservice, the user is not allowed to perform operations such as addition, deletion, modification, and query on the routing basic information. In addition, the first service common information and the administrator list corresponding to the first microservice may also be presented to the user to facilitate the user to view the first service common information, and the user can contact the administrator of the first microservice to grant themselves the operation permission corresponding to the first microservice.

[0100] If the permission information of the user corresponding to the first microservice indicates that the user has the first operation permission corresponding to the first microservice, the operation request may be responded to, that is, the user is allowed to perform operations such as addition, deletion, modification, and query on the second information set or the third information set. In addition, the first service common information may also be presented to the user.

[0101] If the permission information of the user corresponding to the first microservice indicates that the user has the second type of operation permission corresponding to the first microservice, in addition to responding to the operation request and presenting the first service common information to the user, a preset configuration page corresponding to the first microservice may also be presented to the user. The preset configuration page may be an advanced configuration page of the first microservice. The user can operate on the advanced configuration page according to actual needs to perform advanced configuration on the second information set or the third information set. For example, under the first type of operation permission, the user may only modify a certain value in the third information set within a certain numerical range, while under the second type of operation permission, through the advanced configuration page, the user can modify the value in the third information set to any value required by themselves.

[0102] In the embodiments of the present disclosure, when receiving an operation request from a user for a second information set or a third information set, the authentication information input by the user may be referred to to determine the permission information of the user corresponding to the first microservice to which the routing data to be generated belongs, so as to process the operation request in a suitable manner with reference to the determined permission information. In this way, through permission control, it can be ensured that only authorized personnel can operate on the routing information under the corresponding service in the stored routing information, which is beneficial to ensuring the security and reliability of the stored routing information. In addition, each routing data belongs to a corresponding microservice, which is beneficial to realizing the isolation of routing data between different services, thereby avoiding mutual influence between different services.

[0103] Based on the embodiment shown in Figure 2 as shown in Figure 4 the method further includes step 175, step 180, step 185, and step 190.

[0104] Step 175: Display multiple routing attribute options.

[0105] Optionally, as shown in Figure 5 the multiple routing attribute options may include an interface Uniform Resource Identifier (URI) option, a login option, a permission point option, etc.

[0106] Step 180: Receive a routing configuration operation input by the user; wherein, the routing configuration operation is used to input selected parameters for each of the multiple routing attribute options respectively.

[0107] Optionally, the user may perform the routing configuration operation by means of keyboard input, mouse input, voice input, etc. For example, the user may fill in a certain interface URI in the rectangular box behind "interface uri" in Figure 5 , select "yes" or "no" behind "whether to log in" in Figure 5 , and select the required permission point from the drop-down menu in the rectangular box behind "permission point" in Figure 5 . The interface URI filled in by the user may be used as the selected parameter input for the interface URI option, the "yes" or "no" selected by the user may be used as the selected parameter input for the login option, and the permission point selected by the user may be used as the selected parameter input for the permission point option.

[0108] Step 185: Determine a second routing identifier corresponding to the routing configuration operation.

[0109] In step 185, all the identifiers in the third information set may be traversed, and according to a preset rule, another identifier different from all the identifiers in the third information set is generated, and the generated identifier may be used as the second routing identifier.

[0110] Assume that all the identifiers in the third information set are in the form of numerical IDs. Then, the ID with the largest value in the third information set can be determined, and the sum of this ID with the largest value and 1 is used as the second routing identifier.

[0111] Step 190: Based on the selected parameters corresponding to multiple routing attribute options and the second routing identifier, add corresponding information to the second information set and the third information set respectively.

[0112] Continuing the above example for Figure 5 Assume that the interface URI filled in by the user is " / api / v1 / frame" and the user selects "Yes". Then, a new routing basic information can be added to the third information set. This routing basic information corresponds to the second routing identifier, and " / api / v1 / frame" is placed at a certain position in this routing basic information. Moreover, a new routing rule information can be added to the second information set. This routing rule information corresponds to the second routing identifier and is used to indicate that login is required.

[0113] In the embodiments of the present disclosure, by visually presenting multiple routing attribute options to the user, the user can input selected parameters for multiple routing attribute options according to actual needs. Through simple input operations, corresponding information can be automatically added to the second information set and the third information set. Subsequently, complex JSON - formatted routing data can be automatically generated based on the added information.

[0114] In an optional example, the first shared routing attribute information includes: the first shared routing definition path prefix and the first shared routing rule information, and the first private routing attribute information includes: the first private routing definition path suffix and the first private routing rule information;

[0115] Performing information assembly on the first shared routing attribute information and the first private routing attribute information to generate the to - be - generated routing data, including:

[0116] In response to the conflict between the first routing rule information in the first shared routing rule information and the second routing rule information in the first private routing rule information, perform information assembly on the first shared routing definition path prefix, the routing rule information in the first shared routing rule information except the first routing rule information, the first private routing definition path suffix, and the first private routing rule information to generate the to - be - generated routing data.

[0117] It should be noted that the determination methods of the first shared routing definition path prefix, the first shared routing rule information, the first private routing definition path suffix, and the first private routing rule information can refer to the relevant introductions in the above text and will not be elaborated here.

[0118] Assume that there is a first routing rule information in the first shared routing rule information, and the first routing rule information represents that a login is required. There is a second routing rule information in the first private routing rule information, and the second routing rule information represents that a login is not required. Then, it can be considered that the first routing rule information and the second routing rule information conflict. At this time, the first routing rule information in the first shared routing rule information can be discarded, and the remaining information of the first shared routing rule information can be used for the generation of the routing data to be generated. This is beneficial to avoiding conflicting routing rule information in the generated routing data, thereby ensuring the correctness of the generated routing data.

[0119] In Figure 1 Based on the embodiment shown, as Figure 6 shown, before step 120, the method further includes:

[0120] Step 112, determining the second microservice to which the routing data to be generated belongs.

[0121] In step 112, the second microservice to which the routing data to be generated belongs can be determined by referring to the application_id field in the routing basic information corresponding to the routing data to be generated.

[0122] Step 114, obtaining the second service public information corresponding to the second microservice.

[0123] It should be noted that the specific implementation process of step 114 can refer to the relevant introduction of the acquisition method of the first service public information in the above text, and will not be elaborated here.

[0124] Step 120 includes step 1201.

[0125] Step 1201, performing information assembly on the first shared routing attribute information, the first private routing attribute information, and the second service public information to generate the routing data to be generated.

[0126] In an alternative embodiment, the first shared routing attribute information includes: a first shared routing definition path prefix and a first shared routing rule information, the first private routing attribute information includes: a first private routing definition path suffix and a first private routing rule information, and the second service public information includes: a first service identifier and a first forwarding address;

[0127] Step 1201 includes:

[0128] Performing information assembly on the first service identifier, the first shared routing definition path prefix, and the first private routing definition path suffix to generate a first target data;

[0129] Assemble information on the first forwarding address, the path prefix defined by the first shared route, and the path suffix defined by the first private route to generate second target data;

[0130] Assemble information on the first shared route rule information and the first private route rule information to generate third target data;

[0131] Generate the routing data to be generated including the first target data, the second target data, and the third target data.

[0132] Suppose the path prefix defined by the first shared route is console / marketing / authorization, the first shared route rule information includes assertor a, assertor b, and filter c, the path suffix defined by the first private route is / update, the first private route rule information includes assertor m and filter g, the first service identifier is serviceId, and the first forwarding address is lb: / / xxx.com. Then the first target data can be represented in the following form: serviceId / console / marketing / authorization / update, the second target data can be represented in the following form: lb: / / xxx.com / console / marketing / authorization / update, and the third target data can include two parts. One part is assertor a, assertor b, and assertor m, and the other part is filter c and filter g. Thus, the routing data to be generated including the first target data, the second target data, and the third target data can be obtained. The routing data to be generated specifically includes four parts, which are respectively:

[0133] I. The path of the front-end request (corresponding to the first target data)

[0134] II. The target service address to which it is forwarded (corresponding to the second target data)

[0135] III. Assertors (corresponding to a part of the third target data)

[0136] IV. Filters (corresponding to the other part of the third target data).

[0137] In this implementation manner, by assembling the first shared route defined path prefix, the first shared route rule information, the first private route defined path suffix, the first private route rule information, the first service identifier, and the first forwarding address, the generation of routing data can be efficiently and reliably achieved. Moreover, after the generated routing data is provided to the gateway device, it can effectively guide the processing and forwarding of corresponding data requests.

[0138] In one example, assume there are two pieces of routing data, namely routing data 1 and routing data 2. Among them, routing data 1 includes assertors a, b, m, filters c, g, and routing data 2 includes assertors a, b, f, filters c, n. Also, the routing definition path in routing data 1 is lb: / / xxx.com / console / marketing / authorization / update, and the routing definition path in routing data 2 is lb: / / xxx.com / console / marketing / authorization / copy. In the related art, to generate routing data 1 and routing data 2, in the gateway configuration background, it is necessary to store assertors a, b, m, filters c, g, and lb: / / xxx.com / console / marketing / authorization / update for the routing identifier of routing data 1, and store assertors a, b, f, filters c, n, and lb: / / xxx.com / console / marketing / authorization / copy for the routing identifier of routing data 2. Obviously, there is a lot of redundancy in the information stored in the gateway configuration background.

[0139] In view of this, in the embodiments of the present disclosure, the concept of a routing data group can be introduced. Specifically, routing data 1 and routing data 2 can be classified into the same routing data group. For the routing group identifier of this routing data group, assertors a, b, filter c, / console / marketing / authorization can be stored. For the routing identifier of routing data 1, assertor m, filter g, and / update can be additionally stored. For the routing identifier of routing data 2, assertor f, filter n, and / copy can be additionally stored. In this way, when actually generating routing data such as routing data 1 and routing data 2, the private filters, assertors, routing definition path suffixes, etc. of the routing data can be scanned first, and then the assertors, routers, routing definition path prefixes, etc. shared by the routing data group to which this routing data belongs can be scanned. Through information assembly, it can finally become a piece of routing data that can be provided for the gateway device to use. Compared with the related art, to generate routing data, the amount of information that needs to be stored in the gateway configuration background is greatly reduced, thereby avoiding resource waste.

[0140] Any routing data generation method provided by an embodiment of the present disclosure can be executed by any suitable device with data processing capabilities, including but not limited to: terminal devices, servers, etc. Alternatively, any routing data generation method provided by an embodiment of the present disclosure can be executed by a processor. For example, the processor executes any routing data generation method mentioned in an embodiment of the present disclosure by calling corresponding instructions stored in a memory. Details will not be elaborated below.

[0141] Exemplary device

[0142] Figure 7 is a schematic structural diagram of a routing data generation device provided by an exemplary embodiment of the present disclosure. Figure 7 The device shown includes a first acquisition module 710 and a generation module 720.

[0143] The first acquisition module 710 is configured to, in response to the routing data to be generated having a first routing identifier and a first routing group identifier, obtain, from the stored routing information, first shared routing attribute information corresponding to the first routing group identifier and first private routing attribute information corresponding to the first routing identifier.

[0144] The generation module 720 is configured to perform information assembly on the first shared routing attribute information and the first private routing attribute information to generate the routing data to be generated.

[0145] In an alternative example, the stored routing information includes: a first information set, a second information set, and a third information set. The first information set records the correspondence between routing group identifiers and shared routing definition path prefixes. The second information set records multiple routing rule information, and each routing rule information in the second information set corresponds to a routing identifier or a routing group identifier. The third information set records multiple routing basic information, and each routing basic information corresponds to a routing identifier or a routing group identifier.

[0146] The first acquisition module 710 includes:

[0147] A first determination sub-module, configured to determine, based on the first information set, a first shared routing definition path prefix corresponding to the first routing group identifier.

[0148] A second determination sub-module, configured to determine, based on the second information set, first shared routing rule information corresponding to the first routing group identifier and first private routing rule information corresponding to the first routing identifier.

[0149] An acquisition sub-module, configured to determine, based on the third information set, first routing basic information corresponding to the first routing identifier, and obtain, from the first routing basic information, a first private routing definition path suffix corresponding to the first routing identifier.

[0150] Among them, the first shared routing attribute information includes: a first shared routing definition path prefix and first shared routing rule information, and the first private routing attribute information includes: a first private routing definition path suffix and first private routing rule information.

[0151] In an optional example, the device further includes:

[0152] A first receiving module, configured to receive an operation request of a user for a second information set or a third information set;

[0153] A second receiving module, configured to receive verification information input by the user;

[0154] A first determination module, configured to determine a first microservice selected by the user;

[0155] A second determination module, configured to determine, based on the verification information, permission information of the user corresponding to the first microservice;

[0156] A processing module, configured to process the operation request based on the permission information.

[0157] In an optional example,

[0158] the device further includes:

[0159] A second obtaining module, configured to obtain first service public information corresponding to the first microservice before processing the operation request based on the permission information;

[0160] The processing module includes at least one of the following:

[0161] A first processing sub-module, configured to, in response to the permission information indicating that the user does not have the operation permission corresponding to the first microservice, not respond to the operation request, and display the first service public information and an administrator list corresponding to the first microservice;

[0162] A second processing sub-module, configured to, in response to the permission information indicating that the user has a first type of operation permission corresponding to the first microservice, respond to the operation request, and display the first service public information;

[0163] A third processing sub-module, configured to, in response to the permission information indicating that the user has a second type of operation permission corresponding to the first microservice, respond to the operation request, and display the first service public information and a preset configuration page corresponding to the first microservice.

[0164] In an optional example, the device further includes:

[0165] A display module, configured to display a plurality of routing attribute options;

[0166] A third receiving module, configured to receive a routing configuration operation input by a user; wherein, the routing configuration operation is used to respectively input selected parameters for a plurality of routing attribute options;

[0167] A third determining module, configured to determine a second routing identifier corresponding to the routing configuration operation;

[0168] An adding module, configured to respectively add corresponding information to a second information set and a third information set based on the selected parameters respectively corresponding to the plurality of routing attribute options and the second routing identifier.

[0169] In an optional example, the first shared routing attribute information includes: a first shared routing definition path prefix and first shared routing rule information, and the first private routing attribute information includes: a first private routing definition path suffix and first private routing rule information;

[0170] The generating module 720 is specifically configured to:

[0171] In response to a conflict between the first routing rule information in the first shared routing rule information and the second routing rule information in the first private routing rule information, perform information assembly on the first shared routing definition path prefix, the routing rule information other than the first routing rule information in the first shared routing rule information, the first private routing definition path suffix, and the first private routing rule information, so as to generate to-be-generated routing data.

[0172] In an optional example,

[0173] The apparatus further includes:

[0174] A fourth determining module, configured to determine a second microservice to which the to-be-generated routing data belongs before performing information assembly on the first shared routing attribute information and the first private routing attribute information to generate the to-be-generated routing data;

[0175] A third obtaining module, configured to obtain second service public information corresponding to the second microservice;

[0176] The generating module 720 is specifically configured to:

[0177] Perform information assembly on the first shared routing attribute information, the first private routing attribute information, and the second service public information, so as to generate the to-be-generated routing data.

[0178] In an optional example, the first shared routing attribute information includes: a first shared routing definition path prefix and first shared routing rule information, the first private routing attribute information includes: a first private routing definition path suffix and first private routing rule information, and the second service public information includes: a first service identifier and a first forwarding address;

[0179] The generation module 720 includes:

[0180] The first generation sub-module is used to assemble information on the first service identifier, the prefix of the first shared routing definition path, and the suffix of the first private routing definition path to generate the first target data;

[0181] The second generation sub-module is used to assemble information on the first forwarding address, the prefix of the first shared routing definition path, and the suffix of the first private routing definition path to generate the second target data;

[0182] The third generation sub-module is used to assemble information on the first shared routing rule information and the first private routing rule information to generate the third target data;

[0183] The fourth generation sub-module is used to generate the routing data to be generated including the first target data, the second target data, and the third target data.

[0184] Exemplary electronic device

[0185] Next, refer to Figure 8 to describe the electronic device according to an embodiment of the present disclosure. The electronic device can be either the first device and / or the second device, or a stand-alone device independent of them, and the stand-alone device can communicate with the first device and the second device to receive the input signals collected from them.

[0186] Figure 8 The block diagram of the electronic device 800 according to an embodiment of the present disclosure is illustrated.

[0187] As Figure 8 shown, the electronic device 800 includes one or more processors 810 and a memory 820.

[0188] The processor 810 can be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and can control other components in the electronic device 800 to perform desired functions.

[0189] The memory 820 may store one or more computer program products. The memory 820 may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program products may be stored on the computer-readable storage media, and the processor 810 may run the computer program products to implement the routing data generation method of various embodiments of the present disclosure described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage media.

[0190] In one example, the electronic device 800 may further include: an input device 830 and an output device 840, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown).

[0191] For example, when the electronic device 800 is the first device or the second device, the input device 830 may be a microphone or a microphone array. When the electronic device 800 is a stand-alone device, the input device 830 may be a communication network connector for receiving the collected input signals from the first device and the second device.

[0192] In addition, the input device 830 may further include, for example, a keyboard, a mouse, and so on.

[0193] The output device 840 may output various information to the outside. The output device 840 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, and so on.

[0194] Of course, for simplicity, Figure 8 only some of the components related to the present disclosure in the electronic device 800 are shown, and components such as buses, input / output interfaces, etc. are omitted. In addition, according to specific application scenarios, the electronic device 800 may further include any other appropriate components.

[0195] Exemplary computer program product and computer-readable storage medium

[0196] In addition to the above methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions that, when run by a processor, cause the processor to execute the steps in the routing data generation method according to various embodiments of the present disclosure described in the "Exemplary Method" section above of this specification.

[0197] The computer program product may be written in any combination of one or more programming languages for programming code to perform the operations of the embodiments of the present disclosure. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The programming code may be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0198] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are run by a processor, the processor is caused to execute the steps in the routing data generation method according to various embodiments of the present disclosure described in the "Exemplary Method" section above of this specification.

[0199] The computer-readable storage medium may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, include but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0200] The basic principles of the present disclosure have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, advantages, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, advantages, effects, etc. are essential for each embodiment of the present disclosure. In addition, the above-mentioned specific details are only for the purpose of illustration and facilitating understanding, and are not limitations. The above details do not limit the present disclosure to necessarily adopt the above specific details to implement.

[0201] Each embodiment in this specification is described in a progressive manner, and the key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0202] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," etc. are open-ended terms meaning "including but not limited to" and can be used interchangeably with each other. The words "or" and "and" used herein refer to the phrase "and / or" and can be used interchangeably with it, unless the context clearly indicates otherwise. The phrase "such as" used herein refers to the phrase "such as but not limited to" and can be used interchangeably with it.

[0203] The methods and apparatuses of this disclosure can be implemented in many ways. For example, the methods and apparatuses of this disclosure can be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of the steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the specific order described above, unless otherwise specifically stated. In addition, in some embodiments, this disclosure can also be implemented as a program recorded on a recording medium, and these programs include machine-readable instructions for implementing the methods according to this disclosure. Therefore, this disclosure also covers a recording medium storing a program for executing the methods according to this disclosure.

[0204] It should also be noted that in the apparatuses, equipment, and methods of this disclosure, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of this disclosure.

[0205] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0206] The above description has been given for purposes of illustration and description. In addition, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions, and sub-combinations thereof.

Claims

1. A method for generating routing data, characterized in that, Including: In response to the routing data to be generated having a first routing identifier and a first routing group identifier, obtaining, from the stored routing information, first shared routing attribute information corresponding to the first routing group identifier and first private routing attribute information corresponding to the first routing identifier; wherein, the first shared routing attribute information corresponding to the first routing group identifier refers to routing attribute information shared by all routing data in the routing data group having the first routing group identifier; the first private routing attribute information corresponding to the first routing identifier refers to routing attribute information that is unique to the routing data to be generated and not possessed by the remaining routing data in the routing data group having the first routing group identifier; Performing information assembly on the first shared routing attribute information and the first private routing attribute information to generate the routing data to be generated; Wherein, the stored routing information includes: a first information set, a second information set, and a third information set. The first information set records the correspondence between routing group identifiers and shared routing definition path prefixes. The second information set records multiple routing rule information, and each routing rule information in the second information set corresponds to a routing identifier or a routing group identifier. The third information set records multiple routing basic information, and each routing basic information corresponds to a routing identifier or a routing group identifier.

2. The method according to claim 1, wherein The obtaining, from the stored routing information, first shared routing attribute information corresponding to the first routing group identifier and first private routing attribute information corresponding to the first routing identifier includes: Based on the first information set, determining a first shared routing definition path prefix corresponding to the first routing group identifier; Based on the second information set, determining first shared routing rule information corresponding to the first routing group identifier and first private routing rule information corresponding to the first routing identifier; Based on the third information set, determining first routing basic information corresponding to the first routing identifier, and obtaining, from the first routing basic information, a first private routing definition path suffix corresponding to the first routing identifier; Wherein, the first shared routing attribute information includes: the first shared routing definition path prefix and the first shared routing rule information, and the first private routing attribute information includes: the first private routing definition path suffix and the first private routing rule information.

3. The method according to claim 2, wherein The method further includes: Receiving an operation request from the user for the second information set or the third information set; Receiving verification information input by the user; Determining a first microservice selected by the user; Based on the verification information, determining permission information of the user corresponding to the first microservice; Based on the permission information, processing the operation request.

4. The method according to claim 3, wherein, Before the processing the operation request based on the permission information, the method further includes: Obtaining first service common information corresponding to the first microservice; The processing the operation request based on the permission information includes at least one of the following: In response to the permission information indicating that the user does not have the operation permission corresponding to the first microservice, the operation request is not responded to, and the first service public information and the administrator list corresponding to the first microservice are displayed; In response to the permission information indicating that the user has the first type of operation permission corresponding to the first microservice, the operation request is responded to, and the first service public information is displayed; In response to the permission information indicating that the user has the second type of operation permission corresponding to the first microservice, the operation request is responded to, and the first service public information and the preset configuration page corresponding to the first microservice are displayed.

5. The method according to claim 2, wherein The method further includes: Displaying a plurality of routing attribute options; Receiving a routing configuration operation input by the user; wherein the routing configuration operation is used to respectively input selected parameters for the plurality of routing attribute options; Determining a second routing identifier corresponding to the routing configuration operation; Based on the selected parameters respectively corresponding to the plurality of routing attribute options and the second routing identifier, adding corresponding information to the second information set and the third information set respectively.

6. The method according to claim 1, wherein The first shared routing attribute information includes: a first shared routing definition path prefix and first shared routing rule information, and the first private routing attribute information includes: a first private routing definition path suffix and first private routing rule information; The information assembly of the first shared routing attribute information and the first private routing attribute information to generate the to-be-generated routing data includes: In response to a conflict between the first routing rule information in the first shared routing rule information and the second routing rule information in the first private routing rule information, information assembly is performed on the first shared routing definition path prefix, the routing rule information other than the first routing rule information in the first shared routing rule information, the first private routing definition path suffix, and the first private routing rule information to generate the to-be-generated routing data.

7. The method according to claim 1, wherein Before the information assembly of the first shared routing attribute information and the first private routing attribute information to generate the to-be-generated routing data, the method further includes: Determining the second microservice to which the to-be-generated routing data belongs; Obtaining the second service public information corresponding to the second microservice; The information assembly of the first shared routing attribute information and the first private routing attribute information to generate the to-be-generated routing data includes: Performing information assembly on the first shared routing attribute information, the first private routing attribute information, and the second service public information to generate the to-be-generated routing data.

8. The method according to claim 7, wherein The first shared routing attribute information includes: a first shared routing definition path prefix and first shared routing rule information, the first private routing attribute information includes: a first private routing definition path suffix and first private routing rule information, and the second service public information includes: a first service identifier and a first forwarding address; Assembling the first shared routing attribute information and the first private routing attribute information to generate the to-be-generated routing data includes: Assembling the first service identifier, the first shared routing definition path prefix, and the first private routing definition path suffix to generate a first target data; Assembling the first forwarding address, the first shared routing definition path prefix, and the first private routing definition path suffix to generate a second target data; Assembling the first shared routing rule information and the first private routing rule information to generate a third target data; Generating the to-be-generated routing data including the first target data, the second target data, and the third target data.

9. An electronic device, characterized in that, Including: A memory for storing a computer program product; A processor for executing the computer program product stored in the memory, and when the computer program product is executed, implementing the routing data generation method according to any one of claims 1 to 8 above.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, implementing the routing data generation method according to any one of claims 1 to 8 above.

Citation Information

Patent Citations

  • Route based on a pattern of a received packet

    CN1839586A