Business processing method and device, storage medium and electronic equipment
By generating business instructions and determining the data acquisition path, data is obtained from the cache space or database, which solves the problem that development and testers cannot obtain real-time data, and improves testing efficiency and data accuracy.
Patent Information
- Application Number
- CN202411325490.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the testing process, development and testers are unable to obtain real-time data based on their own needs, resulting in the inability to effectively test the logic of new developments, affecting the testing efficiency.
By responding to the user's data acquisition path switching operation, business instructions are generated to determine the data acquisition path. If it is the first way, cache data is read from the preset cache space; if it is the second way, the database interface is called to obtain real-time data to execute the current business.
Meet the testing needs of development testers, improve test efficiency, and ensure the real -time and accuracy of the data.
Smart Images

Figure CN119357185A_ABST
Abstract
Description
Technical Field
[0001] The present specification relates to the field of computer technology, and in particular to a business processing method, device, storage medium and electronic device. Background Art
[0002] Currently, in order to ensure the normal operation of applications or websites, development testers need to test the newly developed logic during the subsequent development and update process. However, during the testing process, development testers are unable to obtain the desired data according to their testing requirements.
[0003] For example, in the scenario of product information management on an e-commerce platform, when development testers need to test the display effect corresponding to the new product logic in a product display page based on real-time data, due to the existence of cached data, they may only be able to obtain cached data for testing, or need to wait for the cached data to be updated before they can view the new display effect. This fails to meet the test requirements and also affects the test efficiency.
[0004] Based on this, how to meet the needs of development testers during the testing process and improve testing efficiency is an urgent problem to be solved. Summary of the invention
[0005] This specification provides a business processing method, device, storage medium and electronic device to partially solve the above-mentioned problems existing in the prior art.
[0006] This manual adopts the following technical solutions:
[0007] This specification provides a business processing method, including:
[0008] generating a service instruction in response to a data acquisition path switching operation performed by a user;
[0009] According to the business instructions, determine the data acquisition path required to execute the current business;
[0010] When it is determined that the data acquisition path is the first path, the cache data required by the service instruction is read from a preset cache space, so as to execute the current service through the cache data;
[0011] When it is determined that the data acquisition path is the second path, the interface of the preset database is called to obtain the real-time data corresponding to the business instruction from the database, so as to execute the current business through the real-time data.
[0012] Optionally, the step of generating a service instruction in response to the data acquisition path switching operation performed by the user specifically includes:
[0013] In response to the user performing a switching operation on a preset route switching switch in a preset interface, a service instruction is generated.
[0014] Optionally, when it is determined that the data acquisition path is the first path, the step of reading cache data required by the service instruction from a preset cache space specifically includes:
[0015] When it is determined that the data acquisition path is the first path, determining a data level according to the business instruction, wherein the data level is used to characterize an update frequency of the data required by the business instruction, and the higher the update frequency of the data, the higher the data level;
[0016] When the data level is lower than a preset level, the cache data required by the service instruction is read from a preset cache space.
[0017] Optionally, the method further comprises:
[0018] When the data level is not less than a preset level, an interface of a preset database is called to obtain real-time data corresponding to the business instruction from the database.
[0019] Optionally, before the step of determining, according to the business instruction, a data acquisition path required for executing the current business, the method further includes:
[0020] According to the business instruction, obtaining identification information of the user;
[0021] Determining the use permission information of the user according to the identification information, wherein the use permission information is used to indicate the data that the user is authorized to obtain;
[0022] When it is determined that the data acquisition path is the first path, the step of reading the cache data required by the business instruction from the preset cache space specifically includes:
[0023] When it is determined that the data acquisition path is the first path, the cache data required by the business instruction is read from a preset cache space according to the usage permission information;
[0024] When it is determined that the data acquisition path is the second path, the step of calling an interface of a preset database to acquire the real-time data corresponding to the business instruction from the database specifically includes:
[0025] When it is determined that the data acquisition path is the second path, an interface of a preset database is called to acquire real-time data corresponding to the business instruction from the database according to the usage authority information.
[0026] Optionally, before the step of executing the current service by using the cached data, the method further includes:
[0027] Determining whether the cache time of the cache data required by the service instruction read from the cache space does not exceed a preset time;
[0028] The step of executing the current business by using the cached data specifically includes:
[0029] If it is determined that the cached time length of the cached data does not exceed the preset time length, the current service is executed through the cached data.
[0030] Optionally, the method further comprises:
[0031] If it is determined that the cached time of the cached data exceeds the preset time, the interface of the preset database is called to obtain the real-time data corresponding to the business instruction from the database, and the current business is executed through the real-time data.
[0032] This specification provides a service processing device, including:
[0033] A response module, used to generate a business instruction in response to a data acquisition path switching operation performed by a user;
[0034] A determination module, used to determine a data acquisition path required for executing the current business according to the business instruction;
[0035] A cache module, configured to read cache data required by the service instruction from a preset cache space when it is determined that the data acquisition path is the first path, so as to execute the current service through the cache data;
[0036] The real-time module is used to call the interface of the preset database when it is determined that the data acquisition path is the second path, so as to obtain the real-time data corresponding to the business instruction from the database, so as to execute the current business through the real-time data.
[0037] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned business processing method is implemented.
[0038] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned business processing method when executing the program.
[0039] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0040] In the business processing method provided in this specification, in response to the data acquisition path switching operation performed by the user, a business instruction is generated, and according to the business instruction, the data acquisition path required for executing the current business is determined. When the data acquisition path is determined to be the first path, the cache data required by the business instruction is read from the preset cache space to execute the current business through the cache data; when the data acquisition path is determined to be the second path, the interface of the preset database is called to obtain the real-time data corresponding to the business instruction from the database, so as to execute the current business through the real-time data.
[0041] As can be seen from the above method, in the business processing method provided in this specification, different data can be obtained according to different data acquisition paths in response to the data acquisition path switching operation performed by the user. This method can meet the testing needs of development and testing personnel and improve testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:
[0043] Figure 1 A flowchart of a business processing method provided in this specification;
[0044] Figure 2 A schematic diagram of a process for switching data acquisition paths provided in this specification;
[0045] Figure 3 A schematic diagram of a business processing device provided in this specification;
[0046] Figure 4 A method corresponding to the Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0048] Currently, cache technology is widely used in the Internet environment. When developers and testers need to test newly developed logic based on real-time data, due to the existence of cached data, developers usually need to wait for the cached data to be updated before they can see the corresponding effect of the newly developed logic. This method seriously affects the test efficiency.
[0049] Based on this, this specification provides a business processing method. First, in response to the data acquisition path switching operation performed by the user, a business instruction is generated, and according to the business instruction, the data acquisition path required for executing the current business is determined. When the data acquisition path is determined to be the first path, the cache data required for the business instruction is read from the preset cache space to execute the current business through the cache data; when the data acquisition path is determined to be the second path, the interface of the preset database is called to obtain the real-time data corresponding to the business instruction from the database, so as to execute the current business through the real-time data. This method can not only meet the testing needs of development testers, but also improve the testing efficiency.
[0050] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0051] Figure 1 A flowchart of a business processing method provided in this specification includes the following steps:
[0052] S101: In response to a data acquisition path switching operation performed by a user, a service instruction is generated.
[0053] In this specification, the execution entity used to implement a business processing method can be a terminal device such as a laptop computer, a tablet computer, or of course, a server. For the sake of ease of description, this specification only takes the server as the execution entity as an example to illustrate a business processing method provided in this specification.
[0054] The server generates a business instruction in response to the data acquisition path switching operation performed by the user. The data acquisition path switching operation performed by the user may be a switching operation performed by the user on a preset path switching switch in a preset interface. For example, in a commodity display scenario, the preset interface is a commodity display interface, and a preset path switching switch is set in the commodity display interface. The user realizes his needs by switching the path switching switch. Generally speaking, when the path switching switch is in the on state, the business instruction generated by the server is used to obtain real-time data; when the path switching switch is in the off state, the business instruction generated by the server is used to obtain cached data.
[0055] In addition to responding to the data path switching operation performed by the user, the server can also generate business instructions through the user's identification information. Specifically, the server can obtain the identification information of the user who is using the current preset interface, and determine which role the user belongs to based on the user's identification information. The roles can be divided into development and testing personnel and ordinary users. If the server determines that the user who is using the current preset interface is a development and testing personnel, the generated business instructions are used to obtain real-time data; if the server determines that the user who is using the current preset interface is an ordinary person, the generated business instructions are used to obtain cached data. In this way, the user does not need to perform the path switching operation himself. The server can determine which role the user belongs to based on the user's identification information to generate the corresponding business instructions.
[0056] S102: Determine a data acquisition method required for executing the current business according to the business instruction.
[0057] The server determines the data acquisition path required for executing the current business according to the business instruction. Specifically, the business instruction generated by the server may include a path flag, and the data acquisition path required for executing the current business is determined according to the path flag included in the business instruction. For example, the path flag can be 1 or 0. When the path flag is 0, the data acquisition path required for executing the current business is the first path; when the path flag is 1, the data acquisition path required for executing the current business is the second path. The server can also directly parse the business instruction to determine the data required for the business instruction, and determine the data acquisition path required for executing the current business according to the data required by the business instruction.
[0058] S103: When it is determined that the data acquisition path is the first path, cache data required by the service instruction is read from a preset cache space, so as to execute the current service through the cache data.
[0059] The server determines the data acquisition path required to execute the current business according to the business instruction. When the data acquisition path is determined to be the first path (using the above example, when the path flag is 0), the server reads the cache data required by the business instruction from the preset cache space, and executes the current business through the acquired cache data. The business here can refer to querying product details information, querying user basic information, etc.
[0060] Specifically, when the server determines that the acquisition path is the first path, it locates the preset cache space according to the data required by the business instruction, and determines the cache key based on the key information in the business instruction, and obtains the cache data corresponding to the cache key in the cache space. Then, the server executes the current business according to the obtained cache data.
[0061] For example, when the current business is to query product details and the server determines that the acquisition path is the first path, it locates the preset cache space (such as Redis, Memcached and other data storage systems) according to the product details information required by the business instruction, that is, locates the cache space for the business of querying product details, and determines the cache key (Key) based on the key information in the business instruction (such as product ID, user ID, etc.), obtains the cache data (Value) corresponding to the cache key in the cache space, that is, the cache data of the product details that the user wants to query, and displays the cache data in the interface for querying product details, where the cache data can be stored in the cache space in the form of Key-Value.
[0062] In actual scenarios, in order to obtain more accurate data, the server can determine the level of data required for the business instruction. Specifically, when the server determines that the data acquisition path is the first path, the data level is determined according to the business instruction, wherein the data level is used to characterize the update frequency of the data required for the business instruction. The higher the data update frequency, the higher the data level. When the data level is less than the preset level, the cache data required for the business instruction is read from the preset cache space; when the data level is not less than the preset level, the server can obtain real-time data to perform the current task. Specifically, the server calls the interface of the preset database to obtain the real-time data corresponding to the business instruction from the database.
[0063] For example, data with low update frequency can refer to basic information of users (such as age, personality, occupation, etc.) or product information (such as name, purpose, etc.). These data with low update frequency may not change for a long time, so it is enough to obtain cache data from the cache space to save the time of data acquisition. Data with high update frequency can refer to transaction information (such as transaction amount, transaction time, etc.) or order status information (such as logistics information, estimated arrival time, etc.). These data with high update frequency may change in a short time, so it is necessary to obtain real-time data from the database to ensure that the acquired data is accurate and real-time.
[0064] It should be noted that the data level corresponding to the data required by the business instruction can be contained in the business instruction. The server parses the business instruction to obtain the data level. It can also analyze the data required by the business instruction to determine the update frequency of the data required by the business instruction to determine the data level corresponding to the data required by the business instruction.
[0065] In addition, cached data has an expiration date, so only cached data that has not exceeded the expiration date can be used to execute the current task. Specifically, the server determines whether the cached time of the cached data required for the business instructions read from the cache space has not exceeded the preset time. If it is determined that the cached time of the cached data has not exceeded the preset time, the current business is executed through the cached data; if it is determined that the cached time of the cached data exceeds the preset time, the interface of the preset database is called to obtain the real-time data corresponding to the business instructions from the database, and the current business is executed through the real-time data. The specific process of obtaining cached data or obtaining real-time data can be implemented in the above manner and will not be repeated here. In this way, the timeliness of the acquired data is guaranteed.
[0066] It should be noted that when the server finds that the cache data corresponding to the business instruction does not exist and the cached time of the cached data exceeds the preset time, it can call the interface of the preset database to obtain the real-time data corresponding to the business instruction from the database, and execute the current business through the real-time data. At the same time, the above real-time data is stored in the preset cache space to facilitate the next direct retrieval of the cached data from the cache space.
[0067] S104: When it is determined that the data acquisition path is the second path, an interface of a preset database is called to acquire real-time data corresponding to the business instruction from the database, so as to execute the current business through the real-time data.
[0068] The server determines the data acquisition path required to execute the current business according to the business instruction. When the data acquisition path is determined to be the second path (using the above example, when the path flag is 1), the server calls the interface of the preset database to obtain the real-time data corresponding to the business instruction from the database, and then executes the current business through the obtained real-time data. The business here can refer to querying the real-time received information, querying the transaction information, querying the logistics information, etc.
[0069] Specifically, when it is determined that the data acquisition path is the second path, the server constructs a corresponding database query statement according to the business instruction, and obtains real-time data corresponding to the business instruction through a preset database interface based on the constructed database query statement. The server executes the current business based on the acquired real-time data.
[0070] For example, when the current business is to query order status information and the server determines that the acquisition path is the second path, the server constructs a database query statement based on the relevant parameters in the business instruction (such as user ID, order number, product ID, etc.), and uses the preset database interface and the constructed database query statement to query the results from the database as real-time data, so as to display the queried order status to the user through real-time data.
[0071] In this specification, in order to ensure the security of data, different data permissions can also be opened according to different users. Specifically, the server can obtain the user's identification information according to the business instruction, and then determine the user's usage permission information according to the identification information, wherein the usage permission information is used to characterize the data that the user has the right to obtain. When the data acquisition path is determined to be the first path, the cache data required for the business instruction is read from the preset cache space according to the usage permission information. Specifically, the server can filter all the acquired cache data according to the usage permission information, and return the cache data that the user has the right to obtain to the user; when the data acquisition path is determined to be the second path, the interface of the preset database is called to obtain the real-time data corresponding to the business instruction from the database according to the usage permission information. Specifically, the server can filter all the acquired real-time data according to the usage permission information, and return the real-time data that the user has the right to obtain to the user.
[0072] In the above content, determining the user's usage permission information based on identification information may include two methods. The first is that the server determines the user's permission level based on the identification information, and different permission levels correspond to different usage permission information (that is, users with different permission levels can obtain different data). The higher the permission level, the more data the user can obtain, wherein different permission levels correspond to different usage permission information, which can be stored in a database; the second is that the server determines the type of user based on the identification information, and different types of users correspond to different usage permission information, which can also be stored in a database. For example, type A users can obtain certain types of data, and type B users can obtain other types of data.
[0073] In addition, after the server obtains real-time data from the database, in order to improve the efficiency of obtaining real-time data next time, the real-time data can be cached in a preset cache space after obtaining the real-time data from the database, and a read jump link can be added to the data acquisition address corresponding to the second path, so that when the real-time data needs to be obtained from the database through the second path again, the storage address of the real-time data in the preset cache space is determined according to the read jump link identified from the data acquisition address corresponding to the second path, so that the real-time data can be obtained from the preset cache space through the storage address.
[0074] That is to say, the data required by the business instruction is real-time data, and the server needs to consume a lot of time to obtain the real-time data. Therefore, a read jump link can be added to the data acquisition address corresponding to the second path, so that the next time the real-time data required by the business instruction is obtained, the real-time data can be directly obtained from the preset cache space through the read jump link. Of course, the read jump link can also be judged for timeliness first, that is, the read jump link can be jumped only if it has not exceeded the validity period.
[0075] It should be noted that in some cases, using only cached data may not meet user needs. In this case, if it is detected that the task performed through cached data does not meet the preset task requirements, for example, in the scenario of querying product details, a refresh button can be set in the product query page. When it is detected that the user clicks the refresh button, the server believes that the task performed through cached data does not meet the preset task requirements. For another example, in the scenario of querying order status, when the user pulls down the order query page to refresh, the server believes that the task performed through cached data does not meet the preset task requirements.
[0076] At this time, the server can obtain the associated data corresponding to the cached data from the database based on the cached data, and store the associated data in the cache space, and mark the cached data and the associated data in the cache space at the same time, that is, the cached data in the cache space and the associated data in the cache space are marked with different marking methods, and the relationship between the mark of the cached data and the mark of the associated data is stored.
[0077] Furthermore, when the server detects that it is necessary to obtain cache data from the cache space again through the first path, it identifies the tag of the cache data in the cache space, and through the identified tag of the cache data and the relationship between the tag of the stored cache data and the tag of the associated data, determines the associated data corresponding to the cache data from the cache space to return the associated data.
[0078] For example, if the server needs to obtain the user's age information to display it to the user, when the user refreshes the interface displaying the age, it means that the user is not satisfied with the currently displayed age information or the currently displayed age information is wrong. At this time, the server obtains the associated data corresponding to the age information from the database (i.e., the real-time age information), and marks both the age information and the real-time age information to record the correspondence between the age information and the real-time age information. When the server obtains the age information again because the user refreshes the interface displaying the age, the real-time age information corresponding to the age information is returned through the mark.
[0079] Based on the above content, this specification will use a complete example to explain the above method in detail. Figure 2shown.
[0080] Figure 2 A flowchart of switching data acquisition paths provided in this specification.
[0081] from Figure 2 It can be seen that the server determines the state of the path switching switch according to the business instruction. If the path switching switch is in the on state, the interface of the preset database is called to obtain the real-time data corresponding to the business instruction from the database, so as to execute the current business through the real-time data; if the path switching switch is in the off state, the cache data required by the business instruction is read from the preset cache space, so as to execute the current business through the cache data.
[0082] In this specification, the server determines the acquisition path of the data required for executing the current business according to the business instruction. Different data acquisition paths have different ways of acquiring data. This method allows users to acquire data according to their needs, and is also convenient for switching data acquisition paths in different usage scenarios to obtain more appropriate data.
[0083] In order to make it more convenient for users to switch the data acquisition path, a path switching switch can be set on the preset interface. The operation is simple and it is also convenient for users to switch the data acquisition path to an appropriate path.
[0084] Furthermore, the method provided in this specification can also determine the data level according to the business instruction, which is to distinguish the update frequency of the data required by the business instruction. For data with high update frequency, real-time data can be directly obtained from the database to execute the current task, and for data with low update frequency, cache data can be obtained from the cache space to execute the current task. In this way, accurate data can be obtained to execute the task, and the efficiency of task execution can be improved.
[0085] This description can further determine the user's usage permission information based on the user's identification information in the business instruction, so that when acquiring data, only data that the user has permission to acquire can be acquired, thereby improving the security of the task execution process.
[0086] In addition, the cached data stored in the cache space has a time limit. The cached time of the cached data obtained by the server needs to not exceed the preset time. Otherwise, the server will directly obtain real-time data from the database to ensure the validity of the data.
[0087] The above are one or more implementation business processing methods of this specification. Based on the same idea, this specification also provides a corresponding business processing device, such as Figure 3 shown.
[0088] Figure 3A schematic diagram of a service processing device provided in this specification includes:
[0089] A response module 301, used to generate a service instruction in response to a data acquisition path switching operation performed by a user;
[0090] A determination module 302 is used to determine a data acquisition path required to execute the current business according to the business instruction;
[0091] The cache module 303 is used to read the cache data required by the business instruction from the preset cache space when it is determined that the data acquisition path is the first path, so as to execute the current business through the cache data;
[0092] The real-time module 304 is used to call the interface of the preset database to obtain the real-time data corresponding to the business instruction from the database when it is determined that the data acquisition path is the second path, so as to execute the current business through the real-time data.
[0093] Optionally, the response module 301 is specifically configured to generate a service instruction in response to a switching operation performed by the user on a preset path switching switch in a preset interface.
[0094] Optionally, the cache module 303 is specifically used to, when it is determined that the data acquisition path is the first path, determine the data level according to the business instruction, the data level is used to characterize the update frequency of the data required by the business instruction, the higher the update frequency of the data, the higher the data level; when the data level is less than the preset level, the cache data required for the business instruction is read from the preset cache space.
[0095] Optionally, the cache module 303 is further configured to, when the data level is not less than a preset level, call an interface of a preset database to obtain real-time data corresponding to the business instruction from the database.
[0096] Optionally, the determination module 302 is further configured to obtain identification information of the user according to the service instruction; determine usage permission information of the user according to the identification information, wherein the usage permission information is used to represent data that the user is authorized to obtain;
[0097] The cache module 303 is specifically configured to, when it is determined that the data acquisition path is the first path, read the cache data required by the business instruction from a preset cache space according to the usage permission information;
[0098] The real-time module 304 is specifically used to, when it is determined that the data acquisition path is the second path, call an interface of a preset database to obtain the real-time data corresponding to the business instruction from the database according to the usage authority information.
[0099] Optionally, the cache module 303 is further used to determine whether the cache time of the cache data required by the service instruction read from the cache space does not exceed a preset time;
[0100] The cache module 303 is specifically configured to execute the current service through the cache data if it is determined that the cached time length of the cached data does not exceed the preset time length.
[0101] Optionally, the cache module 303 is also used to call the interface of the preset database to obtain real-time data corresponding to the business instruction from the database if it is determined that the cached time of the cached data exceeds the preset time, and execute the current business through the real-time data.
[0102] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 A business processing method is provided.
[0103] This manual also provides Figure 4 The one shown corresponds to Figure 1 A schematic diagram of the electronic device. Figure 4 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0104] For the improvement of a technology, it can be clearly distinguished whether it is a hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or a software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0105] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0106] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0107] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0108] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0109] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0110] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0112] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0113] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0114] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0115] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0116] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0117] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0118] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0119] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A business processing method, characterized in that: include: generating a service instruction in response to a data acquisition path switching operation performed by a user; According to the business instructions, determine the data acquisition path required to execute the current business; When it is determined that the data acquisition path is the first path, the cache data required by the service instruction is read from a preset cache space, so as to execute the current service through the cache data; When it is determined that the data acquisition path is the second path, the interface of the preset database is called to obtain the real-time data corresponding to the business instruction from the database, so as to execute the current business through the real-time data.
2. The method according to claim 1, characterized in that The step of generating a service instruction in response to the data acquisition path switching operation performed by the user specifically includes: In response to the user performing a switching operation on a preset route switching switch in a preset interface, a service instruction is generated.
3. The method according to claim 1, characterized in that When it is determined that the data acquisition path is the first path, the step of reading the cache data required by the service instruction from the preset cache space specifically includes: When it is determined that the data acquisition path is the first path, determining a data level according to the business instruction, wherein the data level is used to characterize an update frequency of the data required by the business instruction, and the higher the update frequency of the data, the higher the data level; When the data level is lower than a preset level, the cache data required by the service instruction is read from a preset cache space.
4. The method according to claim 3, characterized in that The method further comprises: When the data level is not less than a preset level, an interface of a preset database is called to obtain real-time data corresponding to the business instruction from the database.
5. The method according to claim 1, characterized in that Before the step of determining, according to the business instruction, a data acquisition path required for executing the current business, the method further includes: According to the business instruction, obtaining identification information of the user; Determining the use permission information of the user according to the identification information, wherein the use permission information is used to indicate the data that the user is authorized to obtain; When it is determined that the data acquisition path is the first path, the step of reading the cache data required by the business instruction from the preset cache space specifically includes: When it is determined that the data acquisition path is the first path, the cache data required by the business instruction is read from a preset cache space according to the usage permission information; When it is determined that the data acquisition path is the second path, the step of calling an interface of a preset database to acquire the real-time data corresponding to the business instruction from the database specifically includes: When it is determined that the data acquisition path is the second path, an interface of a preset database is called to acquire real-time data corresponding to the business instruction from the database according to the usage authority information.
6. The method according to claim 1, characterized in that Before the step of executing the current service by using the cached data, the method further includes: Determining whether the cache time of the cache data required by the service instruction read from the cache space does not exceed a preset time; The step of executing the current business by using the cached data specifically includes: If it is determined that the cached time length of the cached data does not exceed the preset time length, the current service is executed through the cached data.
7. The method according to claim 6, characterized in that The method further comprises: If it is determined that the cached time of the cached data exceeds the preset time, the interface of the preset database is called to obtain the real-time data corresponding to the business instruction from the database, and the current business is executed through the real-time data.
8. A service processing device, characterized in that: include: A response module, used to generate a business instruction in response to a data acquisition path switching operation performed by a user; A determination module, used to determine a data acquisition path required for executing the current business according to the business instruction; A cache module, configured to read cache data required by the service instruction from a preset cache space when it is determined that the data acquisition path is the first path, so as to execute the current service through the cache data; The real-time module is used to call the interface of the preset database when it is determined that the data acquisition path is the second path, so as to obtain the real-time data corresponding to the business instruction from the database, so as to execute the current business through the real-time data.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Service data switching method, device, computer equipment and storage medium
CN110334123A
Civil aviation data synchronization method and device based on DataX
CN114519199A
Channel processing method, device and equipment
CN115002704A
Data processing method and device, electronic equipment and storage medium
CN115878245A
Information recommendation method and device, equipment and medium
CN117009624A