Service request forwarding method, device, electronic device and readable storage medium
The user's service request credentials are forwarded and verified through the gateway, which solves the security risks and operational complexity of the industrial service provision platform, and realizes a more efficient service request process.
Patent Information
- Application Number
- CN202310194793.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-27
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2043-02-27
AI Technical Summary
In industrial production, different computing models are set on different industrial service provision platforms, resulting in users needing to carry credentials and related parameters and access different platforms to request services. There are major security risks and complex operating processes, which reduces the efficiency of service provision .
Forward the user's service request credentials through the gateway, parse and verify the credential code. If the user has request permission, forward the credentials to the industrial service providing platform to avoid directly exposing the platform information, ensure security and simplify the user request process.
It improves the security of the industrial service providing platform, reduces the probability of platform information exposure, simplifies the operation process of users requesting services, and improves the efficiency of service requests.
Smart Images

Figure CN116137569B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, device, electronic device and readable storage medium for forwarding a service request. Background Art
[0002] In the field of industrial production, there are many computing models used to calculate industrial parameters. In some specific cases, different computing models may be set up in different industrial service provision platforms; therefore, when a user requests a service, he needs to carry credentials and related parameters and request the corresponding service by accessing different industrial service provision platforms.
[0003] In this case, the platform information of each industrial service provider platform (for example, the IP address and port number of the industrial service provider platform, etc.) will be exposed to users, resulting in a major security risk for the industrial service provider platform; and users need to log in to different industrial service providers to request services, which makes the process of user requesting services more complicated, the operation too cumbersome, and the service provision efficiency low. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a service request forwarding method, device, electronic device and readable storage medium, which can forward the service request credentials submitted by the user through the gateway, avoid directly exposing the platform information of the industrial service provider platform to the user, and ensure the security of the industrial service provider platform.
[0005] The embodiment of the present application provides a method for forwarding a service request, which is applied to a gateway; the forwarding method includes:
[0006] Obtaining a service request credential sent by a user; wherein the service request credential carries the industrial facility parameters required by the user to request the industrial service providing platform to provide industrial parameter accounting services;
[0007] Parsing the service request credential, and determining the credential code to be verified provided by the user from the service request credential;
[0008] Compare the credential code to be verified with the pre-stored credential code of the user recorded in the database to determine the service authentication result of the user;
[0009] If the service authentication result indicates that the user has the request authority to request the industrial service providing platform to provide industrial parameter accounting services, forwarding the service request certificate to the industrial service providing platform so that the industrial service providing platform provides the industrial parameter accounting services to the user according to the industrial facility parameters;
[0010] The industrial parameter calculation results fed back by the industrial service providing platform are forwarded to the user end.
[0011] In a possible implementation manner, parsing the service request credential to determine the credential code to be verified provided by the user from the service request credential includes:
[0012] Identifying the service request credential and determining request header data from the service request credential;
[0013] The request header data is decrypted to determine the credential code to be verified provided by the user.
[0014] In a possible implementation manner, comparing the credential code to be verified with a pre-stored credential code of the user recorded in a database to determine a service authentication result of the user includes:
[0015] Compare the credential code to be verified with the pre-stored credential code of the user recorded in the database to determine whether the credential code to be verified is consistent with the pre-stored credential code;
[0016] If they are consistent, determining whether the user is qualified to request the service;
[0017] If the user has the service request qualification, determining that the user has the request authority to request the industrial service providing platform to provide industrial parameter accounting services;
[0018] Otherwise, it is determined that the user does not have the authority to request the industrial service providing platform to provide the industrial parameter accounting service.
[0019] In a possible implementation manner, determining whether the user is qualified to request a service includes:
[0020] Determine whether the current time is within the usage time limit of the user and / or whether the user has a number of requests.
[0021] In a possible implementation manner, the forwarding method further includes:
[0022] In response to a service purchase operation, obtaining service purchase information provided by the user;
[0023] forwarding the service purchase information to the industrial service providing platform;
[0024] The service voucher code fed back by the industrial service providing platform to the user is forwarded to the user terminal used by the user, and the service voucher code is stored in the database as the user's pre-stored voucher code; wherein the service voucher code is obtained by encrypting the randomly generated initial voucher code.
[0025] In a possible implementation manner, the forwarding method further includes:
[0026] If the service authentication result indicates that the user does not have the request authority to request the industrial service providing platform to provide industrial parameter accounting services, authentication failure information is fed back to the user terminal to prompt the user to re-provide the credential code to be verified.
[0027] In a possible implementation manner, forwarding the industrial parameter calculation result fed back by the industrial service providing platform to the user terminal includes:
[0028] Analyze the industrial parameter calculation results and determine a result feedback path for feeding back the industrial parameter calculation results;
[0029] According to the result feedback path, the industrial parameter calculation result is fed back to the user end.
[0030] The embodiment of the present application further provides a device for forwarding a service request, which is applied to a gateway; the device for forwarding includes:
[0031] The credential acquisition module is used to acquire the service request credential sent by the user; wherein the service request credential carries the industrial facility parameters required by the user to request the industrial service provision platform to provide industrial parameter accounting services;
[0032] A credential parsing module, used to parse the service request credential and determine the credential code to be verified provided by the user from the service request credential;
[0033] A result determination module, used to compare the credential code to be verified with the pre-stored credential code of the user recorded in the database to determine the service authentication result of the user;
[0034] A request forwarding module, configured to forward the service request credential to the industrial service providing platform if the service authentication result indicates that the user has the request authority to request the industrial service providing platform to provide industrial parameter accounting services, so that the industrial service providing platform provides the user with industrial parameter accounting services according to the industrial facility parameters;
[0035] The result feedback module is used to forward the industrial parameter calculation results fed back by the industrial service providing platform to the user end.
[0036] In a possible implementation manner, when the credential parsing module is used to parse the service request credential and determine the credential code to be verified provided by the user from the service request credential, the credential parsing module is used to:
[0037] Identifying the service request credential and determining request header data from the service request credential;
[0038] The request header data is decrypted to determine the credential code to be verified provided by the user.
[0039] In a possible implementation manner, when the result determination module is used to compare the credential code to be verified with the pre-stored credential code of the user recorded in the database to determine the service authentication result of the user, the result determination module is used to:
[0040] Compare the credential code to be verified with the pre-stored credential code of the user recorded in the database to determine whether the credential code to be verified is consistent with the pre-stored credential code;
[0041] If they are consistent, determining whether the user is qualified to request the service;
[0042] If the user has the service request qualification, determining that the user has the request authority to request the industrial service providing platform to provide industrial parameter accounting services;
[0043] Otherwise, it is determined that the user does not have the authority to request the industrial service providing platform to provide the industrial parameter accounting service.
[0044] In a possible implementation manner, when the result determination module is used to determine whether the user has the service request qualification, the result determination module is used to:
[0045] Determine whether the current time is within the usage time limit of the user and / or whether the user has a number of requests.
[0046] In a possible implementation manner, the forwarding device further includes a purchase information forwarding module, and the purchase information forwarding module is used to:
[0047] In response to a service purchase operation, obtaining service purchase information provided by the user;
[0048] forwarding the service purchase information to the industrial service providing platform;
[0049] The service voucher code fed back by the industrial service providing platform to the user is forwarded to the user terminal used by the user, and the service voucher code is stored in the database as the user's pre-stored voucher code; wherein the service voucher code is obtained by encrypting the randomly generated initial voucher code.
[0050] In a possible implementation manner, the forwarding device further includes a failure prompt module, and the failure prompt module is used to:
[0051] If the service authentication result indicates that the user does not have the request authority to request the industrial service providing platform to provide industrial parameter accounting services, authentication failure information is fed back to the user terminal to prompt the user to re-provide the credential code to be verified.
[0052] In a possible implementation manner, when the result feedback module is used to forward the industrial parameter calculation result fed back by the industrial service providing platform to the user end, the result feedback module is used to:
[0053] Analyze the industrial parameter calculation results and determine a result feedback path for feeding back the industrial parameter calculation results;
[0054] According to the result feedback path, the industrial parameter calculation result is fed back to the user end.
[0055] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the service request forwarding method as described above are performed.
[0056] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for forwarding a service request as described above are executed.
[0057] The forwarding method, device, electronic device and readable storage medium of the service request provided in the embodiment of the present application obtain the service request credential sent by the user end; wherein the service request credential carries the industrial facility parameters required for the user to request the industrial service providing platform to provide the industrial parameter accounting service; the service request credential is parsed, and the to-be-verified credential code provided by the user is determined from the service request credential; the to-be-verified credential code is compared with the pre-stored credential code of the user recorded in the database to determine the service authentication result of the user; if the service authentication result indicates that the user has the request authority to request the industrial service providing platform to provide the industrial parameter accounting service, the service request credential is forwarded to the industrial service providing platform, so that the industrial service providing platform provides the industrial parameter accounting service to the user according to the industrial facility parameters; the industrial parameter accounting result fed back by the industrial service providing platform is forwarded to the user end. In this way, the service request credential proposed by the user can be forwarded through the gateway, avoiding directly exposing the platform information of the industrial service providing platform to the user, thereby ensuring the security of the industrial service providing platform side.
[0058] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0060] Figure 1 A flowchart of a method for forwarding a service request provided in an embodiment of the present application;
[0061] Figure 2 A schematic diagram of a service request process provided in an embodiment of the present application;
[0062] Figure 3 A schematic diagram of a service request interaction process provided in an embodiment of the present application;
[0063] Figure 4 One of the structural schematic diagrams of a device for forwarding a service request provided in an embodiment of the present application;
[0064] Figure 5 A second structural diagram of a device for forwarding a service request provided in an embodiment of the present application;
[0065] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.
[0067] Research has found that in the field of industrial production, there are many computing models used to calculate industrial parameters. In some specific cases, different computing models may be set up in different industrial service provision platforms; therefore, when users request services, they need to carry credentials and related parameters to request corresponding services by accessing different industrial service provision platforms.
[0068] In this case, the platform information of each industrial service provider platform (for example, the IP address and port number of the industrial service provider platform, etc.) will be exposed to users, resulting in a major security risk for the industrial service provider platform; and users need to log in to different industrial service providers to request services, which makes the process of user requesting services more complicated, the operation too cumbersome, and the service provision efficiency low.
[0069] Based on this, an embodiment of the present application provides a method for forwarding service requests, which can improve the security of the industrial service provider platform and reduce the probability of exposure of the platform information of the industrial service provider platform; at the same time, it can also simplify the request process for users to request services, reduce the tediousness of request operations, and improve the efficiency of service requests.
[0070] See also Figure 1 , Figure 1 A flow chart of a method for forwarding a service request provided in an embodiment of the present application. Applied to a gateway; Figure 1 As shown in , the method for forwarding a service request provided in an embodiment of the present application includes:
[0071] S101, obtaining a service request credential sent by a user.
[0072] S102: Parse the service request credential and determine the credential code to be verified provided by the user from the service request credential.
[0073] S103: Compare the credential code to be verified with the pre-stored credential code of the user recorded in a database to determine a service authentication result of the user.
[0074] S104: If the service authentication result indicates that the user has the request authority to request the industrial service providing platform to provide industrial parameter accounting services, forward the service request certificate to the industrial service providing platform.
[0075] S105: forwarding the industrial parameter calculation results fed back by the industrial service providing platform to the user end.
[0076] A method for forwarding a service request provided in an embodiment of the present application, when a user has an industrial parameter accounting demand, the user can send information such as industrial facility parameters and voucher codes to the gateway in the form of a service request voucher through the user end used by the user; the gateway side actively completes the verification of the voucher code by parsing the service request voucher, and forwards the service request voucher to the industrial service provider platform when the user passes the verification, so that the industrial service provider platform completes the industrial parameter accounting service requested by the user based on the industrial facility parameters in the service request voucher, and forwards the industrial parameter calculation results to the user end used by the user through the gateway again. In this way, it is possible to avoid directly exposing the platform information of the industrial service provider platform to the user, thereby improving the security of the industrial service provider platform.
[0077] When the user has the need for industrial parameter calculation, he fills in the industrial facility parameters required for industrial parameter calculation in the user terminal. The user terminal can automatically package the industrial facility parameters and the credential code representing the user's identity, generate a service request credential and send it to the gateway.
[0078] Here, the credential code representing the user's identity may be input by the user through the user terminal, or may be automatically obtained by the user terminal according to the account logged in by the user. It may be determined according to the actual situation and is not limited here.
[0079] In step S101, the gateway obtains the service request credential sent by the user through the user terminal; wherein the service request credential carries the industrial facility parameters required for the user to request the industrial service provision platform to provide industrial parameter accounting services and the credential code to be verified that represents the user's identity.
[0080] The service request voucher carries the industrial facility parameters required for the user to request the industrial service provision platform to provide industrial parameter accounting services.
[0081] For example, taking the industrial parameter calculation service requested by the user as "gear overlap calculation", at this time, the industrial facility parameters that the user needs to input include at least the pitch circle pressure angle, the gear tooth top height coefficient, the number of external gear teeth, and the number of internal gear teeth.
[0082] In step S102, after receiving the service request credential, the gateway needs to verify the user based on the service request credential to determine whether the user has the request authority to request the industrial service provider platform to provide industrial parameter accounting services; therefore, at this time, the gateway needs to parse the service request credential to extract the credential code to be verified required for verification from the service request credential.
[0083] Here, in order to ensure the security of the service request credential, the user end has encrypted the service request credential when transmitting it to the gateway. Therefore, when the gateway extracts the credential code to be verified, it also needs to decrypt the service request credential; wherein, the user end can use MD5 method for encryption.
[0084] In one implementation, step S102 includes:
[0085] S1021. Identify the service request credential, and determine request header data from the service request credential.
[0086] In this step, usually, the user end will write the credential information into the request header data of the service request credential. Therefore, in order to reduce the amount of data processing involved in the decryption process, it is necessary to identify the service request credential sent by the user end and extract the request header data carrying the credential code to be verified from the service request credential.
[0087] S1022: Decrypt the request header data to determine the credential code to be verified provided by the user.
[0088] In this step, the request header data encrypted by the user end is decrypted to determine the credential code to be verified provided by the user and carried in the request header data.
[0089] The credential code to be verified includes at least a key (secret) and an authorization code (authCode).
[0090] After the extraction of the credential code to be verified is completed, it is necessary to verify the user's requested permissions by comparing the credential code to be verified.
[0091] In step S103, the parsed credential code to be verified is compared with the pre-stored credential code of the user reserved in the database to determine the service authentication result of the user.
[0092] Here, users can obtain the request permission to request services from the industrial service provider platform by purchasing; at the time of purchase, there are restrictions on the number of services provided to users or the service duration. For example, the user only purchased 5 service requests. At this time, the industrial service provider platform only needs to provide the user with 5 industrial parameter accounting services; for another example, the user only purchased the request permission for 2021, then the industrial service provider platform only needs to provide the user with industrial parameter accounting services within 2021.
[0093] Therefore, when determining whether a user has request authority, it is necessary to further determine whether the user currently has request qualifications.
[0094] In one implementation, step S103 includes:
[0095] S1031. Compare the credential code to be verified with the pre-stored credential code of the user recorded in a database to determine whether the credential code to be verified is consistent with the pre-stored credential code.
[0096] S1032: If they are consistent, determine whether the user is qualified to request service.
[0097] In this step, if the credential code to be verified provided by the user this time is consistent with the pre-stored credential code reserved in the database, it is necessary to further determine whether the user is still qualified to request services from the industrial service provision platform at the current moment.
[0098] In one implementation, the determining whether the user is qualified to request a service includes: determining whether the current moment is within the usage time limit of the user and / or whether the user has a number of requests.
[0099] In this step, it is determined whether the current time is within the usage limit purchased by the user; for example, the usage limit purchased by the user is 2021. If the current time is June 17, 2021, it can be determined that the current time is within the usage limit purchased by the user, and the user is eligible to request service; if the current time is June 17, 2022, it can be determined that the current time is not within the usage limit purchased by the user, and the user is not eligible to request service.
[0100] And / or, whether the user still has any unused request times at the current moment; for example, the number of requests purchased by the user is 5, if the user has requested the provision of industrial parameter accounting services 5 times, then it can be determined that the user does not have any unused request times this time, and the user is not eligible to request services; if the user has requested the provision of industrial parameter accounting services 4 times, then it can be determined that the user has any unused request times this time, and the user is eligible to request services.
[0101] S1033: If the user has the service request qualification, determine that the user has the request authority to request the industrial service provision platform to provide industrial parameter accounting services.
[0102] In this step, if the user passes the verification of the credential code and request qualification, it can be determined that the user has the request authority to request the industrial service provider platform to provide industrial parameter accounting services. At this time, the industrial service provider platform can be notified to provide services to the user.
[0103] S1034. Otherwise, it is determined that the user does not have the authority to request the industrial service providing platform to provide industrial parameter accounting services.
[0104] Here, if it is determined that the user does not have the authority to request the industrial service provider platform to provide industrial parameter accounting services, there is no need to subsequently notify the industrial service provider platform to provide services to the user.
[0105] In step S104, if the user's service authentication result indicates that the user has the request authority to request the industrial service provider platform to provide industrial parameter accounting services, the service request certificate provided by the user through the user end is forwarded to the industrial service provider platform, so that the industrial service provider platform can provide the user with industrial parameter accounting services based on the industrial facility parameters carried in the service request certificate.
[0106] Here, if the service request proposed by the user requires multiple industrial service provision platforms to collaborate to complete, the gateway can also forward the industrial facility parameters carried in the service request certificate to different industrial service provision platforms respectively, so that each industrial service provision platform can complete the corresponding industrial parameter accounting service based on the received industrial facility parameters and feedback the corresponding industrial parameter calculation results.
[0107] In this way, even if the industrial parameter accounting service requested by the user needs to be provided by multiple industrial service provision platforms, the user can complete the request for multiple industrial parameter accounting services with only one operation, thereby further improving the user's service request efficiency.
[0108] In step S105, the industrial service provider platform determines the industrial parameter calculation result of the industrial parameter calculation service requested by the user based on the industrial facility parameters carried in the service request credential; the industrial parameter calculation result is fed back to the gateway, and the gateway then feeds back the industrial parameter calculation result to the user end, thereby avoiding direct access between the user end and the industrial service provider platform, and ensuring the security of the user end and the industrial service provider platform to the greatest extent.
[0109] Here, when the gateway feeds back the industrial parameter calculation results, it will parse the industrial service provider platform to obtain the result feedback path of the industrial service provider platform and realize the feedback of the industrial parameter calculation results.
[0110] In one implementation, step S105 includes:
[0111] S1051. Analyze the industrial parameter calculation results and determine a result feedback path for feeding back the industrial parameter calculation results.
[0112] In this step, the gateway analyzes the industrial parameter calculation result, determines the user who requests feedback of the industrial parameter calculation result, and then determines the result feedback path for feeding back the industrial parameter calculation result based on the reserved information of the user.
[0113] Here, the industrial parameter calculation results fed back by the industrial service provider platform are obtained through encryption. Therefore, the gateway will also perform corresponding decryption processing during the process of parsing the industrial parameter calculation results; among them, the encryption method adopted by the industrial service provider platform is the MD5 method.
[0114] S1052: Feedback the industrial parameter calculation result to the user end according to the result feedback path.
[0115] In this step, according to the determined result feedback path, the industrial parameter calculation result is fed back to the user terminal used by the user who requested the industrial parameter calculation result.
[0116] Here, if it is determined by verifying the credential code to be verified provided by the user that the user does not have the request authority to request the industrial service provider platform to provide industrial parameter accounting services, then the user has entered an incorrect credential code. At this time, in order to avoid the user being unable to obtain the corresponding industrial parameter accounting service due to input errors, the user can also be reminded that the input is incorrect and the user can be provided with the possibility of entering the credential code again.
[0117] In one embodiment, the forwarding method also includes: if the service authentication result indicates that the user does not have the request authority to request the industrial service provision platform to provide industrial parameter accounting services, feedback authentication failure information to the user end to prompt the user to re-provide the credential code to be verified.
[0118] In this step, if the service authentication result indicates that the user does not have the request authority to request the industrial service provider platform to provide industrial parameter accounting services, the authentication failure information will be fed back to the user end to which the user is adapted, so as to prompt the user through the authentication failure information that the credential code to be verified provided is incorrect and the credential code to be verified needs to be re-provided; at this time, the user can choose to re-enter the credential code to be verified and submit the service request credential through the user end again.
[0119] In one implementation, the forwarding method further includes:
[0120] Step a: In response to a service purchase operation, obtaining service purchase information provided by the user.
[0121] In this step, the user can initiate a service purchase operation through the user terminal, and the gateway can respond to the service purchase operation imposed by the user and obtain the service purchase information submitted by the user in the user terminal to assist the user in purchasing the service request authority.
[0122] Step b: forwarding the service purchase information to the industrial service providing platform.
[0123] In this step, the gateway still needs to forward the obtained service purchase information to the industrial service provider platform, so that the industrial service platform can grant the user corresponding service request authority based on the service purchase information.
[0124] Step c: forwarding the service voucher code fed back by the industrial service providing platform to the user terminal used by the user, and storing the service voucher code as the user's pre-stored voucher code in the database.
[0125] In this step, after receiving the service purchase information, the industrial service provider platform grants the user the corresponding service request authority and generates a service voucher code unique to the user, so that when the user requests a service, he or she can use the service voucher code as a basis to request the industrial service provider platform to provide industrial parameter accounting services.
[0126] At the same time, in order to enable the gateway to verify whether the user has the request authority when the user makes a service request, the service credential code is stored in the database as the user's pre-stored credential code.
[0127] Among them, the service credential code is obtained by encrypting the randomly generated initial credential code; specifically, the industrial service provision platform randomly generates the initial credential code by combining the character string and the number, and encrypts the initial credential code by MD5 to obtain a service credential code unique to the user; here, the generated service credential code can carry relevant information of the user to better verify whether the user has the request authority.
[0128] The service credential code includes at least a key (secret) and an authorization code (authCode).
[0129] See also Figure 2 , Figure 2 A schematic diagram of a service request process provided by an embodiment of the present application. Figure 2 As shown, step 201: start; step 202: the user initiates a service request by inputting industrial facility parameters through the user end; step 203: the gateway receives the service request certificate sent by the user end; step 204: the gateway verifies whether the user has the request authority to request the industrial service provider platform to provide industrial parameter accounting services; if so, execute step 205; if not, execute step 202; step 205: forward the service request certificate to the industrial service provider platform; step 206: the industrial service provider platform determines whether the industrial facility parameters carried in the service request certificate are correct; if so, execute step 207; if not, execute step 202; step 207: the gateway obtains the industrial parameter accounting results fed back by the industrial service provider platform; step 208: the industrial parameter calculation results are fed back to the user end; step 209: end.
[0130] See also Figure 3 , Figure 3 A schematic diagram of a service request interaction process provided by an embodiment of the present application. Figure 3 As shown, the user inputs the industrial facility parameters and the voucher code at the user end to generate a service request voucher; the user end sends the generated service request voucher to the gateway; the gateway parses the service request voucher sent by the user end; when it is verified that the user has the request authority, the service request voucher is sent to the industrial service provider platform; when it is verified that the user does not have the request authority, the authentication failure information is fed back to the user end; the industrial service provider platform generates the industrial parameter calculation results based on the service request voucher; the industrial parameter calculation results are fed back to the gateway; the gateway feeds back the industrial parameter calculation results to the user end.
[0131] The forwarding method of the service request provided in the embodiment of the present application obtains the service request credential sent by the user end; wherein the service request credential carries the industrial facility parameters required for the user to request the industrial service providing platform to provide the industrial parameter accounting service; the service request credential is parsed, and the to-be-verified credential code provided by the user is determined from the service request credential; the to-be-verified credential code is compared with the pre-stored credential code of the user recorded in the database to determine the service authentication result of the user; if the service authentication result indicates that the user has the request authority to request the industrial service providing platform to provide the industrial parameter accounting service, the service request credential is forwarded to the industrial service providing platform, so that the industrial service providing platform provides the industrial parameter accounting service to the user according to the industrial facility parameters; the industrial parameter accounting result fed back by the industrial service providing platform is forwarded to the user end. In this way, the service request credential proposed by the user can be forwarded through the gateway, avoiding directly exposing the platform information of the industrial service providing platform to the user, thereby ensuring the security of the industrial service providing platform.
[0132] See also Figure 4 , Figure 5 , Figure 4 This is one of the structural diagrams of a device for forwarding a service request provided in an embodiment of the present application. Figure 5 The second structural diagram of a service request forwarding device provided in an embodiment of the present application is applied to a gateway; Figure 4 As shown in , the forwarding device 400 includes:
[0133] The credential acquisition module 410 is used to acquire the service request credential sent by the user; wherein the service request credential carries the industrial facility parameters required by the user to request the industrial service provision platform to provide industrial parameter accounting services;
[0134] The credential parsing module 420 is used to parse the service request credential and determine the credential code to be verified provided by the user from the service request credential;
[0135] A result determination module 430 is used to compare the credential code to be verified with the pre-stored credential code of the user recorded in the database to determine the service authentication result of the user;
[0136] A request forwarding module 440 is used to forward the service request credential to the industrial service providing platform if the service authentication result indicates that the user has the request authority to request the industrial service providing platform to provide the industrial parameter accounting service, so that the industrial service providing platform provides the industrial parameter accounting service for the user according to the industrial facility parameters;
[0137] The result feedback module 450 is used to forward the industrial parameter calculation results fed back by the industrial service providing platform to the user end.
[0138] Further, when the credential parsing module 420 is used to parse the service request credential and determine the credential code to be verified provided by the user from the service request credential, the credential parsing module 420 is used to:
[0139] Identifying the service request credential and determining request header data from the service request credential;
[0140] The request header data is decrypted to determine the credential code to be verified provided by the user.
[0141] Further, when the result determination module 430 is used to compare the credential code to be verified with the pre-stored credential code of the user recorded in the database to determine the service authentication result of the user, the result determination module 430 is used to:
[0142] Compare the credential code to be verified with the pre-stored credential code of the user recorded in the database to determine whether the credential code to be verified is consistent with the pre-stored credential code;
[0143] If they are consistent, determining whether the user is qualified to request the service;
[0144] If the user has the service request qualification, determining that the user has the request authority to request the industrial service providing platform to provide industrial parameter accounting services;
[0145] Otherwise, it is determined that the user does not have the authority to request the industrial service providing platform to provide the industrial parameter accounting service.
[0146] Furthermore, when the result determination module 430 is used to determine whether the user is qualified to request a service, the result determination module 430 is used to:
[0147] Determine whether the current time is within the usage time limit of the user and / or whether the user has a number of requests.
[0148] Further, such as Figure 5 As shown, the forwarding device 400 further includes a purchase information forwarding module 460, and the purchase information forwarding module 460 is used to:
[0149] In response to a service purchase operation, obtaining service purchase information provided by the user;
[0150] forwarding the service purchase information to the industrial service providing platform;
[0151] The service voucher code fed back by the industrial service providing platform to the user is forwarded to the user terminal used by the user, and the service voucher code is stored in the database as the user's pre-stored voucher code; wherein the service voucher code is obtained by encrypting the randomly generated initial voucher code.
[0152] Further, such as Figure 5 As shown, the forwarding device 400 further includes a failure prompt module 470, and the failure prompt module 470 is used to:
[0153] If the service authentication result indicates that the user does not have the request authority to request the industrial service providing platform to provide industrial parameter accounting services, authentication failure information is fed back to the user terminal to prompt the user to re-provide the credential code to be verified.
[0154] Furthermore, when the result feedback module 450 is used to forward the industrial parameter calculation result fed back by the industrial service providing platform to the user end, the result feedback module 450 is used to:
[0155] Analyze the industrial parameter calculation results and determine a result feedback path for feeding back the industrial parameter calculation results;
[0156] According to the result feedback path, the industrial parameter calculation result is fed back to the user end.
[0157] The forwarding device for service request provided in the embodiment of the present application obtains the service request credential sent by the user end; wherein the service request credential carries the industrial facility parameters required for the user to request the industrial service providing platform to provide industrial parameter accounting services; the service request credential is parsed, and the to-be-verified credential code provided by the user is determined from the service request credential; the to-be-verified credential code is compared with the pre-stored credential code of the user recorded in the database to determine the service authentication result of the user; if the service authentication result indicates that the user has the request authority to request the industrial service providing platform to provide industrial parameter accounting services, the service request credential is forwarded to the industrial service providing platform, so that the industrial service providing platform provides the industrial parameter accounting services to the user according to the industrial facility parameters; the industrial parameter accounting results fed back by the industrial service providing platform are forwarded to the user end. In this way, the service request credential proposed by the user can be forwarded through the gateway, avoiding directly exposing the platform information of the industrial service providing platform to the user, thereby ensuring the security of the industrial service providing platform.
[0158] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown in , the electronic device 600 includes a processor 610 , a memory 620 and a bus 630 .
[0159] The memory 620 stores machine-readable instructions executable by the processor 610. When the electronic device 600 is running, the processor 610 communicates with the memory 620 via the bus 630. When the machine-readable instructions are executed by the processor 610, the above-mentioned Figure 1 The specific implementation of the steps of the service request forwarding method in the method embodiment shown can be found in the method embodiment, which will not be repeated here.
[0160] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 The specific implementation of the steps of the service request forwarding method in the method embodiment shown can be found in the method embodiment, which will not be repeated here.
[0161] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0162] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0163] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0164] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0165] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0166] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for forwarding a service request, characterized in that: Applied to a gateway; the forwarding method comprises: Obtaining a service request credential sent by a user; wherein the service request credential carries the industrial facility parameters required by the user to request the industrial service providing platform to provide industrial parameter accounting services; Parsing the service request credential, and determining the credential code to be verified provided by the user from the service request credential; Compare the credential code to be verified with the pre-stored credential code of the user recorded in the database to determine the service authentication result of the user; If the service authentication result indicates that the user has the request authority to request the industrial service providing platform to provide industrial parameter accounting services, forwarding the service request certificate to the industrial service providing platform so that the industrial service providing platform provides the industrial parameter accounting services to the user according to the industrial facility parameters; Forwarding the industrial parameter calculation results fed back by the industrial service providing platform to the user end; The parsing of the service request credential to determine the credential code to be verified provided by the user from the service request credential includes: Identifying the service request credential and determining request header data from the service request credential; Decrypting the request header data to determine the credential code to be verified provided by the user; The forwarding method further includes: In response to a service purchase operation, obtaining service purchase information provided by the user; forwarding the service purchase information to the industrial service providing platform; The service voucher code fed back by the industrial service providing platform to the user is forwarded to the user terminal used by the user, and the service voucher code is stored in the database as the user's pre-stored voucher code; wherein the service voucher code is obtained by encrypting the randomly generated initial voucher code.
2. The forwarding method according to claim 1, characterized in that: The step of comparing the credential code to be verified with the pre-stored credential code of the user recorded in a database to determine the service authentication result of the user includes: Compare the credential code to be verified with the pre-stored credential code of the user recorded in the database to determine whether the credential code to be verified is consistent with the pre-stored credential code; If they are consistent, determining whether the user is qualified to request the service; If the user has the service request qualification, determining that the user has the request authority to request the industrial service providing platform to provide industrial parameter accounting services; Otherwise, it is determined that the user does not have the request authority to request the industrial service providing platform to provide the industrial parameter accounting service.
3. The forwarding method according to claim 2, characterized in that: The determining whether the user is qualified to request a service comprises: Determine whether the current time is within the usage time limit of the user and / or whether the user has a number of requests.
4. The forwarding method according to claim 1, characterized in that: The forwarding method further includes: If the service authentication result indicates that the user does not have the request authority to request the industrial service providing platform to provide industrial parameter accounting services, authentication failure information is fed back to the user terminal to prompt the user to re-provide the credential code to be verified.
5. The forwarding method according to claim 1, characterized in that: The step of forwarding the industrial parameter calculation result fed back by the industrial service providing platform to the user terminal includes: Analyze the industrial parameter calculation results and determine a result feedback path for feeding back the industrial parameter calculation results; According to the result feedback path, the industrial parameter calculation result is fed back to the user end.
6. A device for forwarding a service request, characterized in that: Applied to a gateway; the forwarding device comprises: The credential acquisition module is used to acquire the service request credential sent by the user; wherein the service request credential carries the industrial facility parameters required by the user to request the industrial service provision platform to provide industrial parameter accounting services; A credential parsing module, used to parse the service request credential and determine the credential code to be verified provided by the user from the service request credential; A result determination module, used to compare the credential code to be verified with the pre-stored credential code of the user recorded in the database to determine the service authentication result of the user; A request forwarding module, configured to forward the service request credential to the industrial service providing platform if the service authentication result indicates that the user has the request authority to request the industrial service providing platform to provide industrial parameter accounting services, so that the industrial service providing platform provides the user with industrial parameter accounting services according to the industrial facility parameters; A result feedback module, used for forwarding the industrial parameter calculation results fed back by the industrial service providing platform to the user end; When the credential parsing module is used to parse the service request credential and determine the credential code to be verified provided by the user from the service request credential, the credential parsing module is used to: Identifying the service request credential and determining request header data from the service request credential; Decrypting the request header data to determine the credential code to be verified provided by the user; The forwarding device further includes a purchase information forwarding module, and the purchase information forwarding module is used to: In response to a service purchase operation, obtaining service purchase information provided by the user; forwarding the service purchase information to the industrial service providing platform; The service voucher code fed back by the industrial service providing platform to the user is forwarded to the user terminal used by the user, and the service voucher code is stored in the database as the user's pre-stored voucher code; wherein the service voucher code is obtained by encrypting the randomly generated initial voucher code.
7. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the service request forwarding method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for forwarding a service request as claimed in any one of claims 1 to 5 are executed.
