Message reminder method and related equipment
By monitoring whether the service interface in the microservice depends on public modules, and reminding relevant development users when the public module changes, the problem of service interface errors caused by public module changes is solved, and the efficiency of message reminder is improved.
Patent Information
- Application Number
- CN202011222192.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-05
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2040-11-05
AI Technical Summary
In the field of microservice technology, changes in public modules may cause service interfaces to run incorrectly or stop running. How to effectively remind users who maintain service interfaces to handle them accordingly.
By obtaining the service interface and its corresponding development users, we judge whether the service interface introduces public modules, associate the storage service interface, development users and public modules, monitor changes in public modules, and generate change information when the change occurs and reminds the development users.
It realizes timely reminding users when the service interface dependency changes are changed, avoiding errors in the service interface due to failure to process in time, and improving the efficiency of message reminding.
Smart Images

Figure CN112306716B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of microservice technology, and in particular to a message reminder method, device, computer equipment and computer-readable storage medium. Background Art
[0002] In the field of microservice technology, services can be split according to different business functions, and each service or module can be deployed and developed independently. Microservices can narrow the scope of business functions that developers focus on, such as each developer can focus on only one or two microservice modules.
[0003] Each microservice interface needs to rely on some common modules. When the common modules are modified, it may cause the operation errors or stop of each microservice. How to remind the users who maintain the service interface when the common modules that the service interface depends on are changed has become a problem to be solved. Summary of the invention
[0004] In view of the above, it is necessary to propose a message reminder method, apparatus, computer device and computer-readable storage medium, which can remind users when the service interface dependency changes.
[0005] A first aspect of the present application provides a message reminder method, the message reminder method comprising:
[0006] Obtain a service interface and a development user corresponding to the service interface;
[0007] A method for determining whether the service interface introduces a public module;
[0008] When the service interface introduces the method of the common module, determining that the service interface depends on the common module;
[0009] When the service interface depends on the common module, the service interface, the development user and the common module are stored in association;
[0010] Determining whether the common module has been modified;
[0011] When the common module is changed, generating change information according to the service interface and the common module;
[0012] The development user is notified of the change information.
[0013] In another possible implementation, the method for determining whether the service interface introduces a public module includes:
[0014] Obtaining a flow limiting table and a call request from a client to the service interface;
[0015] If the IP address of the client does not exist in the current limiting table, determine whether the service interface calls the class or method of the common module;
[0016] When the service interface calls the class or method of the common module, determining the method of introducing the common module into the service interface;
[0017] When the service interface does not call the class or method of the common module, it is determined that the service interface does not introduce the common module.
[0018] In another possible implementation, before the associative storage of the service interface, the development user, and the common module, the message reminder method further includes:
[0019] The public service interface composed of the classes and / or methods in the public module is stored in the registration center, and the service interface is stored in the registration center;
[0020] Testing the service interface by calling the public service interface;
[0021] When the test is successful, the service interface, the development user and the common module are stored in association in the registration center.
[0022] In another possible implementation, storing the public service interface composed of classes and / or methods in the public module in the registration center includes:
[0023] Determining the publishing status of the public service interface;
[0024] If the public service interface is determined to be in a pre-release state, the public service interface in the pre-release state is stored in the registration center.
[0025] In another possible implementation, determining the publishing status of the public service interface includes:
[0026] Acquire historical change information of the service interface and the public service interface, the historical change information including a first number of times the public service interface and the service interface are changed simultaneously and a second number of times the public service interface is changed;
[0027] calculating a target ratio of the first number of times to the second number of times;
[0028] When the target ratio is greater than a preset ratio, determining that the publishing state of the public service interface is a pre-publishing state;
[0029] When the target ratio is less than or equal to the preset ratio, it is determined that the publishing state of the public service interface is a non-publishing state.
[0030] In another possible implementation, the generating the change information according to the service interface and the common module includes:
[0031] Acquire the first identifier of the service interface, the second identifier of the common module, and the change content of the change module;
[0032] Determining a change time of the change module;
[0033] The first identifier, the second identifier, the change content, and the change time are combined into the change information.
[0034] In another possible implementation, the reminding the development user of the change information includes:
[0035] Pushing the change information into a message queue;
[0036] The information in the message queue is pushed to the development user via email, pop-up window or message reminder to remind the development user of the change information.
[0037] A second aspect of the present application provides a message reminder device, the message reminder device comprising:
[0038] An acquisition module, used to acquire a service interface and a development user corresponding to the service interface;
[0039] A first judgment module is used to judge whether the service interface introduces a method of a public module;
[0040] A determination module, used for determining that the service interface depends on the common module when the service interface introduces the method of the common module;
[0041] A storage module, used for associatively storing the service interface, the development user and the common module when the service interface depends on the common module;
[0042] A second judging module, used for judging whether the common module has been modified;
[0043] A generating module, configured to generate change information according to the service interface and the common module when the common module is changed;
[0044] A reminder module is used to remind the development user of the change information.
[0045] A third aspect of the present application provides a computer device, the computer device comprising a processor, the processor being configured to implement the message reminder method when executing computer-readable instructions stored in a memory.
[0046] A fourth aspect of the present application provides a computer-readable storage medium having computer-readable instructions stored thereon, and the computer-readable instructions implement the message reminder method when executed by a processor.
[0047] The present invention obtains a service interface and a development user corresponding to the service interface; determines whether the service interface introduces a method for a common module; when the service interface introduces the method for the common module, determines that the service interface depends on the common module; when the service interface depends on the common module, stores the service interface, the development user and the common module in association; determines whether the common module is changed; when the common module is changed, generates change information based on the service interface and the common module; and reminds the development user of the change information. The present invention reminds the user when the service interface dependency changes. Avoid checking changes when errors occur in the service interface, and improve the efficiency of message reminders. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a flow chart of a message reminder method provided by an embodiment of the present invention.
[0049] Figure 2 It is a structural diagram of a message reminder device provided by an embodiment of the present invention.
[0050] Figure 3 It is a schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0052] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. The described embodiments are only some embodiments of the present invention, rather than all embodiments.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0054] Preferably, the message reminder method of the present invention is applied in one or more computer devices. The computer device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc.
[0055] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0056] Embodiment 1
[0057] Figure 1 The flowchart of the message reminder method provided in the first embodiment of the present invention is shown in FIG. The message reminder method is applied to a computer device and is used to remind a user when a service interface dependency is changed.
[0058] like Figure 1 As shown, the message reminder method includes:
[0059] 101. Obtain a service interface and a development user corresponding to the service interface.
[0060] The service interface may be an interface in a microservice, and a development user corresponding to the service interface is responsible for maintaining the service interface.
[0061] The service interface can be obtained from the microservice running on the server. The microservice running on the server can be in a test environment or a production environment. When the microservice running on the server is in a test environment, the function of the microservice can be tested by running the microservice on the server. When the microservice running on the server is in a production environment, the function of the microservice can be implemented by running the microservice on the server.
[0062] The server can be connected to multiple clients for communication. The development user can modify the interface or module in a corresponding client of the multiple clients, and upload the modified interface or module to the server. The server can receive the modified interface or module uploaded by the client, and determine whether to update the modified interface or module uploaded by the client to the server.
[0063] 102, determining whether the service interface introduces a method of a public module.
[0064] In a specific embodiment, the method for determining whether the service interface introduces a public module includes:
[0065] Obtaining a flow limiting table and a call request from a client to the service interface;
[0066] If the IP address of the client does not exist in the current limiting table, determine whether the service interface calls the class or method of the common module;
[0067] When the service interface calls the class or method of the common module, determining the method of introducing the common module into the service interface;
[0068] When the service interface does not call the class or method of the common module, it is determined that the service interface does not introduce the common module.
[0069] The service interface calls the class and / or method of the common module, and / or the class and / or method of the common module. Specifically, the class name of the class of the common module and the method name of the common module can be obtained from the local database; when the calling object corresponding to the calling keyword in the service interface includes the class name or the method name, or the calling object corresponding to the reference keyword in the service interface includes the class name or the method name, it is determined that the service interface introduces the class and method of the common module.
[0070] The service interface does not call the class or method of the common module. Specifically, it is determined whether the calling object corresponding to the calling keyword in the service interface includes the class name or the method name; when the calling object corresponding to the calling keyword in the service interface does not include the class name and the method name, it is determined that the service interface does not call the class or method of the common module.
[0071] 103. When the service interface introduces the method of the common module, determine that the service interface depends on the common module.
[0072] When the service interface calls or introduces the classes and methods of the common module, it can be determined that the service interface depends on the common module; when the service interface does not call the classes and methods of the common module and does not introduce the classes and methods of the common module, it can be determined that the service interface depends on the common module.
[0073] 104. When the service interface depends on the common module, the service interface, the development user and the common module are stored in association with each other.
[0074] When the service interface depends on the common package of the public module, the service interface can be registered and stored in the registration center.
[0075] In another embodiment, before the associative storage of the service interface, the development user and the common module, the message reminder method further comprises:
[0076] The public service interface composed of the classes and / or methods in the public module is stored in the registration center, and the service interface is stored in the registration center;
[0077] Testing the service interface by calling the public service interface;
[0078] When the test is successful, the service interface, the development user and the common module are stored in association in the registration center.
[0079] The registration center may store published service interfaces and pre-published service interfaces. When the service interface does not depend on the common module, the public service interface of the common module may not be stored in the registration center.
[0080] When the test is successful, it indicates that there are no errors in the service interface and the dependency relationship between the service interface and the public module; the service interface, the development user and the public module may be associated and stored in the form of a list.
[0081] In a specific embodiment, storing the public service interface composed of the classes and / or methods in the public module to the registration center includes:
[0082] Determining the publishing status of the public service interface;
[0083] If the public service interface is determined to be in a pre-release state, the public service interface in the pre-release state is stored in the registration center.
[0084] In a specific embodiment, determining the publishing status of the public service interface includes:
[0085] Acquire historical change information of the service interface and the public service interface, the historical change information including a first number of times the public service interface and the service interface are changed simultaneously and a second number of times the public service interface is changed;
[0086] calculating a target ratio of the first number of times to the second number of times;
[0087] When the target ratio is greater than a preset ratio, determining that the publishing state of the public service interface is a pre-publishing state;
[0088] When the target ratio is less than or equal to the preset ratio, it is determined that the publishing state of the public service interface is a non-publishing state.
[0089] For example, the first number of times the public service interface and the service interface are changed at the same time is 6, the second number of times the public service interface is changed is 10, and the preset ratio is 1 / 2; the target ratio of the first number to the second number is 3 / 5; the target ratio is greater than the preset ratio, and the release status of the public service interface is determined to be a pre-release status.
[0090] When the next test fails or when the common module is changed, the service interface that depends on the common module and the development user corresponding to the service interface that depends on the common module can be queried through the list.
[0091] In another embodiment, when the test of calling the public service interface on the service interface fails, the message reminder method further includes:
[0092] Acquire test information of a previous successful test of calling the public service interface on the service interface from a preset log library;
[0093] Querying version information of the public service interface from the test information;
[0094] The version information of the service interface, the common module and the public service interface is pushed to a preset test user, so as to return the version information of the normally operating public service interface to the preset test user.
[0095] When the test fails, the first test information can be obtained, and the second test information of the previous successful test of the service interface can be obtained from the preset log library; the service interface, the common module and the test information are pushed to the preset test user or the development user, so that the preset test user or the development user can compare the dependency class in the first test information with the dependency class in the second test information to determine the test error.
[0096] The test information includes class information, the user who submitted the service interface, and the like.
[0097] It should be emphasized that in order to further ensure the privacy and security of the service interface, the development user and the public module, the service interface, the development user and the public module can also be associated and stored in a node of a blockchain.
[0098] 105. Determine whether the common module is modified.
[0099] In a specific embodiment, determining whether the common module is modified includes:
[0100] Receiving a submission request for the common module;
[0101] When the type of the submission request is a modification request, a deletion request, or a move request, it is determined that the common module is changed.
[0102] Specifically, a submission request for the common module from the development user through a corresponding client may be received; the submission request includes modifying, deleting, moving, querying, etc., the class or method in the common module.
[0103] When the type of the submission request is a modification request, a deletion request or a move request, it is determined that the common module is changed. After the common module is changed, an error may occur in calling the service interface.
[0104] In another embodiment, determining whether the common module is modified includes:
[0105] The public service interface is called through the service interface, and when the calling of the public service interface through the service interface fails, it is determined that the common module is changed.
[0106] 106. When the common module is changed, generate change information according to the service interface and the common module.
[0107] In a specific embodiment, generating the change information according to the service interface and the common module includes:
[0108] Acquire the first identifier of the service interface, the second identifier of the common module, and the change content of the change module;
[0109] Determining a change time of the change module;
[0110] The first identifier, the second identifier, the change content, and the change time are combined into the change information.
[0111] The second identifier includes version information, class identification information, and method identification information of the common module.
[0112] The change information can facilitate the development user to modify the service interface accordingly according to the change of the common module.
[0113] 107, reminding the development user of the change information.
[0114] In a specific embodiment, the reminding the development user of the change information includes:
[0115] Pushing the change information into a message queue;
[0116] The information in the message queue is pushed to the development user via email, pop-up window or message reminder to remind the development user of the change information.
[0117] Specifically, the development user may be notified of the change information through the publish / subscribe function of Redis.
[0118] Redis can push messages to all clients that subscribe to the message.
[0119] The change information can be generated in real time according to the service interface and the common module, and the development user can be notified of the latest generated change information.
[0120] The message reminder method of the first embodiment obtains a service interface and a development user corresponding to the service interface; determines whether the service interface introduces a method for a common module; when the service interface introduces a method for the common module, determines that the service interface depends on the common module; when the service interface depends on the common module, stores the service interface, the development user and the common module in an associated manner; determines whether the common module has been changed; when the common module has been changed, generates change information based on the service interface and the common module; and reminds the development user of the change information. The first embodiment reminds the user when the service interface dependency changes. Avoid checking changes when errors occur in the service interface, and improve the efficiency of message reminders.
[0121] Embodiment 2
[0122] Figure 2 1 is a structural diagram of a message reminder device provided in Embodiment 2 of the present invention. The message reminder device 20 is applied to a computer device. The message reminder device 20 is used to remind a user to respond to the change when a service interface dependency is changed.
[0123] like Figure 2 As shown, the message reminder device 20 may include an acquisition module 201 , a first judgment module 202 , a determination module 203 , a storage module 204 , a second judgment module 205 , a generation module 206 , and a reminder module 207 .
[0124] The acquisition module 201 is used to acquire the service interface and the development user corresponding to the service interface.
[0125] The service interface may be an interface in a microservice, and a development user corresponding to the service interface is responsible for maintaining the service interface.
[0126] The service interface can be obtained from the microservice running on the server. The microservice running on the server can be in a test environment or a production environment. When the microservice running on the server is in a test environment, the function of the microservice can be tested by running the microservice on the server. When the microservice running on the server is in a production environment, the function of the microservice can be implemented by running the microservice on the server.
[0127] The server can be connected to multiple clients for communication. The development user can modify the interface or module in a corresponding client of the multiple clients, and upload the modified interface or module to the server. The server can receive the modified interface or module uploaded by the client, and determine whether to update the modified interface or module uploaded by the client to the server.
[0128] The first judgment module 202 is used to judge whether the service interface introduces a method of a public module.
[0129] In a specific embodiment, the method for determining whether the service interface introduces a public module includes:
[0130] Obtaining a flow limiting table and a call request from a client to the service interface;
[0131] If the IP address of the client does not exist in the current limiting table, determine whether the service interface calls the class or method of the common module;
[0132] When the service interface calls the class or method of the common module, determining the method of introducing the common module into the service interface;
[0133] When the service interface does not call the class or method of the common module, it is determined that the service interface does not introduce the common module.
[0134] The service interface calls the class and / or method of the common module, and / or the class and / or method of the common module. Specifically, the class name of the class of the common module and the method name of the common module can be obtained from the local database; when the calling object corresponding to the calling keyword in the service interface includes the class name or the method name, or the calling object corresponding to the reference keyword in the service interface includes the class name or the method name, it is determined that the service interface introduces the class and method of the common module.
[0135] The service interface does not call the class or method of the common module. Specifically, it is determined whether the calling object corresponding to the calling keyword in the service interface includes the class name or the method name; when the calling object corresponding to the calling keyword in the service interface does not include the class name and the method name, it is determined that the service interface does not call the class or method of the common module.
[0136] The determination module 203 is used to determine that the service interface depends on the common module when the service interface introduces the method of the common module.
[0137] When the service interface calls or introduces the classes and methods of the common module, it can be determined that the service interface depends on the common module; when the service interface does not call the classes and methods of the common module and does not introduce the classes and methods of the common module, it can be determined that the service interface depends on the common module.
[0138] The storage module 204 is used to associate and store the service interface, the development user and the public module when the service interface depends on the public module.
[0139] When the service interface depends on the common package of the public module, the service interface can be registered and stored in the registration center.
[0140] In another embodiment, before the associative storage of the service interface, the development user and the common module, the message reminder method further comprises:
[0141] The public service interface composed of the classes and / or methods in the public module is stored in the registration center, and the service interface is stored in the registration center;
[0142] Testing the service interface by calling the public service interface;
[0143] When the test is successful, the service interface, the development user and the common module are stored in association in the registration center.
[0144] The registration center may store published service interfaces and pre-published service interfaces. When the service interface does not depend on the common module, the public service interface of the common module may not be stored in the registration center.
[0145] When the test is successful, it indicates that there are no errors in the service interface and the dependency relationship between the service interface and the public module; the service interface, the development user and the public module may be associated and stored in the form of a list.
[0146] In a specific embodiment, storing the public service interface composed of the classes and / or methods in the public module to the registration center includes:
[0147] Determining the publishing status of the public service interface;
[0148] If the public service interface is determined to be in a pre-release state, the public service interface in the pre-release state is stored in the registration center.
[0149] In a specific embodiment, determining the publishing status of the public service interface includes:
[0150] Acquire historical change information of the service interface and the public service interface, the historical change information including a first number of times the public service interface and the service interface are changed simultaneously and a second number of times the public service interface is changed;
[0151] calculating a target ratio of the first number of times to the second number of times;
[0152] When the target ratio is greater than a preset ratio, determining that the publishing state of the public service interface is a pre-publishing state;
[0153] When the target ratio is less than or equal to the preset ratio, it is determined that the publishing state of the public service interface is a non-publishing state.
[0154] For example, the first number of times the public service interface and the service interface are changed at the same time is 6, the second number of times the public service interface is changed is 10, and the preset ratio is 1 / 2; the target ratio of the first number to the second number is 3 / 5; the target ratio is greater than the preset ratio, and the release status of the public service interface is determined to be a pre-release status.
[0155] When the next test fails or when the common module is changed, the service interface that depends on the common module and the development user corresponding to the service interface that depends on the common module can be queried through the list.
[0156] In another embodiment, when the test of calling the public service interface on the service interface fails, the message reminder method further includes:
[0157] Acquire test information of a previous successful test of calling the public service interface on the service interface from a preset log library;
[0158] Querying version information of the public service interface from the test information;
[0159] The version information of the service interface, the common module and the public service interface is pushed to a preset test user, so as to return the version information of the normally operating public service interface to the preset test user.
[0160] When the test fails, the first test information can be obtained, and the second test information of the previous successful test of the service interface can be obtained from the preset log library; the service interface, the common module and the test information are pushed to the preset test user or the development user, so that the preset test user or the development user can compare the dependency class in the first test information with the dependency class in the second test information to determine the test error.
[0161] The test information includes class information, the user who submitted the service interface, and the like.
[0162] It should be emphasized that in order to further ensure the privacy and security of the service interface, the development user and the public module, the service interface, the development user and the public module can also be associated and stored in a node of a blockchain.
[0163] The second judging module 205 is used to judge whether the common module has been modified.
[0164] In a specific embodiment, determining whether the common module is modified includes:
[0165] Receiving a submission request for the common module;
[0166] When the type of the submission request is a modification request, a deletion request, or a move request, it is determined that the common module is changed.
[0167] Specifically, a submission request for the common module from the development user through a corresponding client may be received; the submission request includes modifying, deleting, moving, querying, etc., the class or method in the common module.
[0168] When the type of the submission request is a modification request, a deletion request or a move request, it is determined that the common module is changed. After the common module is changed, an error may occur in calling the service interface.
[0169] In another embodiment, determining whether the common module is modified includes:
[0170] The public service interface is called through the service interface, and when the calling of the public service interface through the service interface fails, it is determined that the common module is changed.
[0171] The generating module 206 is used to generate the change information according to the service interface and the common module when the common module is changed.
[0172] In a specific embodiment, generating the change information according to the service interface and the common module includes:
[0173] Acquire the first identifier of the service interface, the second identifier of the common module, and the change content of the change module;
[0174] Determining a change time of the change module;
[0175] The first identifier, the second identifier, the change content, and the change time are combined into the change information.
[0176] The second identifier includes version information, class identification information, and method identification information of the common module.
[0177] The change information can facilitate the development user to modify the service interface accordingly according to the change of the common module.
[0178] The reminder module 207 is used to remind the development user of the change information.
[0179] In a specific embodiment, the reminding the development user of the change information includes:
[0180] Pushing the change information into a message queue;
[0181] The information in the message queue is pushed to the development user via email, pop-up window or message reminder to remind the development user of the change information.
[0182] Specifically, the development user may be notified of the change information through the publish / subscribe function of Redis.
[0183] Redis can push messages to all clients that subscribe to the message.
[0184] The change information can be generated in real time according to the service interface and the common module, and the development user can be reminded of the latest generated change information.
[0185] The message reminder device 20 of the second embodiment stores the service interface, the development user and the common module in association when the service interface depends on the common module; determines whether the common module has been changed; when the common module has been changed, generates change information based on the service interface and the common module; and reminds the development user of the change information. The second embodiment reminds the user to respond to the change when the service interface dependency changes. Avoid checking the change when an error occurs in the service interface, and improve the efficiency of message reminders.
[0186] Embodiment 3
[0187] This embodiment provides a computer-readable storage medium, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the steps in the above-mentioned message reminder method embodiment are implemented, such as Figure 1 Steps 101-107 shown:
[0188] 101, obtaining a service interface and a development user corresponding to the service interface;
[0189] 102, a method for determining whether the service interface introduces a public module;
[0190] 103, when the service interface introduces the method of the common module, determining that the service interface depends on the common module;
[0191] 104, when the service interface depends on the common module, the service interface, the development user and the common module are stored in association;
[0192] 105, determining whether the common module has been modified;
[0193] 106, when the common module is changed, generating change information according to the service interface and the common module;
[0194] 107, reminding the development user of the change information.
[0195] Alternatively, when the computer-readable instructions are executed by the processor, the functions of each module in the above-mentioned device embodiment are realized, for example Figure 2 Modules 201-207:
[0196] An acquisition module 201 is used to acquire a service interface and a development user corresponding to the service interface;
[0197] The first judgment module 202 is used to judge whether the service interface introduces a method of a public module;
[0198] A determination module 203, configured to determine that the service interface depends on the common module when the service interface introduces the method of the common module;
[0199] A storage module 204, used for associating and storing the service interface, the development user and the public module when the service interface depends on the public module;
[0200] The second judging module 205 is used to judge whether the common module has been modified;
[0201] A generating module 206, configured to generate change information according to the service interface and the common module when the common module is changed;
[0202] The reminder module 207 is used to remind the development user of the change information.
[0203] Embodiment 4
[0204] Figure 3 Schematic diagram of a computer device provided in Embodiment 3 of the present invention. The computer device 30 includes a memory 301, a processor 302, and computer-readable instructions stored in the memory 301 and executable on the processor 302, such as a message reminder program. When the processor 302 executes the computer-readable instructions, the steps in the above-mentioned message reminder method embodiment are implemented, such as Figure 1 101-107 shown:
[0205] 101, obtaining a service interface and a development user corresponding to the service interface;
[0206] 102, a method for determining whether the service interface introduces a public module;
[0207] 103, when the service interface introduces the method of the common module, determining that the service interface depends on the common module;
[0208] 104, when the service interface depends on the common module, the service interface, the development user and the common module are stored in association;
[0209] 105, determining whether the common module has been modified;
[0210] 106, when the common module is changed, generating change information according to the service interface and the common module;
[0211] 107, reminding the development user of the change information.
[0212] Alternatively, when the computer-readable instructions are executed by the processor, the functions of each module in the above-mentioned device embodiment are realized, for example Figure 2 Modules 201-207:
[0213] An acquisition module 201 is used to acquire a service interface and a development user corresponding to the service interface;
[0214] The first judgment module 202 is used to judge whether the service interface introduces a method of a public module;
[0215] A determination module 203, configured to determine that the service interface depends on the common module when the service interface introduces the method of the common module;
[0216] A storage module 204, used for associating and storing the service interface, the development user and the public module when the service interface depends on the public module;
[0217] The second judging module 205 is used to judge whether the common module has been modified;
[0218] A generating module 206, configured to generate change information according to the service interface and the common module when the common module is changed;
[0219] The reminder module 207 is used to remind the development user of the change information.
[0220] Exemplarily, the computer-readable instructions may be divided into one or more modules, which are stored in the memory 301 and executed by the processor 302 to complete the method. The one or more modules may be a series of computer-readable instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer-readable instructions in the computer device 30. For example, the computer-readable instructions may be divided into Figure 2 The acquisition module 201, the first judgment module 202, the determination module 203, the storage module 204, the second judgment module 205, the generation module 206, and the reminder module 207 in the embodiment, the specific functions of each module refer to the second embodiment.
[0221] Those skilled in the art will understand that the Figure 3 It is only an example of the computer device 30 and does not constitute a limitation of the computer device 30. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device 30 may also include input and output devices, network access devices, buses, etc.
[0222] The processor 302 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor 302 may also be any conventional processor, etc. The processor 302 is the control center of the computer device 30, and uses various interfaces and lines to connect various parts of the entire computer device 30.
[0223] The memory 301 can be used to store the computer-readable instructions, and the processor 302 implements various functions of the computer device 30 by running or executing the computer-readable instructions or modules stored in the memory 301, and calling the data stored in the memory 301. The memory 301 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the computer device 30, etc. In addition, the memory 301 can include a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM) or other non-volatile / volatile storage devices.
[0224] If the module integrated in the computer device 30 is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and the computer-readable instructions can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer-readable instructions include computer-readable instruction codes, and the computer-readable instruction codes can be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device that can carry the computer-readable instruction code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), etc.
[0225] Furthermore, the computer-usable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0226] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0227] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0228] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0229] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0230] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute some steps of the message reminder method described in each embodiment of the present invention.
[0231] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any accompanying figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other modules or steps, and the singular does not exclude the plural. Multiple modules or devices stated in the system claim can also be implemented by one module or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0232] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A message reminder method, characterized in that: The message reminder method comprises: Obtain a service interface and a development user corresponding to the service interface; A method for determining whether the service interface introduces a public module; When the service interface introduces the method of the common module, determining that the service interface depends on the common module; When the service interface depends on the common module, the service interface, the development user and the common module are stored in association; Determining whether the common module has been modified; When the common module is changed, generating change information according to the service interface and the common module; Notifying the development user of the change information; Before the associative storage of the service interface, the development user and the common module, the message reminder method further includes: The public service interface composed of the classes and / or methods in the common module is stored in the registration center, and the service interface is stored in the registration center, wherein the storing of the public service interface composed of the classes and / or methods in the common module in the registration center includes: determining the publishing status of the public service interface; if the public service interface is determined to be in a pre-publishing status, storing the public service interface in the pre-publishing status in the registration center, wherein the determining of the publishing status of the public service interface includes: obtaining historical change information of the service interface and the public service interface, the historical change information includes the first number of times the public service interface and the service interface are changed at the same time, and the second number of times the public service interface is changed; calculating the target ratio of the first number to the second number; when the target ratio is greater than the preset ratio, determining that the publishing status of the public service interface is the pre-publishing status; when the target ratio is less than or equal to the preset ratio, determining that the publishing status of the public service interface is the non-publishing status; Testing the service interface by calling the public service interface; When the test is successful, the service interface, the development user and the common module are stored in association in the registration center.
2. The message reminder method according to claim 1, characterized in that: The method for determining whether the service interface introduces a public module comprises: Obtaining a flow limiting table and a call request from a client to the service interface; If the IP address of the client does not exist in the current limiting table, determine whether the service interface calls the class or method of the common module; When the service interface calls the class or method of the common module, determining the method of introducing the common module into the service interface; When the service interface does not call the class or method of the common module, it is determined that the service interface does not introduce the common module.
3. The message reminder method according to claim 1, characterized in that: Generating the change information according to the service interface and the common module comprises: Acquire the first identifier of the service interface, the second identifier of the common module, and the change content of the change module; Determining a change time of the change module; The first identifier, the second identifier, the change content, and the change time are combined into the change information.
4. The message reminder method according to claim 1, characterized in that: The reminding the development user of the change information includes: Pushing the change information into a message queue; The information in the message queue is pushed to the development user via email or message reminder to remind the development user of the change information.
5. A message reminder device, characterized in that: The message reminder device comprises: An acquisition module, used to acquire a service interface and a development user corresponding to the service interface; A first judgment module is used to judge whether the service interface introduces a method of a public module; A determination module, used for determining that the service interface depends on the common module when the service interface introduces the method of the common module; A storage module, used for associatively storing the service interface, the development user and the common module when the service interface depends on the common module; A second judging module, used for judging whether the common module has been modified; A generating module, configured to generate change information according to the service interface and the common module when the common module is changed; A reminder module, used to remind the development user of the change information; Before the service interface, the development user and the common module are stored in association, the message reminder device further includes: The storage module is also used to store the public service interface composed of the classes and / or methods in the public module to the registration center, and store the service interface to the registration center, wherein the storing of the public service interface composed of the classes and / or methods in the public module to the registration center includes: determining the release status of the public service interface; if the public service interface is determined to be in a pre-release state, storing the public service interface in the pre-release state to the registration center, wherein the determining the release status of the public service interface includes: obtaining historical change information of the service interface and the public service interface, the historical change information includes the first number of times the public service interface and the service interface are changed at the same time, and the second number of times the public service interface is changed; calculating the target ratio of the first number to the second number; when the target ratio is greater than the preset ratio, determining that the release status of the public service interface is the pre-release state; when the target ratio is less than or equal to the preset ratio, determining that the release status of the public service interface is the non-release state; The storage module is further used to test the service interface by calling the public service interface; The storage module is also used to associate and store the service interface, the development user and the common module in the registration center when the test is successful.
6. A computer device, characterized in that: The computer device comprises a processor, and the processor is used to execute computer-readable instructions stored in a memory to implement the message reminder method according to any one of claims 1 to 4.
7. A computer-readable storage medium having computer-readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the message reminder method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Micro-service starting method and device, computer equipment and storage medium
CN109683988A
Event reminder method, apparatus, computer device, and storage medium
WO2019174129A1