Information dynamic updating method, device, computer equipment and storage medium
By using the second database in the smart terminal for data comparison and reply, the problem of inconvenient information updating on the smart terminal is solved, rapid response and immediate effect of data modifications are achieved, the development process is simplified and resources are saved.
Patent Information
- Application Number
- CN201910441326.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-24
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2039-05-24
AI Technical Summary
When existing smart terminals provide automatic services, it is inconvenient to update information, requiring re-release and deployment, resulting in a long and time-consuming update cycle, and it is difficult to achieve rapid response and dynamic modification of data with existing technology.
The second database is used as a temporary database for data comparison and reply, allowing data to be edited and modified in a non-publishing state. The data modification will take effect immediately. It combines identity permissions and priority judgment to generate dynamic reply data.
It achieves rapid response and immediate effect of data modification, simplifies the application development process, and saves update time and labor costs.
Smart Images

Figure CN110321462B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application technology, and in particular to a method, device, computer equipment and storage medium for dynamically updating information. Background Art
[0002] With the development of computer technology, smart terminals can assist people in providing a variety of services, such as automatic text or voice replies, automatic handling of designated services, etc. Smart terminals have become an indispensable tool for people's work and life.
[0003] However, when the smart terminal provides automatic services, the information displayed through the front end is all set by the back end, and in the prior art, the information prompted by the back end to the front end is bound to the back end configuration file. If it needs to be changed, the version must be re-released and the file must be redeployed before it can take effect. It is inconvenient to update and requires regular maintenance, which is time-consuming and labor-intensive. In addition, the release of a new version has a long effective period and a long delay time, which is not convenient enough. Summary of the invention
[0004] The purpose of the present invention is to solve at least one of the above-mentioned technical defects and disclose a method, device, computer equipment and storage medium for dynamic information update, which can quickly respond to and realize data modification.
[0005] In order to achieve the above object, the present invention discloses a method for dynamically updating information, comprising:
[0006] Acquire first reply data extracted from the first database according to the request information sent by the client, wherein the first reply data includes a first code field and a first information body;
[0007] Matching the first reply data in a second database to determine whether there is a second code field in the second database that is identical to the first code field, wherein the second database is an editable database in a non-published state, and the second database is a database after the first database is modified based on the most recent published state;
[0008] When the match succeeds, obtaining the second information body mapped by the second code field from the second database;
[0009] The first information body is replaced by the second information body to generate second reply data, and the second reply data is returned to the client.
[0010] Optionally, the editable types of the second database in a non-published state include one or more of deleting the second code field and / or the second information body, adding the second code field and / or the second information body, and modifying the second code field and / or the second information body.
[0011] Optionally, in an initial state, the data in the second database is consistent with the data in the first database, wherein the initial state is the state of the first database when data was last published.
[0012] Optionally, the second database is a temporary storage database and is provided with a temporary storage period. When the modified data in the second database reaches the temporary storage period, it is restored to an initial state.
[0013] Optionally, the request information includes identity information of the client, and before matching the first reply data in the second database, the step further includes:
[0014] The right to obtain said identity information;
[0015] When the authority of the identity information meets the preset condition, the first reply data is matched in the second database.
[0016] Optionally, before replacing the first information body with the second information body to generate the second reply data, the method further includes:
[0017] Identifying a priority level of the first information subject and the second information subject, wherein the priority level is preset or automatically set according to configuration information mapped to the identity information;
[0018] When the priority level of the second information body is equal to or higher than that of the first information body, the first information body is replaced by the second information body to generate second reply data.
[0019] Optionally, when the first reply data fails to match in the second database and / or the priority level of the first information body is higher than that of the first information body, the first reply data is sent to the client.
[0020] On the other hand, the present application also discloses an information dynamic updating device, comprising:
[0021] A first acquisition module: configured to execute acquisition of first reply data extracted from a first database according to request information sent by a client, wherein the first reply data includes a first code field and a first information body;
[0022] The processing module is configured to match the first reply data in a second database to determine whether there is a second code field in the second database that is the same as the first code field, wherein the second database is an editable database in a non-published state, and the second database is a database after the first database is modified based on the most recent published state;
[0023] A second acquisition module: configured to acquire, when the match succeeds, the second information body mapped by the second code field from the second database;
[0024] An execution module is configured to replace the first information body with the second information body to generate second reply data, and return the second reply data to the client.
[0025] Optionally, the editable types of the second database in a non-published state include one or more of deleting the second code field and / or the second information body, adding the second code field and / or the second information body, and modifying the second code field and / or the second information body.
[0026] Optionally, in an initial state, the data in the second database is consistent with the data in the first database, wherein the initial state is the state of the first database when data was last published.
[0027] Optionally, the second database is a temporary storage database and is provided with a temporary storage period. When the modified data in the second database reaches the temporary storage period, it is restored to an initial state.
[0028] Optionally, the request information includes identity information of the client, and the information dynamic updating device further includes:
[0029] Identity authority acquisition module: configured to execute the authority to obtain the identity information;
[0030] Matching module: configured to execute matching of the first reply data in the second database when the authority of the identity information meets the preset conditions.
[0031] Optionally, the information dynamic updating device further includes:
[0032] Identification module: configured to perform: identifying the priority levels of the first information subject and the second information subject, wherein the priority levels are set in advance or automatically according to the configuration information mapped by the identity information; when the priority level of the second information subject is equal to or higher than that of the first information subject, replacing the first information subject with the second information subject to generate second reply data.
[0033] Optionally, when the first reply data fails to match in the second database and / or the priority level of the first information body is higher than that of the first information body, the first reply data is sent to the client.
[0034] On the other hand, the present application also discloses a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the information dynamic update method as described in any one of the above items.
[0035] On the other hand, the present application also discloses a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of any one of the above-mentioned methods for dynamically updating information.
[0036] The beneficial effects of the present invention are:
[0037] The present application discloses a method and device for dynamically updating information, which adopts a second database as a temporary database for dynamic modification, and uses the second database in combination with the first database. The second database is authorized to perform data comparison and data reply, so that the modified data can be obtained without being published, and the data can be modified at any time. The data modification takes effect immediately, so as to achieve the purpose of rapid response and data modification. At the same time, it makes the development process of the application more streamlined, saves the update time of the application, and saves labor costs.
[0038] Additional aspects and advantages of the present invention will be given in part in the following description, which will become obvious from the following description, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0040] Figure 1 This is a flow chart of the information dynamic updating method of the present invention;
[0041] Figure 2 This is a flow chart of the second database identity authority determination of the present invention;
[0042] Figure 3 This is a flow chart of the information subject priority level determination method of the present invention;
[0043] Figure 4 This is a block diagram of the information dynamic updating device of the present invention;
[0044] Figure 5 It is a basic structural block diagram of the computer device of the present invention. DETAILED DESCRIPTION
[0045] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0046] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0047] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.
[0048] It will be understood by those skilled in the art that the "terminal" and "terminal device" used herein include both devices with wireless signal receivers, which are devices with only wireless signal receivers without transmission capabilities, and devices with receiving and transmitting hardware, which are devices with receiving and transmitting hardware capable of performing two-way communications on a two-way communication link. Such devices may include: cellular or other communication devices, which have a single-line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Personal Communications Service), which may combine voice, data processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / intranet access, a web browser, a notepad, a calendar and / or a GPS (Global Positioning System) receiver; conventional laptop and / or palmtop computers or other devices, which have and / or include a conventional laptop and / or palmtop computer or other device with a radio frequency receiver. The "terminal" or "terminal device" used herein may be portable, transportable, installed in a vehicle (air, sea and / or land), or adapted and / or configured to operate locally, and / or in a distributed form, at any other location on the earth and / or in space. The "terminal" or "terminal device" used herein may also be a communication terminal, an Internet terminal, a music / video playing terminal, such as a PDA, a MID (Mobile Internet Device) and / or a mobile phone with a music / video playing function, or a smart TV, a set-top box and other devices.
[0049] For details, please refer to Figure 1 The present invention discloses a method for dynamically updating information, comprising:
[0050] S1000, obtaining first reply data extracted from a first database according to request information sent by a client, wherein the first reply data includes a first code field and a first information body;
[0051] The user's request information is the request instruction sent by the user to the server. Generally, the request data includes identity information representing the user's identity, such as the user's account information for logging into the client, and request item information. The request item information is the instruction information for requesting the server to perform a certain task, such as querying a certain image, querying and obtaining certain document information, or visiting a certain web page.
[0052] The first database is a fixed database deployed and published on the back-end server, wherein these fixed databases include the reply information of the request information. When the server obtains the request information, it extracts the relevant reply information from the corresponding fixed database for reply. The reply data obtained from the first database is called the first reply data. It should be noted that for the security of data, it is usually necessary to set a preset condition. When the user's request information meets the preset condition, the reply information is extracted from the corresponding fixed database for reply according to the analyzed request information.
[0053] The fixed database disclosed in this application must be published data, the amount of data and the data content are fixed, and when data needs to be updated, that is, data is added, deleted or modified, it needs to be re-published and deployed.
[0054] In one embodiment, the method for obtaining reply data extracted from the first database according to the user's request information includes: intercepting the reply data obtained from the first database in the server-side control layer through the bean instruction in the spring container.
[0055] Spring is a container framework, a lightweight IoC (Inversion of Control) and AOP (Aspect Oriented Programming) container framework, and a lightweight container that mainly manages the life cycle of JavaBeans. It is generally highly coupled in traditional Java development. In a project or when implementing a logical function, an object often needs to rely on many objects to complete its operations, which results in a strong dependency between the two classes. Changing one place often involves many classes and a large amount of code.
[0056] The Spring framework can manage the dependencies between objects. Users do not need to create objects themselves, and all this work can be handed over to the container. It is a framework with low coupling, non-invasiveness to the code, and no dependence on the server.
[0057] <beans… / >The directive is the root element of the Spring configuration file.<beans… / > Elements can contain multiple<bean… / > Child elements, each<bean… / > The element can define a Bean instance. Each Bean corresponds to a Java instance in the Spring container. Two attributes usually need to be specified when defining a Bean. The id (identity) attribute of the Bean is unique in the Spring container. The Bean instance can be obtained through the getBean(String beanid) method of the BeanFactory (Bean factory). BeanFactory is a factory. The program only needs to obtain the BeanFactory reference to obtain references to all instances managed by the Spring container. The program does not need to be coupled with the implementation process of the specific instance. In most Java EE applications, a Spring container is automatically created when the application is started. Components are directly coupled through dependency injection, and there is no need to actively access the Spring container itself.
[0058] The bean instruction is the execution subject of the spring container. Therefore, through the bean instruction in the spring container, the reply data obtained by the server-side control layer from the first database can be intercepted. In one embodiment, the method for obtaining the reply data extracted from the first database includes starting a bean on the server side, using this bean to implement the HandlerMethodReturnValueHandler interface in spring, so as to intercept the object returned in the controller layer through the bean instruction. HandlerMethodReturnValueHandler is an interface used by RequestMappingHandlerAdapter to process the mapping control class and further dynamically process the value returned by the controller method.
[0059] In the present application, the reply data includes a code field and an information body, the code field represents the requested matter, and the information body is the reply information for solving the requested matter stored in the database. Therefore, the first reply data includes a first code field and a first information body.
[0060] It should be noted that there may be multiple request items in a request message, so in the process of data reply, it is necessary to analyze all request items in the request message and query the corresponding reply information in the database according to the specific request items. In the reply message, the request items are represented by code fields, so the generated first reply database may contain multiple first code fields, each of which is mapped to the corresponding first information body.
[0061] S2000, matching the first reply data in a second database to determine whether there is a second code field in the second database that is identical to the first code field, wherein the second database is an editable database in a non-published state, and the second database is a database after the first database is modified based on the most recent published state;
[0062] In one embodiment, the second database is different from the first database, and it stores related data independently of the first database. The second database is an editable database in a non-published state. The data stored in the second database does not need to be published and is in a temporary state. In the initial state, the data in the second database is the same as the data in the first database. When the related data is modified or added, and in the non-published state, it is stored in the second database. When the modified or added related data is published, the modified or added related data is automatically stored in the first database, and the second database returns to the initial state of the current published version, and its data is synchronized with the first database. Therefore, the second database includes all the data in the first database and the data modified and updated after the latest publication of the first database. Since the above-mentioned first reply data is the reply information extracted from the first database, the data requested in the request information may be updated in the second database, but is in an unpublished state. Therefore, the corresponding reply information obtained from the first database is not the real-time latest data. At this time, it is necessary to match the first reply data in the second database to check whether the second reply data obtained in the second data under the same request information is the same as the first reply data. If they are the same, it means that the reply data corresponding to the request information is the latest data and can be returned to the customer as the final reply data. If they are different, it means that the current first reply data is not the latest data, and the updated latest data is stored in the second database.
[0063] S3000: When the match succeeds, obtain the second information body mapped by the second code field from the second database;
[0064] The first reply data includes a first code field and a first information body. By acquiring one or more first code fields in the first reply data, matching can be performed in the second database according to the first code fields.
[0065] Matching in the second database through the first code field includes the following situations:
[0066] There is a field in the second database that is the same as the first code field. The first information subject corresponding to the first code field is matched with the second information subject of the corresponding field in the second database to check whether the first information subject is the same as the second information subject. Regardless of whether the first information subject is the same as the second information subject, it is confirmed that the match is successful.
[0067] There is no field identical to the first code field in the second database, which means that the data corresponding to the code field in the second database has been deleted. In this case, it is considered that the match is unsuccessful.
[0068] When the match is successful, it means that the same code field as that in the first database exists in the second database, and a reply message for the code field is also stored in the second database, which is called the second information body.
[0069] In one embodiment, when the match is unsuccessful, the first reply data is directly sent to the client.
[0070] S4000: Replace the first information body with the second information body to generate second reply data, and return the second reply data to the client.
[0071] After obtaining the second information body from the second database according to the code field, the second information body is compared with the first information body to determine whether the two are the same. When the second information body is the same as the first information body, it means that the data corresponding to the code field has not changed, and the first information body is the final reply data. Therefore, the data in the first information body or the data in the second information body can be returned to the client at will. When the second information body is different from the first information body, since the first database is the published data, the second database includes not only the published data in the first database, but also the unpublished data that has been modified and updated to the data in the first database. Therefore, the second reply data corresponding to the second information body is preferentially replaced by the first reply data and returned to the client, thereby obtaining the latest data.
[0072] The second database is used as a temporary database for dynamic modification and is used in combination with the first database. The second database is authorized for data comparison and data recovery, so that the modified data can be obtained without being published. Data modification can be performed at any time and takes effect immediately after data modification, so as to achieve the purpose of rapid response and data modification. At the same time, it makes the application development process more streamlined, saves application update time, and saves labor costs.
[0073] In one embodiment, the types of editable items in the second database in the non-published state include deleting the second code field and / or the second information body, adding the second code field and / or the second information body, and modifying the second code field and / or the second information body. In the second database, after deleting the code field, the second information body corresponding to the code field will also be deleted; when adding a code field, the second information body mapped to the code field needs to be added; when modifying the second information body alone, the corresponding code field remains unchanged.
[0074] In one embodiment, in the initial state, the data in the second database is consistent with the data in the first database, wherein the initial state is the state of the first database when the data is last published. Since the first database is a fixed database in the published state, that is, data can only be stored in the first database after it is published, and the second database belongs to the modification library of the first database, after the first database is published, the data in the second database is consistent with the data in the first database, and then the data in the second database can be edited and modified, and the edited and modified data can only be stored in the second database. When the data in the second database is stored in the first database after executing the publishing instruction, the data in the first database is consistent with the data in the second database. It should be noted that the data published in the first database is not limited to the modified data in the second database, but also includes the data directly stored in the first database that is input from the outside. At this time, the second database needs to request the data of the first database and store the acquired data of the first database for synchronization and as the data of the initial state under the currently published data version.
[0075] In one embodiment, the data stored in the second database is a permanent storage database, and all modified data is permanently stored in the database. In another embodiment, the second database is a temporary storage database, and a temporary storage period is set. When the modified data in the second database reaches the temporary storage period, it is restored to the initial state.
[0076] In one embodiment, the request information includes the identity information of the client. Figure 2 , before matching the first reply data in the second database, the method further includes:
[0077] S1100, obtaining the authority of the identity information;
[0078] S1200: When the authority of the identity information meets a preset condition, the first reply data is matched in a second database.
[0079] Since the request information includes identity information and request information, in order to further improve the security and privacy of data acquisition, in this embodiment, permission management is implemented for access to the second database, that is, by verifying the permission of the identity information, it is identified whether the identity information has the permission to access the second database. When it has the permission to access the second database, the first reply data is sent to the second database for further matching, so as to achieve the purpose of hierarchical management of data updates. For example, a membership system is set up. When the identity information belongs to a member, the data obtained is allowed to be matched through the second database to quickly obtain updated but unpublished data. When the identity does not belong to a member, it can only obtain data in the first database, so as to limit the time difference between members and non-members in obtaining the latest data.
[0080] In one embodiment, see Figure 3 , before replacing the first information body with the second information body to generate second reply data in step S4000, the method further includes:
[0081] S3100, identifying priority levels of the first information subject and the second information subject, wherein the priority levels are set in advance or according to configuration information mapped to the identity information;
[0082] S3200: When the priority level of the second information body is equal to or higher than that of the first information body, replace the first information body with the second information body to generate second reply data.
[0083] The first information subject is information data published in the first database, and the second information subject is information data stored in the second database. The first information subject and the second information subject may be the same or different. When the first information subject and the second information subject are the same, their priority levels are the same. When the first information subject and the second information subject are different, their priority levels are different.
[0084] In one embodiment, the priority levels of the first information body and the second information body are preset. For example, in the first database, when data is published, the priority level of the information body corresponding to the code field is set. Since the data in the first database cannot be modified, the data in the second database can be modified. In the initial state, the second database is the same as the first database. Therefore, the content and data of the second information body can be directly modified in the second database. In this case, when the priority level of the first information body is the same as the priority level of the second information body, or the priority level of the second information body is higher than that of the first information body, the second information body replaces the first information body as the reply information, but when the priority level of the first information body is higher than that of the second information body, no replacement is performed, and the first information body is still sent to the client.
[0085] In another embodiment, the priority levels of the first information subject and the second information subject can be automatically set by the configuration information mapped to the identity information represented by the client. The identity information is the relevant information to distinguish the client user. By setting the configuration information for the identity information, the identity information can be managed in a hierarchical manner. People at different levels will have different permissions to obtain the first information subject and the second information subject.
[0086] Based on the above principle, in one embodiment, the present application can be used on a smart terminal to automatically reply to customers. Customers log in on the smart terminal, pass identity authentication, and ask relevant questions, and then the corresponding reply information can be obtained from the first database and the second database. In this application scenario, the first code field and the second code field are keywords related to the relevant questions raised by the customer, and the answer to the question is the first information body in the first database and the second information body in the second database. In one embodiment, the priority of the first information subject and the second information subject is obtained through the configuration information of the client's identity information. Assuming that the identity information includes members and non-members, and the age groups among members are divided into 18-35 years old, 35-55 years old, and over 55 years old, the configuration information for 18-35 years old is: the priority of all data in the second database is higher than that of the first database, the configuration information for 35-55 years old is that the priority of the first information subject in the first database is higher than that of the second information subject, and the configuration information for over 55 years old is that the first information subject in the first database is higher than that of the second information subject in the second database. In this way, the language of the answers to the relevant questions in the first database can be set to be written, and the language of the relevant questions in the second database can be set to be more playful. For example, for the user's inquiry about "tomorrow's weather", the sentence of the first information subject in the first database is: "It will rain tomorrow, please bring an umbrella when going out", and the sentence of the second information subject in the second database is: "Report to the master, it will rain tomorrow, remember to bring an umbrella when going out, it will not be beautiful if you get wet", so dynamic interaction is performed according to the client's identity information, and different people have different customer experiences when communicating. The above is only a specific application of the present application. The present application can also be applied in other scenarios based on the relationship between the first database and the second database and the method for obtaining reply information. As long as the principle of executing the command is consistent with the present application, it is included in the protection scope of the present application.
[0087] On the other hand, see Figure 4 , the present application discloses an information dynamic updating device, comprising:
[0088] The first acquisition module 1000 is configured to execute acquisition of first reply data extracted from the first database according to the request information sent by the client, wherein the first reply data includes a first code field and a first information body;
[0089] The user's request information is the request instruction sent by the user to the server. Generally, the request data includes identity information representing the user's identity, such as the user's account information for logging into the client, and request item information. The request item information is the instruction information for requesting the server to perform a certain task, such as querying a certain image, querying and obtaining certain document information, or visiting a certain web page.
[0090] The first database is a fixed database deployed and published on the back-end server, wherein these fixed databases include the reply information of the request information. When the server obtains the request information, it extracts the relevant reply information from the corresponding fixed database for reply. The reply data obtained from the first database is called the first reply data. It should be noted that for the security of data, it is usually necessary to set a preset condition. When the user's request information meets the preset condition, the reply information is extracted from the corresponding fixed database for reply according to the analyzed request information.
[0091] The fixed database disclosed in this application must be published data, the amount of data and the data content are fixed, and when data needs to be updated, that is, data is added, deleted or modified, it needs to be re-published and deployed.
[0092] In one embodiment, the method for obtaining reply data extracted from the first database according to the user's request information includes: intercepting the reply data obtained from the first database in the server-side control layer through the bean instruction in the spring container.
[0093] In the present application, the reply data includes a code field and an information body, the code field represents the requested matter, and the information body is the reply information for solving the requested matter stored in the database. Therefore, the first reply data includes a first code field and a first information body.
[0094] It should be noted that there may be multiple request items in a request message, so in the process of data reply, it is necessary to analyze all request items in the request message and query the corresponding reply information in the database according to the specific request items. In the reply message, the request items are represented by code fields, so the generated first reply database may contain multiple first code fields, each of which is mapped to the corresponding first information body.
[0095] Processing module 2000: configured to perform matching of the first reply data in a second database to determine whether there is a second code field in the second database that is identical to the first code field, wherein the second database is an editable database in a non-published state;
[0096] In one embodiment, the second database is different from the first database, and it stores related data independently of the first database. The second database is an editable database in a non-published state. The data stored in the second database does not need to be published and is in a temporary state. In the initial state, the data in the second database is the same as the data in the first database. When the related data is modified or added, and in the non-published state, it is stored in the second database. When the modified or added related data is published, the modified or added related data is automatically stored in the first database, and the second database returns to the initial state of the current published version, and its data is synchronized with the first database. Therefore, the second database includes all the data in the first database and the data modified and updated after the latest publication of the first database. Since the above-mentioned first reply data is the reply information extracted from the first database, the data requested in the request information may be updated in the second database, but is in an unpublished state. Therefore, the corresponding reply information obtained from the first database is not the real-time latest data. At this time, it is necessary to match the first reply data in the second database to check whether the second reply data obtained in the second data under the same request information is the same as the first reply data. If they are the same, it means that the reply data corresponding to the request information is the latest data and can be returned to the customer as the final reply data. If they are different, it means that the current first reply data is not the latest data, and the updated latest data is stored in the second database.
[0097] The second acquisition module 3000 is configured to acquire the second information body mapped by the second code field from the second database when the match succeeds;
[0098] The first reply data includes a first code field and a first information body. By acquiring one or more first code fields in the first reply data, matching can be performed in the second database according to the first code fields.
[0099] Matching in the second database through the first code field includes the following situations:
[0100] There is a field in the second database that is the same as the first code field. The first information subject corresponding to the first code field is matched with the second information subject of the corresponding field in the second database to check whether the first information subject is the same as the second information subject. Regardless of whether the first information subject is the same as the second information subject, it is confirmed that the match is successful.
[0101] There is no field identical to the first code field in the second database, which means that the data corresponding to the code field in the second database has been deleted. In this case, it is considered that the match is unsuccessful.
[0102] When the match is successful, it means that the same code field as that in the first database exists in the second database, and a reply message for the code field is also stored in the second database, which is called the second information body.
[0103] Execution module 4000: configured to replace the first information body with the second information body to generate second reply data, and return the second reply data to the client.
[0104] After obtaining the second information body from the second database according to the code field, the second information body is compared with the first information body to determine whether the two are the same. When the second information body is the same as the first information body, it means that the data corresponding to the code field has not changed, and the first information body is the final reply data. Therefore, the data in the first information body or the data in the second information body can be returned to the client at will. When the second information body is different from the first information body, since the first database is the published data, the second database includes not only the published data in the first database, but also the unpublished data that has been modified and updated to the data in the first database. Therefore, the second reply data corresponding to the second information body is preferentially replaced by the first reply data and returned to the client, thereby obtaining the latest data.
[0105] Optionally, the editable types of the second database in a non-published state include one or more of deleting the second code field and / or the second information body, adding the second code field and / or the second information body, and modifying the second code field and / or the second information body.
[0106] Optionally, in an initial state, the data in the second database is consistent with the data in the first database, wherein the initial state is the state of the first database when data was last published.
[0107] Optionally, the second database is a temporary storage database and is provided with a temporary storage period. When the modified data in the second database reaches the temporary storage period, it is restored to an initial state.
[0108] Optionally, the request information includes identity information of the client, and the information dynamic updating device further includes:
[0109] Identity authority acquisition module: configured to execute the authority to obtain the identity information;
[0110] Matching module: configured to execute matching of the first reply data in the second database when the authority of the identity information meets the preset conditions.
[0111] Optionally, the information dynamic updating device further includes:
[0112] Identification module: configured to perform: identifying the priority levels of the first information subject and the second information subject, wherein the priority levels are set in advance or automatically according to the configuration information mapped by the identity information; when the priority level of the second information subject is equal to or higher than that of the first information subject, replacing the first information subject with the second information subject to generate second reply data.
[0113] Optionally, when the first reply data fails to match in the second database and / or the priority level of the first information body is higher than that of the first information body, the first reply data is sent to the client.
[0114] Since the above-mentioned information dynamic update device is an introduction to a product that corresponds one-to-one to the information dynamic update method, its functions are the same and will not be repeated here. The information dynamic update group device of the present application adopts a second database as a temporary database for dynamic modification, and uses the second database in combination with the first database. The second database is authorized to perform data comparison and data recovery, so that the modified data can be obtained without being published, and the data can be modified at any time. The data modification takes effect immediately, so as to achieve the purpose of rapid response and data modification. At the same time, it makes the application development process more streamlined, saves application update time, and saves labor costs.
[0115] The basic structure diagram of the computer device provided by the embodiment of the present invention can be found in Figure 5 .
[0116] The computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected via a system bus. The non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor may implement a method for dynamically updating information. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor may execute a method for dynamically updating information. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0117] The computer device receives the status information of the prompt behavior sent by the associated client, verifies whether the above task conditions are met, and then sends the corresponding preset instructions to the associated terminal, so that the associated terminal can perform the corresponding operation according to the preset instructions, thereby realizing effective supervision of the associated terminal. At the same time, when the status of the prompt information is different from the preset status instruction, the server controls the associated terminal to continue to ring, so as to prevent the problem that the prompt task of the associated terminal is automatically terminated after a period of execution.
[0118] The present invention also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the information dynamic update method described in any of the above embodiments.
[0119] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0120] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0121] The above descriptions are only some embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for dynamically updating information, characterized in that: include: Acquire first reply data extracted from the first database according to the request information sent by the client, wherein the first reply data includes a first code field and a first information body, the first code field represents the requested matter, and the first information body is reply information for the matter stored in the first database; Obtaining the authority of the identity information of the client; when the authority of the identity information meets the preset conditions, matching the first reply data in the second database to determine whether there is a second code field in the second database that is the same as the first code field, wherein the second database is an editable database in a non-published state, and the second database is a database after the data of the first database is modified based on the most recent published state; When the match succeeds, obtaining the second information body mapped by the second code field from the second database; Identifying priority levels of the first information subject and the second information subject, wherein the priority levels are preset or automatically set according to configuration information mapped to identity information of the client, wherein the identity information is information for distinguishing a client user; When the priority level of the second information body is equal to or higher than the priority level of the first information body, replacing the first information body with the second information body to generate second reply data, and returning the second reply data to the client; When the first reply data fails to match in the second database and / or the priority level of the first information body is higher than that of the second information body, the first reply data is sent to the client.
2. The information dynamic updating method according to claim 1, characterized in that: The types of editability of the second database in a non-published state include one or more of deleting the second code field and / or the second information body, adding the second code field and / or the second information body, and modifying the second code field and / or the second information body.
3. The information dynamic updating method according to claim 1, characterized in that: In an initial state, the data in the second database is consistent with the data in the first database, wherein the initial state is the state of the first database when data is last released.
4. The information dynamic updating method according to claim 3, characterized in that: The second database is a temporary storage database and is provided with a temporary storage period. When the modified data in the second database reaches the temporary storage period, it is restored to an initial state.
5. An information dynamic updating device, characterized in that: include: A first acquisition module is configured to acquire first reply data extracted from the first database according to the request information sent by the client, wherein the first reply data includes a first code field and a first information body, the first code field represents the requested matter, and the first information body is the reply information for the matter stored in the first database; Processing module: configured to execute the authority to obtain the identity information of the client; when the authority of the identity information meets the preset condition, match the first reply data in the second database to determine whether there is a second code field in the second database that is the same as the first code field, wherein the second database is an editable database in a non-published state, and the second database is a database after the data of the first database is modified based on the most recent published state; A second acquisition module: configured to acquire, when the match succeeds, the second information body mapped by the second code field from the second database; Execution module: configured to execute identification of the priority levels of the first information body and the second information body, wherein the priority levels are pre-set or automatically set according to configuration information mapped by the identity information of the client, and the identity information is information for distinguishing client users; when the priority level of the second information body is equal to or higher than the priority level of the first information body, the second information body replaces the first information body to generate second reply data, and the second reply data is returned to the client; when the first reply data fails to match in the second database and / or the priority level of the first information body is higher than that of the second information body, the first reply data is sent to the client.
6. A computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the information dynamic update method as claimed in any one of claims 1 to 4.
7. A storage medium storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the information dynamic update method according to any one of claims 1 to 4.
